diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 713dd4e66..628a8fc8c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -21,6 +21,7 @@ jobs: - name: npm install, build, and test run: | npm ci --loglevel error + npm run lint npm run build npm run build-duckdb-db npm run test-silent diff --git a/packages/malloy-render/package.json b/packages/malloy-render/package.json index f4a8d8c01..730c27f8f 100644 --- a/packages/malloy-render/package.json +++ b/packages/malloy-render/package.json @@ -44,7 +44,9 @@ "ssf": "^0.11.2", "us-atlas": "^3.0.0", "vega": "^5.21.0", - "vega-lite": "^5.2.0" + "vega-lite": "^5.2.0", + "vite": "^5.1.5", + "vite-plugin-solid": "^2.10.1" }, "devDependencies": { "@storybook/addon-essentials": "^7.5.0", @@ -57,8 +59,6 @@ "@storybook/types": "^7.5.3", "@types/luxon": "^2.4.0", "esbuild": "0.19.11", - "storybook": "^7.5.0", - "vite": "^5.1.5", - "vite-plugin-solid": "^2.10.1" + "storybook": "^7.5.0" } } diff --git a/packages/malloy-render/src/component/apply-renderer.tsx b/packages/malloy-render/src/component/apply-renderer.tsx index cb4eadf71..ee2281fb4 100644 --- a/packages/malloy-render/src/component/apply-renderer.tsx +++ b/packages/malloy-render/src/component/apply-renderer.tsx @@ -2,7 +2,6 @@ import { AtomicField, DataArray, DataColumn, - Explore, ExploreField, Field, Tag, @@ -78,6 +77,7 @@ export function applyRenderer(props: RendererProps) { try { renderValue = String(dataColumn.value); } catch (err) { + // eslint-disable-next-line no-console console.warn('Couldnt get value for ', field, dataColumn); } } diff --git a/packages/malloy-render/src/component/register-webcomponent.ts b/packages/malloy-render/src/component/register-webcomponent.ts index 7fc44203d..05aaf6347 100644 --- a/packages/malloy-render/src/component/register-webcomponent.ts +++ b/packages/malloy-render/src/component/register-webcomponent.ts @@ -35,6 +35,7 @@ export default function registerWebComponent({ withSolid )(MalloyRender); } else { + // eslint-disable-next-line no-console console.warn( "The custom element 'malloy-render' has already been defined. Make sure you are not loading multiple versions of the malloy-render package as they could conflict." ); diff --git a/packages/malloy-render/src/component/render-link.tsx b/packages/malloy-render/src/component/render-link.tsx index 26e62f660..bcd703471 100644 --- a/packages/malloy-render/src/component/render-link.tsx +++ b/packages/malloy-render/src/component/render-link.tsx @@ -22,7 +22,7 @@ export function renderLink(f: AtomicField, data: DataColumn) { } } - let cleanedValue = value.replace(/\//g, '/\u200C'); + const cleanedValue = value.replace(/\//g, '/\u200C'); return ( {cleanedValue} diff --git a/packages/malloy-render/src/html/html_view.ts b/packages/malloy-render/src/html/html_view.ts index d1e6c126f..9af17076f 100644 --- a/packages/malloy-render/src/html/html_view.ts +++ b/packages/malloy-render/src/html/html_view.ts @@ -47,6 +47,7 @@ export class HTMLView { el.result = result; return el; } else { + // eslint-disable-next-line no-console console.warn( 'Tried to use the new Malloy renderer, but the malloy-render component was not found. Falling back to the legacy renderer.' ); diff --git a/packages/malloy/src/lang/ast/expressions/expr-id-reference.ts b/packages/malloy/src/lang/ast/expressions/expr-id-reference.ts index 245c6cabb..efeced05e 100644 --- a/packages/malloy/src/lang/ast/expressions/expr-id-reference.ts +++ b/packages/malloy/src/lang/ast/expressions/expr-id-reference.ts @@ -21,9 +21,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import { - expressionIsAggregate, -} from '../../../model/malloy_types'; +import {expressionIsAggregate} from '../../../model/malloy_types'; import {errorFor} from '../ast-utils'; import {ExprValue} from '../types/expr-value'; import {FieldReference} from '../query-items/field-references'; diff --git a/packages/malloy/src/lang/ast/parameters/has-parameter.ts b/packages/malloy/src/lang/ast/parameters/has-parameter.ts index 3618c0313..7b3131357 100644 --- a/packages/malloy/src/lang/ast/parameters/has-parameter.ts +++ b/packages/malloy/src/lang/ast/parameters/has-parameter.ts @@ -71,7 +71,9 @@ export class HasParameter extends MalloyElement { type: this.type, }; } else { - this.default.log("Default value cannot have type `null` unless parameter type is also specified") + this.default.log( + 'Default value cannot have type `null` unless parameter type is also specified' + ); return { value: constant.value, name: this.name, diff --git a/packages/malloy/src/lang/ast/query-elements/query-head-struct.ts b/packages/malloy/src/lang/ast/query-elements/query-head-struct.ts index 6e485a429..9db89a704 100644 --- a/packages/malloy/src/lang/ast/query-elements/query-head-struct.ts +++ b/packages/malloy/src/lang/ast/query-elements/query-head-struct.ts @@ -35,7 +35,10 @@ import {ParameterSpace} from '../field-space/parameter-space'; export class QueryHeadStruct extends Source { elementType = 'internalOnlyQueryHead'; - constructor(readonly fromRef: StructRef, readonly sourceArguments: Record | undefined) { + constructor( + readonly fromRef: StructRef, + readonly sourceArguments: Record | undefined + ) { super(); } diff --git a/packages/malloy/src/lang/ast/query-elements/query-reference.ts b/packages/malloy/src/lang/ast/query-elements/query-reference.ts index e833f3e3b..a762b4228 100644 --- a/packages/malloy/src/lang/ast/query-elements/query-reference.ts +++ b/packages/malloy/src/lang/ast/query-elements/query-reference.ts @@ -56,7 +56,10 @@ export class QueryReference extends MalloyElement implements QueryElement { return oops(); } if (query.type === 'query') { - const queryHead = new QueryHeadStruct(query.structRef, query.sourceArguments); + const queryHead = new QueryHeadStruct( + query.structRef, + query.sourceArguments + ); this.has({queryHead: queryHead}); const inputStruct = queryHead.structDef(undefined); const outputStruct = getFinalStruct(this, inputStruct, query.pipeline); diff --git a/packages/malloy/src/lang/ast/source-elements/named-source.ts b/packages/malloy/src/lang/ast/source-elements/named-source.ts index b2a0ed975..a333a4634 100644 --- a/packages/malloy/src/lang/ast/source-elements/named-source.ts +++ b/packages/malloy/src/lang/ast/source-elements/named-source.ts @@ -222,7 +222,7 @@ export class NamedSource extends Source { const outArguments = this.evaluateArguments( parameterSpace, base.parameters, - pList, + pList ); const ret = {...base, parameters: outParameters, arguments: outArguments}; diff --git a/packages/malloy/src/lang/malloy-to-ast.ts b/packages/malloy/src/lang/malloy-to-ast.ts index ca37bd054..bede7a410 100644 --- a/packages/malloy/src/lang/malloy-to-ast.ts +++ b/packages/malloy/src/lang/malloy-to-ast.ts @@ -514,9 +514,11 @@ export class MalloyToAST return pcx.joinDef().map(jcx => this.visit(jcx)); } - protected getJoinFrom( - cx: parse.JoinFromContext - ): {joinAs: ast.ModelEntryReference, joinFrom: ast.SourceQueryElement; notes: Note[]} { + protected getJoinFrom(cx: parse.JoinFromContext): { + joinAs: ast.ModelEntryReference; + joinFrom: ast.SourceQueryElement; + notes: Note[]; + } { const ecx = cx.isExplore(); const joinAs = this.getModelEntryName(cx.joinNameDef()); if (ecx) { @@ -528,7 +530,10 @@ export class MalloyToAST } const acx = cx.sourceArguments(); if (acx) { - const joinFrom = this.astAt(new ast.SQReference(joinAs, this.getSQArguments(acx)), cx); + const joinFrom = this.astAt( + new ast.SQReference(joinAs, this.getSQArguments(acx)), + cx + ); return {joinFrom, notes: [], joinAs}; } return {joinAs, joinFrom: new ast.SQReference(joinAs), notes: []}; diff --git a/packages/malloy/src/model/malloy_query.ts b/packages/malloy/src/model/malloy_query.ts index 6e42dcc1f..dc24cd103 100644 --- a/packages/malloy/src/model/malloy_query.ts +++ b/packages/malloy/src/model/malloy_query.ts @@ -4156,7 +4156,7 @@ class QueryStruct extends QueryNode { this._arguments[parameterName] = params[parameterName]; } // Then, copy over arguments to override default values - const args = { ...this.fieldDef.arguments, ...this.sourceArguments }; + const args = {...this.fieldDef.arguments, ...this.sourceArguments}; for (const parameterName in args) { const orig = args[parameterName]; this._arguments[parameterName] = diff --git a/test/src/databases/all/expr.spec.ts b/test/src/databases/all/expr.spec.ts index 53bbfe278..182bccbab 100644 --- a/test/src/databases/all/expr.spec.ts +++ b/test/src/databases/all/expr.spec.ts @@ -25,7 +25,6 @@ import {RuntimeList, allDatabases} from '../../runtimes'; import '../../util/db-jest-matchers'; import {databasesFromEnvironmentOr, mkSqlEqWith} from '../../util'; -import {fail} from 'assert'; const runtimes = new RuntimeList(databasesFromEnvironmentOr(allDatabases));