From 1b3232d19cfcf687c838fb56b2145784793d563d Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Mon, 7 Sep 2026 18:00:18 +0200 Subject: [PATCH 01/11] refactor(linter): migrate from ESLint to oxlint `@cubejs-backend/linter` was an eslintrc shareable config extending `airbnb-base`, consumed by 45 packages plus `rust/cubestore` through a per-package `eslintConfig` block. CI ran `lerna run --concurrency 1 lint`, i.e. 49 sequential ESLint 8 processes. That toolchain is also at the end of the road: ESLint 8.57.1 is out of support, and #11767 already had to shuffle four formatting rules into `@stylistic/eslint-plugin-ts` because typescript-eslint 8 dropped them. The package now ships an oxlint config instead. `airbnb-base.json` is the mechanical port of the old rule set, generated from `eslint --print-config` so it is verifiable rather than hand-transcribed; `.oxlintrc.json` sits on top of it and holds the deliberate departures, each with its reason. The repo-root `.oxlintrc.json` extends that and owns the ignore list, so linting is a single root operation and the 49 per-package `lint` scripts and `eslintConfig` blocks are gone. oxlint implements no formatting rules, so `@stylistic/eslint-plugin` is loaded through `jsPlugins` to keep the 48 whitespace rules airbnb-base relies on. | | before (ESLint) | after (oxlint) | | --- | --- | --- | | invocations | 49 sequential processes | 1 | | wall clock, whole repo | minutes | 2.7s (`yarn lint` 4.3s incl. `lint:npm`) | | files linted | 739 | 873 | | errors | 0 | 0 | | warnings | 178 | 149 | Rule coverage of the 192 rules the old config resolved to: 125 map onto oxlint natively with identical options, 48 move to `@stylistic/*`, 8 are renamed or re-homed (`no-new-object` to `no-object-constructor`, `global-require` to `node/global-require`, `no-buffer-constructor` to `unicorn/no-new-buffer`, and the `@typescript-eslint` twins of `no-unused-vars` / `no-shadow` / `semi` collapse onto the TS-aware core rules; the four formatting rules #11767 moved to `@stylistic/ts/*` land on the same `@stylistic/*` targets, so that change is absorbed). 14 have no equivalent and are listed at the top of `airbnb-base.json`; the ones worth chasing later are `camelcase`, `import/order`, `import/no-extraneous-dependencies`, and `consistent-return` / `dot-notation` / `no-return-await`, which exist only as type-aware `typescript/*` rules. Parity was checked by diffing per-file diagnostics against an ESLint run on the pre-migration tree. Of the 50 previously-linted files involved, 46 match exactly; the 4 that differ are all oxlint being more lenient about destructuring placeholders and rest siblings. The 40 `quotes` warnings in the baseline are gone because `--fix` resolved them. Three things needed configuring rather than porting, all commented in `packages/cubejs-linter/.oxlintrc.json`: eslint-plugin-import had no TypeScript resolver, so `import/no-cycle`, `import/export` and the two `no-named-as-default` rules never actually ran (they now report 173 dependency cycles and 2 real duplicate exports -- left off, to be fixed separately); oxlint honours neither `/* globals ... */` nor `/* eslint-env jest */`, so the jest globals come from an `overrides` entry; and `@stylistic/quotes` gets `allowTemplateLiterals` because `--fix` otherwise rewrites the driver parameter-escaping tests into backslash soup. The source changes are `oxlint --fix` output. They are all formatting, and they exist because `@stylistic` understands TypeScript syntax where ESLint's core rules did not -- `indent` in generic argument lists and type annotations, `object-curly-spacing` and `quote-props` in type literals, `space-before-blocks` on interface bodies. Four files carry a hand-written `eslint-disable` for intentional code: bit twiddling in the zip helper test, a never-resolving promise in the native test server, and a lazy `require` in the cypress config. Also drops the stale `.eslintrc.js` path filters from the workflows (that file has not existed for some time) and fixes the linter package's `repository.directory`, which pointed at `packages/cubejs-mssql-driver`. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/master.yml | 2 +- .github/workflows/push.yml | 8 +- .oxlintrc.json | 46 + CLAUDE.md | 5 +- CONTRIBUTING.md | 11 +- package.json | 11 +- packages/cubejs-api-gateway/.eslintignore | 1 - packages/cubejs-api-gateway/package.json | 9 +- packages/cubejs-api-gateway/src/gateway.ts | 12 +- packages/cubejs-api-gateway/src/interfaces.ts | 10 +- packages/cubejs-api-gateway/src/types/auth.ts | 4 +- .../cubejs-api-gateway/src/types/query.ts | 6 +- .../cubejs-api-gateway/src/types/request.ts | 4 +- .../helpers/transform-meta-extended.test.ts | 4 +- .../normalize-query-filters-dates.test.js | 4 +- packages/cubejs-athena-driver/package.json | 7 +- .../test/AthenaDriver.test.ts | 2 +- packages/cubejs-backend-cloud/package.json | 7 +- packages/cubejs-backend-cloud/src/cloud.ts | 6 +- packages/cubejs-backend-cloud/src/deploy.ts | 2 +- packages/cubejs-backend-maven/package.json | 7 +- packages/cubejs-backend-maven/src/maven.ts | 15 +- .../benchmarks/python-config.bench.ts | 6 +- packages/cubejs-backend-native/js/index.ts | 4 +- packages/cubejs-backend-native/package.json | 7 +- packages/cubejs-backend-native/test/server.js | 1 + packages/cubejs-backend-shared/package.json | 5 - .../cubejs-backend-shared/src/promises.ts | 28 +- .../test/db_env_pre_aggregations.test.ts | 1 - .../test/db_env_single.test.ts | 4 +- .../test/disposedProxy.test.ts | 6 +- .../test/http-utils.test.ts | 2 + .../test/package.test.ts | 4 +- packages/cubejs-base-driver/package.json | 7 +- packages/cubejs-base-driver/src/BaseDriver.ts | 2 +- packages/cubejs-bigquery-driver/package.json | 7 +- packages/cubejs-cli/package.json | 9 +- .../cubejs-clickhouse-driver/package.json | 5 - packages/cubejs-client-core/package.json | 7 +- packages/cubejs-client-dx/.eslintrc.js | 39 - packages/cubejs-client-dx/.oxlintrc.json | 31 + packages/cubejs-client-dx/package.json | 9 +- packages/cubejs-client-react/.eslintrc.js | 80 -- packages/cubejs-client-react/.oxlintrc.json | 928 ++++++++++++++++++ packages/cubejs-client-react/package.json | 13 +- .../cubejs-client-ws-transport/package.json | 7 +- packages/cubejs-crate-driver/package.json | 7 +- packages/cubejs-cubestore-driver/package.json | 5 - .../package.json | 5 - .../src/DatabricksDriver.ts | 4 +- .../src/DatabricksQuery.ts | 2 +- .../test/DatabricksDriver.test.ts | 26 +- .../cubejs-dbt-schema-extension/package.json | 7 +- packages/cubejs-dremio-driver/package.json | 7 +- .../test/DremioQuery.test.ts | 1 - packages/cubejs-druid-driver/package.json | 7 +- packages/cubejs-duckdb-driver/package.json | 7 +- packages/cubejs-firebolt-driver/package.json | 7 +- .../src/FireboltDriver.ts | 2 +- packages/cubejs-hive-driver/package.json | 8 +- packages/cubejs-jdbc-driver/package.json | 7 +- packages/cubejs-jdbc-driver/src/JDBCDriver.ts | 12 +- packages/cubejs-ksql-driver/package.json | 7 +- packages/cubejs-linter/.oxlintrc.json | 58 ++ packages/cubejs-linter/airbnb-base.json | 692 +++++++++++++ packages/cubejs-linter/index.js | 114 --- packages/cubejs-linter/package.json | 20 +- .../cubejs-materialize-driver/package.json | 7 +- .../src/MaterializeDriver.ts | 2 +- .../test/MaterializeDriver.test.ts | 3 +- packages/cubejs-mongobi-driver/package.json | 5 - packages/cubejs-mssql-driver/package.json | 7 +- .../cubejs-mssql-driver/src/MSSqlDriver.ts | 26 +- .../package.json | 6 +- packages/cubejs-mysql-driver/package.json | 7 +- .../driver/OracleDriver.js | 12 +- packages/cubejs-pinot-driver/package.json | 7 +- packages/cubejs-playground/.eslintignore | 1 - packages/cubejs-postgres-driver/package.json | 7 +- packages/cubejs-prestodb-driver/package.json | 7 +- .../src/PrestoDriver.ts | 2 +- packages/cubejs-query-orchestrator/CLAUDE.md | 2 +- .../cubejs-query-orchestrator/package.json | 9 +- .../src/orchestrator/PreAggregations.ts | 14 +- .../src/orchestrator/QueryCache.ts | 2 +- .../src/orchestrator/QueryOrchestrator.ts | 2 +- .../src/orchestrator/QueryQueue.ts | 4 +- .../test/unit/PreAggregations.test.ts | 4 +- packages/cubejs-questdb-driver/package.json | 7 +- packages/cubejs-redshift-driver/package.json | 7 +- .../src/RedshiftDriver.ts | 4 +- packages/cubejs-schema-compiler/.eslintignore | 9 - packages/cubejs-schema-compiler/package.json | 9 +- .../src/adapter/BaseMeasure.ts | 2 +- .../src/adapter/windows-iana.ts | 2 +- .../src/compiler/CubeSymbols.ts | 24 +- .../src/compiler/JoinGraph.ts | 28 +- .../src/compiler/PrepareCompiler.ts | 18 +- .../formatters/BaseSchemaFormatter.ts | 6 +- .../mysql/mysql-pre-aggregations.test.ts | 2 +- .../member-expressions-on-views.test.ts | 2 +- .../postgres/pre-aggregations.test.ts | 4 +- packages/cubejs-server-core/package.json | 7 +- .../src/core/RefreshScheduler.ts | 2 +- packages/cubejs-server-core/src/core/types.ts | 4 +- packages/cubejs-server/package.json | 5 - packages/cubejs-server/scripts/test.js | 25 +- packages/cubejs-server/src/server.ts | 2 +- packages/cubejs-snowflake-driver/package.json | 7 +- .../src/SnowflakeDriver.ts | 4 +- packages/cubejs-sqlite-driver/package.json | 4 - packages/cubejs-templates/package.json | 7 +- packages/cubejs-testing-drivers/package.json | 5 - .../src/types/Environment.ts | 10 +- packages/cubejs-testing-shared/package.json | 7 +- .../src/query-test.abstract.ts | 4 +- packages/cubejs-testing/cypress.config.ts | 5 +- packages/cubejs-testing/package.json | 6 - .../cubejs-testing/src/REQUIRED_ENV_VARS.ts | 2 +- packages/cubejs-testing/src/birdbox.ts | 2 +- .../cubejs-testing/test/rest-test-suite.ts | 4 +- .../cubejs-testing/test/smoke-cubesql.test.ts | 2 +- packages/cubejs-trino-driver/package.json | 7 +- packages/cubejs-vertica-driver/package.json | 7 +- rust/cubestore/package.json | 5 - 125 files changed, 2031 insertions(+), 762 deletions(-) create mode 100644 .oxlintrc.json delete mode 100644 packages/cubejs-api-gateway/.eslintignore delete mode 100644 packages/cubejs-client-dx/.eslintrc.js create mode 100644 packages/cubejs-client-dx/.oxlintrc.json delete mode 100644 packages/cubejs-client-react/.eslintrc.js create mode 100644 packages/cubejs-client-react/.oxlintrc.json create mode 100644 packages/cubejs-linter/.oxlintrc.json create mode 100644 packages/cubejs-linter/airbnb-base.json delete mode 100644 packages/cubejs-linter/index.js delete mode 100644 packages/cubejs-playground/.eslintignore delete mode 100644 packages/cubejs-schema-compiler/.eslintignore diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ab0c6d65571d5..9e9a32739aaf1 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -5,7 +5,7 @@ on: - '.github/workflows/push.yml' - '.github/workflows/master.yml' - 'packages/**' - - '.eslintrc.js' + - '.oxlintrc.json' - '.prettierrc' - 'lerna.json' - 'package.json' diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 418483142ec66..21525aa33e547 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -11,7 +11,7 @@ on: - 'rust/cubestore/**' - 'rust/cubesql/**' - 'rust/cube/**' - - '.eslintrc.js' + - '.oxlintrc.json' - '.prettierrc' - 'package.json' - 'lerna.json' @@ -30,7 +30,7 @@ on: - 'rust/cubestore/**' - 'rust/cubesql/**' - 'rust/cube/**' - - '.eslintrc.js' + - '.oxlintrc.json' - '.prettierrc' - 'package.json' - 'lerna.json' @@ -198,8 +198,8 @@ jobs: run: if [ "$(git status | grep nothing)x" = "x" ]; then echo "Non empty changeset after lerna bootstrap"; git status; exit 1; else echo "Nothing to commit. Proceeding"; fi; - name: NPM lint run: yarn lint:npm - - name: Lerna lint - run: yarn lerna run --concurrency 1 lint + - name: Oxlint + run: yarn lint:js - name: Cargo fmt cube workspace run: | cargo fmt --manifest-path rust/cube/Cargo.toml --all -- --check diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000000000..793c82928ec4e --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,46 @@ +// Repo-wide oxlint configuration. The rule set lives in the @cubejs-backend/linter +// package so it stays a publishable, reviewable unit; this file adds the ignores. +// +// `yarn lint` runs bare `oxlint`: passing -c/--config would disable nested config +// discovery, and packages/cubejs-client-{dx,react} rely on it. +// +// `extends` merges `rules`, `plugins` and `jsPlugins`, but NOT `env` or `ignorePatterns` +// -- those are per-config-file, which is why they are restated in every nested config +// rather than inherited from the linter package. +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "extends": ["./packages/cubejs-linter/.oxlintrc.json"], + "env": { + "node": true, + "es6": true + }, + "ignorePatterns": [ + "dist/", + "lib/", + "build/", + "coverage/", + "gen/", + "**/*.d.ts", + "docs/", + "docs-mintlify/", + "examples/", + "rust/cubesql/", + // still on ESLint: oxlint cannot parse Vue SFCs + "packages/cubejs-client-vue3/", + // never covered by the ESLint setup this replaced + "packages/cubejs-client-ngx/", + "packages/cubejs-playground/", + "packages/cubejs-testing/cypress/", + "packages/cubejs-testing/birdbox-fixtures/", + // a mongosh script, not Node: `db` is a shell global + "packages/cubejs-mongobi-driver/test/mongo-init.js", + // vendored Thrift output + "packages/cubejs-hive-driver/idl/", + // generated flatbuffers accessors + "packages/cubejs-cubestore-driver/codegen/", + // generated ANTLR parsers and SQL fixtures + "packages/cubejs-schema-compiler/src/parser/GenericSql*.ts", + "packages/cubejs-schema-compiler/src/parser/Python3*.ts", + "packages/cubejs-schema-compiler/test/unit/fixtures/" + ] +} diff --git a/CLAUDE.md b/CLAUDE.md index 4c5c28bcb2b1d..01799df50ce01 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -29,9 +29,12 @@ yarn tsc:watch # Clean build artifacts yarn clean -# Run linting across all packages +# Run linting (oxlint over the whole repo) plus the package.json linter yarn lint +# oxlint only +yarn lint:js + # Fix linting issues yarn lint:fix diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 267b6afa0b847..ae11528f5a8d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -206,10 +206,13 @@ Following these guidelines is not a requirement, but you can save some time for ### Code -1. Run `yarn lint` in package before committing your changes. -If package doesn't have lint script, please add it and run. -There's one root `.eslintrc.js` file for all packages except client ones. -Client packages has it's own `.eslintrc.js` files. +1. Run `yarn lint` from the repository root before committing your changes. +Linting is a whole-repo operation now (oxlint covers every package in about a second), +so packages don't carry their own lint scripts. +The shared rule set lives in `packages/cubejs-linter/.oxlintrc.json` and is wired up by the +root `.oxlintrc.json`. A package that needs to diverge gets its own `.oxlintrc.json` +extending the root one - see `packages/cubejs-client-react` for an example. +Use `yarn lint:fix` to apply the fixable violations. 2. Run `yarn test` before committing if package has tests. 3. Please use [conventional commits name](https://www.conventionalcommits.org/) for your PR. It'll be used to build change logs. diff --git a/package.json b/package.json index 2fd7a61812bd9..aee535903c1b5 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,12 @@ "watch": "rollup -c -w", "watch-local": "CUBEJS_API_URL=http://localhost:6020/cubejs-api/v1 rollup -c -w", "lint:npm": "yarn npmPkgJsonLint packages/*/package.json rust/package.json", - "lint": "yarn lint:npm && yarn lerna run lint", - "lint:fix": "lerna run lint:fix", + "lint": "yarn lint:npm && yarn lint:js", + "lint:fix": "oxlint --fix", "tsc": "tsc --build", "tsc:watch": "tsc --build --watch", - "clean": "rimraf packages/*/{tsconfig.tsbuildinfo,lib,dist} packages/cubejs-testing/cypress/{tsconfig.tsbuildinfo,dist}" + "clean": "rimraf packages/*/{tsconfig.tsbuildinfo,lib,dist} packages/cubejs-testing/cypress/{tsconfig.tsbuildinfo,dist}", + "lint:js": "oxlint" }, "author": "Cube Dev, Inc.", "dependencies": { @@ -46,14 +47,12 @@ "@rollup/plugin-commonjs": "^17.1.0", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^11.2.0", - "@typescript-eslint/eslint-plugin": "^8.46.0", - "@typescript-eslint/parser": "^8.46.0", - "eslint": "^8.57.1", "@types/fs-extra": "^11.0.4", "@types/jest": "^29", "husky": "^5.0.4", "is-ci": "^2.0.0", "npm-package-json-lint": "^5.1.0", + "oxlint": "^1.82.0", "postcss": "^8.2.8", "prettier": "^2.0.5", "rimraf": "^3.0.2", diff --git a/packages/cubejs-api-gateway/.eslintignore b/packages/cubejs-api-gateway/.eslintignore deleted file mode 100644 index 53c37a16608c0..0000000000000 --- a/packages/cubejs-api-gateway/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -dist \ No newline at end of file diff --git a/packages/cubejs-api-gateway/package.json b/packages/cubejs-api-gateway/package.json index d1516e8a821d7..5c6dc8a1a251b 100644 --- a/packages/cubejs-api-gateway/package.json +++ b/packages/cubejs-api-gateway/package.json @@ -18,9 +18,7 @@ "unit": "CUBE_JS_NATIVE_API_GATEWAY_INTERNAL=true jest --coverage --forceExit dist/test", "build": "rm -rf dist && npm run tsc", "tsc": "tsc", - "watch": "tsc -w", - "lint": "eslint \"**/*.{ts,tsx}\"", - "lint:fix": "eslint --fix \"**/*.{ts,tsx}\"" + "watch": "tsc -w" }, "files": [ "README.md", @@ -69,8 +67,5 @@ "supertest": "^4.0.2", "typescript": "~6.0.3" }, - "license": "Apache-2.0", - "eslintConfig": { - "extends": "../cubejs-linter" - } + "license": "Apache-2.0" } diff --git a/packages/cubejs-api-gateway/src/gateway.ts b/packages/cubejs-api-gateway/src/gateway.ts index 1730d5cfbb22c..8b27f06b68a53 100644 --- a/packages/cubejs-api-gateway/src/gateway.ts +++ b/packages/cubejs-api-gateway/src/gateway.ts @@ -112,11 +112,11 @@ import { } from './helpers/transform-meta-extended'; type HandleErrorOptions = { - e: any, - res: ResponseResultFn, - context?: any, - query?: any, - requestStarted?: Date + e: any, + res: ResponseResultFn, + context?: any, + query?: any, + requestStarted?: Date }; function userAsyncHandler(handler: (req: Request & { context: ExtendedRequestContext }, res: ExpressResponse) => Promise) { @@ -1525,7 +1525,7 @@ class ApiGateway { disablePostProcessing, context, res, - }: {query: string, disablePostProcessing: boolean} & BaseRequest) { + }: { query: string, disablePostProcessing: boolean } & BaseRequest) { try { await this.assertApiScope('sql', context.securityContext); diff --git a/packages/cubejs-api-gateway/src/interfaces.ts b/packages/cubejs-api-gateway/src/interfaces.ts index 5094494417ef2..a7cd8a17f6531 100644 --- a/packages/cubejs-api-gateway/src/interfaces.ts +++ b/packages/cubejs-api-gateway/src/interfaces.ts @@ -92,11 +92,11 @@ export { * Context rejection middleware. */ export type ContextRejectionMiddlewareFn = - ( - req: Request, - res: ExpressResponse, - next: ExpressNextFunction, - ) => void; + ( + req: Request, + res: ExpressResponse, + next: ExpressNextFunction, + ) => void; type ContextAcceptorResult = { accepted: boolean; rejectMessage?: any }; diff --git a/packages/cubejs-api-gateway/src/types/auth.ts b/packages/cubejs-api-gateway/src/types/auth.ts index 4b7d11ff839f6..600cc789efcb0 100644 --- a/packages/cubejs-api-gateway/src/types/auth.ts +++ b/packages/cubejs-api-gateway/src/types/auth.ts @@ -40,7 +40,7 @@ interface JWTOptions { } type CheckAuthResponse = { - 'security_context'?: unknown, + security_context?: unknown, }; /** @@ -87,7 +87,7 @@ type CanSwitchSQLUserFn = */ type ContextToApiScopesFn = (securityContext?: any, scopes?: ApiScopesTuple) => - Promise; + Promise; export { CheckAuthInternalOptions, diff --git a/packages/cubejs-api-gateway/src/types/query.ts b/packages/cubejs-api-gateway/src/types/query.ts index 7b42fd7c046d7..6848b9de4292e 100644 --- a/packages/cubejs-api-gateway/src/types/query.ts +++ b/packages/cubejs-api-gateway/src/types/query.ts @@ -42,9 +42,9 @@ type LogicalOrFilter = { export type GroupingSetType = 'Rollup' | 'Cube'; type GroupingSet = { - groupType: GroupingSetType, - id: number, - subId?: null | number + groupType: GroupingSetType, + id: number, + subId?: null | number }; export type EvalPatchMeasureFilterExpression = { diff --git a/packages/cubejs-api-gateway/src/types/request.ts b/packages/cubejs-api-gateway/src/types/request.ts index 9b78a1afda503..99c4a75d9e9d1 100644 --- a/packages/cubejs-api-gateway/src/types/request.ts +++ b/packages/cubejs-api-gateway/src/types/request.ts @@ -165,7 +165,7 @@ type SqlApiRequest = BaseRequest & { * Pre-aggregations selector object. */ type PreAggsSelector = { - contexts: {securityContext: any}[], + contexts: { securityContext: any }[], timezones: string[], dataSources?: string[], cubes?: string[], @@ -178,7 +178,7 @@ type PreAggsSelector = { */ type PreAggJob = { request: string; - context: {securityContext: any}; + context: { securityContext: any }; preagg: string; table: string; target: string; diff --git a/packages/cubejs-api-gateway/test/helpers/transform-meta-extended.test.ts b/packages/cubejs-api-gateway/test/helpers/transform-meta-extended.test.ts index ecbefc788da16..68e690e07ddba 100644 --- a/packages/cubejs-api-gateway/test/helpers/transform-meta-extended.test.ts +++ b/packages/cubejs-api-gateway/test/helpers/transform-meta-extended.test.ts @@ -42,12 +42,12 @@ const MOCK_USERS_CUBE = { plan: { case: { when: { - '0': { + 0: { // eslint-disable-next-line quotes sql: () => `tenantEnterpriseFlag = true`, label: 'Enterprise', }, - '1': { + 1: { // eslint-disable-next-line quotes sql: () => `stripe_customer_id IS NOT NULL`, label: 'Standard', diff --git a/packages/cubejs-api-gateway/test/normalize-query-filters-dates.test.js b/packages/cubejs-api-gateway/test/normalize-query-filters-dates.test.js index 8501b77892d48..f4a0bee97116d 100644 --- a/packages/cubejs-api-gateway/test/normalize-query-filters-dates.test.js +++ b/packages/cubejs-api-gateway/test/normalize-query-filters-dates.test.js @@ -396,7 +396,7 @@ describe('normalizeQuery: date-range filter resolution', () => { timezone: 'UTC', filters: [{ or: [ { member: 'Orders.createdAt', operator: 'inDateRange', values: ['today'] }, - ]}], + ] }], }, false); const la = normalizeQuery({ @@ -404,7 +404,7 @@ describe('normalizeQuery: date-range filter resolution', () => { timezone: 'America/Los_Angeles', filters: [{ or: [ { member: 'Orders.createdAt', operator: 'inDateRange', values: ['today'] }, - ]}], + ] }], }, false); expect(utc.filters[0].or[0].values[0]).toMatch(/^2026-06-25T/); diff --git a/packages/cubejs-athena-driver/package.json b/packages/cubejs-athena-driver/package.json index 6b64e6bd40961..55e0d6343c19c 100644 --- a/packages/cubejs-athena-driver/package.json +++ b/packages/cubejs-athena-driver/package.json @@ -18,9 +18,7 @@ "test": "yarn integration", "unit": "NODE_OPTIONS=--experimental-vm-modules jest --verbose dist/test/unit", "integration": "npm run integration:athena", - "integration:athena": "NODE_OPTIONS=--experimental-vm-modules jest --verbose dist/test", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:athena": "NODE_OPTIONS=--experimental-vm-modules jest --verbose dist/test" }, "files": [ "dist/src", @@ -45,9 +43,6 @@ "publishConfig": { "access": "public" }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "jest": { "testEnvironment": "node" }, diff --git a/packages/cubejs-athena-driver/test/AthenaDriver.test.ts b/packages/cubejs-athena-driver/test/AthenaDriver.test.ts index 1ac567dc5ac02..8e4ffd82e4741 100644 --- a/packages/cubejs-athena-driver/test/AthenaDriver.test.ts +++ b/packages/cubejs-athena-driver/test/AthenaDriver.test.ts @@ -78,7 +78,7 @@ describe('AthenaDriver', () => { // Aggressive pollTimeout (5s) so the test doesn't depend on the // ambient CUBEJS_DB_QUERY_TIMEOUT. Constructor multiplies by 1000. const cancelDriver = new AthenaDriver({ pollTimeout: 5 }); - const athena = (cancelDriver as any).athena; + const { athena } = (cancelDriver as any); const startOriginal = athena.startQueryExecution.bind(athena); let queryExecutionId = ''; diff --git a/packages/cubejs-backend-cloud/package.json b/packages/cubejs-backend-cloud/package.json index af658e9a7c623..5d764675ca6f6 100644 --- a/packages/cubejs-backend-cloud/package.json +++ b/packages/cubejs-backend-cloud/package.json @@ -9,9 +9,7 @@ "tsc": "tsc", "watch": "tsc -w", "test": "npm run unit", - "unit": "jest dist/test", - "lint": "eslint --debug src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "unit": "jest dist/test" }, "files": [ "README.md", @@ -49,8 +47,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-backend-cloud/src/cloud.ts b/packages/cubejs-backend-cloud/src/cloud.ts index e0c36180c3819..7ed8eb860e614 100644 --- a/packages/cubejs-backend-cloud/src/cloud.ts +++ b/packages/cubejs-backend-cloud/src/cloud.ts @@ -109,7 +109,7 @@ export class CubeCloudClient { public uploadFile( { transaction, fileName, data, auth }: - { transaction: any, fileName: string, data: ReadStream, auth?: AuthObject } + { transaction: any, fileName: string, data: ReadStream, auth?: AuthObject } ) { const formData = new FormData(); formData.append('transaction', JSON.stringify(transaction)); @@ -134,7 +134,7 @@ export class CubeCloudClient { } public finishUpload({ transaction, files, auth }: - { transaction: any, files: any, auth?: AuthObject }) { + { transaction: any, files: any, auth?: AuthObject }) { return this.request({ url: (deploymentId: string) => `build/deploy/${deploymentId}/finish-upload${this.extendRequestByLivePreview()}`, method: 'POST', @@ -159,7 +159,7 @@ export class CubeCloudClient { }); } - public getStatusDevMode({ auth, lastHash }: { auth?: AuthObject, lastHash?: string } = {}): Promise<{[key: string]: any}> { + public getStatusDevMode({ auth, lastHash }: { auth?: AuthObject, lastHash?: string } = {}): Promise<{ [key: string]: any }> { const params = new URLSearchParams(); if (lastHash) { params.append('lastHash', lastHash); diff --git a/packages/cubejs-backend-cloud/src/deploy.ts b/packages/cubejs-backend-cloud/src/deploy.ts index bd6142bc648ce..e9e334aacec42 100644 --- a/packages/cubejs-backend-cloud/src/deploy.ts +++ b/packages/cubejs-backend-cloud/src/deploy.ts @@ -66,7 +66,7 @@ export class DeployDirectory { type DeployHooks = { onStart?: (deploymentName: string, files: string[]) => void, - onUpdate?: (i: number, { file }: { file: string}) => void, + onUpdate?: (i: number, { file }: { file: string }) => void, onUpload?: (files: string[], file: string) => void, onFinally?: () => void }; diff --git a/packages/cubejs-backend-maven/package.json b/packages/cubejs-backend-maven/package.json index 2a05e0d7b0f5b..cb1e372b432cf 100644 --- a/packages/cubejs-backend-maven/package.json +++ b/packages/cubejs-backend-maven/package.json @@ -21,9 +21,7 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "unit:disabled-for-ci": "jest dist/test/*.js", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "unit:disabled-for-ci": "jest dist/test/*.js" }, "files": [ "README.md", @@ -44,8 +42,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-backend-maven/src/maven.ts b/packages/cubejs-backend-maven/src/maven.ts index 47c58a269ca38..a4f76827639d5 100644 --- a/packages/cubejs-backend-maven/src/maven.ts +++ b/packages/cubejs-backend-maven/src/maven.ts @@ -27,10 +27,17 @@ export function generateXml(dependencies: MavenDependency[]) { 'xsi:schemaLocation': 'http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd', }) // project-> - .ele('modelVersion').txt('4.0.0').up() - .ele('groupId').txt('com.mycompany.app').up() - .ele('artifactId').txt('my-app').up() - .ele('version').txt('1.0-SNAPSHOT').up() + .ele('modelVersion').txt('4.0.0') + .up() + .ele('groupId') + .txt('com.mycompany.app') + .up() + .ele('artifactId') + .txt('my-app') + .up() + .ele('version') + .txt('1.0-SNAPSHOT') + .up() // // project->properties // .ele('properties') // .ele('maven.compiler.source').txt('1.8').up() diff --git a/packages/cubejs-backend-native/benchmarks/python-config.bench.ts b/packages/cubejs-backend-native/benchmarks/python-config.bench.ts index 5c648123bcaf7..6e1318b0936c8 100644 --- a/packages/cubejs-backend-native/benchmarks/python-config.bench.ts +++ b/packages/cubejs-backend-native/benchmarks/python-config.bench.ts @@ -82,7 +82,7 @@ describe('Python Configuration Loading', () => { // It should help to identify any potential issues with GIL 'checkAuth - sync version (parallel 50x)': async () => { await Promise.all( - Array.from({ length: 50 }, () => configPy.checkAuth!({ requestId: 'sync-bench' }, 'SYNC_TOKEN')) + Array.from({ length: 50 }, () => configPy.checkAuth!({ requestId: 'sync-bench' }, 'SYNC_TOKEN')) ); }, @@ -93,7 +93,7 @@ describe('Python Configuration Loading', () => { // It should help to identify any potential issues with GIL 'checkAuth - async version (parallel 50x)': async () => { await Promise.all( - Array.from({ length: 50 }, () => configAsyncPy.checkAuth!({ requestId: 'async-bench' }, 'ASYNC_TOKEN')) + Array.from({ length: 50 }, () => configAsyncPy.checkAuth!({ requestId: 'async-bench' }, 'ASYNC_TOKEN')) ); }, @@ -119,4 +119,4 @@ describe('Python Configuration Loading', () => { await configAsyncPy.queryRewrite!(testQuery, {}); }, }); -}); \ No newline at end of file +}); diff --git a/packages/cubejs-backend-native/js/index.ts b/packages/cubejs-backend-native/js/index.ts index a82b172cb4bfc..bd939ef15ff68 100644 --- a/packages/cubejs-backend-native/js/index.ts +++ b/packages/cubejs-backend-native/js/index.ts @@ -151,7 +151,7 @@ export type DBResponsePrimitive = // TODO type this better, to make it proper disjoint union export type Sql4SqlOk = { sql: string, - values: Array, + values: Array, }; export type Sql4SqlError = { error: string }; export type Sql4SqlCommon = { @@ -530,7 +530,7 @@ export const transpileYaml = async (transpileRequests: TransformConfig[]): Promi export interface PyConfiguration { repositoryFactory?: (ctx: unknown) => Promise, logger?: (msg: string, params: Record) => void, - checkAuth?: (req: unknown, authorization: string) => Promise<{ 'security_context'?: unknown }> + checkAuth?: (req: unknown, authorization: string) => Promise<{ security_context?: unknown }> extendContext?: (req: unknown) => Promise queryRewrite?: (query: unknown, ctx: unknown) => Promise contextToApiScopes?: () => Promise diff --git a/packages/cubejs-backend-native/package.json b/packages/cubejs-backend-native/package.json index c206945317f14..389ae10c2be5c 100644 --- a/packages/cubejs-backend-native/package.json +++ b/packages/cubejs-backend-native/package.json @@ -28,9 +28,7 @@ "test:unit": "yarn run unit", "test:bridge": "npm run native:build-debug-bridge-tests && npm run tsc && jest --config jest-bridge.config.js --forceExit", "test:cargo": "cargo test", - "bench": "jest --config jest-bench.config.js --forceExit", - "lint": "eslint test/ js/ --ext .ts", - "lint:fix": "eslint --fix test/ js/ --ext .ts" + "bench": "jest --config jest-bench.config.js --forceExit" }, "engines": { "node": ">=20.0.0" @@ -84,9 +82,6 @@ } ] }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cubejs-backend-native/test/server.js b/packages/cubejs-backend-native/test/server.js index 00e992c6b8a92..1e3c8adb675ff 100644 --- a/packages/cubejs-backend-native/test/server.js +++ b/packages/cubejs-backend-native/test/server.js @@ -138,5 +138,6 @@ const meta_fixture = require('./meta'); }); // block + // eslint-disable-next-line no-empty-function await new Promise(() => {}); })(); diff --git a/packages/cubejs-backend-shared/package.json b/packages/cubejs-backend-shared/package.json index 441076682943c..edda4cfdcc3c9 100644 --- a/packages/cubejs-backend-shared/package.json +++ b/packages/cubejs-backend-shared/package.json @@ -8,8 +8,6 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts", "unit": "jest --coverage" }, "files": [ @@ -61,9 +59,6 @@ "publishConfig": { "access": "public" }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "resolutions": { "colors": "1.4.0" } diff --git a/packages/cubejs-backend-shared/src/promises.ts b/packages/cubejs-backend-shared/src/promises.ts index 45c7b1ec1e33b..e29bc66645865 100644 --- a/packages/cubejs-backend-shared/src/promises.ts +++ b/packages/cubejs-backend-shared/src/promises.ts @@ -246,24 +246,24 @@ export const retryWithTimeout = ( fn: (token: CancelToken) => Promise, { timeout, intervalPause }: RetryWithTimeoutOptions, ) => withTimeoutRace( - createCancelablePromise(async (token) => { - let i = 0; + createCancelablePromise(async (token) => { + let i = 0; - while (!token.isCanceled()) { - i++; + while (!token.isCanceled()) { + i++; - const result = await fn(token); - if (result) { - return result; - } - - await token.with(pausePromise(intervalPause(i))); + const result = await fn(token); + if (result) { + return result; } - return null; - }), - timeout - ); + await token.with(pausePromise(intervalPause(i))); + } + + return null; + }), + timeout +); export type AsyncDebounceOptions = { max?: number; diff --git a/packages/cubejs-backend-shared/test/db_env_pre_aggregations.test.ts b/packages/cubejs-backend-shared/test/db_env_pre_aggregations.test.ts index 7b294ba7aa455..7542e81c63f9c 100644 --- a/packages/cubejs-backend-shared/test/db_env_pre_aggregations.test.ts +++ b/packages/cubejs-backend-shared/test/db_env_pre_aggregations.test.ts @@ -135,7 +135,6 @@ describe('Pre-aggregation env vars (multi datasource)', () => { .toEqual('default-host'); }); - test('keyByDataSource with preAggregations for named datasource', () => { expect(keyByDataSource('CUBEJS_DB_HOST', 'analytics', true)) .toEqual('CUBEJS_DS_ANALYTICS_PRE_AGGREGATIONS_DB_HOST'); diff --git a/packages/cubejs-backend-shared/test/db_env_single.test.ts b/packages/cubejs-backend-shared/test/db_env_single.test.ts index adc04585701fb..b24e709bd2ce4 100644 --- a/packages/cubejs-backend-shared/test/db_env_single.test.ts +++ b/packages/cubejs-backend-shared/test/db_env_single.test.ts @@ -1038,12 +1038,12 @@ describe('Single datasources', () => { }); test('getEnv("fireboltAccount")', () => { - process.env.CUBEJS_FIREBOLT_ACCOUNT = "default1"; + process.env.CUBEJS_FIREBOLT_ACCOUNT = 'default1'; expect(getEnv('fireboltAccount', { dataSource: 'default' })).toEqual('default1'); expect(getEnv('fireboltAccount', { dataSource: 'postgres' })).toEqual('default1'); expect(getEnv('fireboltAccount', { dataSource: 'wrong' })).toEqual('default1'); - process.env.CUBEJS_FIREBOLT_ACCOUNT = "default2"; + process.env.CUBEJS_FIREBOLT_ACCOUNT = 'default2'; expect(getEnv('fireboltAccount', { dataSource: 'default' })).toEqual('default2'); expect(getEnv('fireboltAccount', { dataSource: 'postgres' })).toEqual('default2'); expect(getEnv('fireboltAccount', { dataSource: 'wrong' })).toEqual('default2'); diff --git a/packages/cubejs-backend-shared/test/disposedProxy.test.ts b/packages/cubejs-backend-shared/test/disposedProxy.test.ts index 3810bb3a11983..e82d3419f9764 100644 --- a/packages/cubejs-backend-shared/test/disposedProxy.test.ts +++ b/packages/cubejs-backend-shared/test/disposedProxy.test.ts @@ -43,7 +43,7 @@ describe('disposedProxy', () => { const proxy = disposedProxy('testProperty', 'test instance'); expect(() => 'someProperty' in proxy).toThrow( - "Cannot check property existence on test instance. " + + 'Cannot check property existence on test instance. ' + "The 'testProperty' has been cleaned up and is no longer available." ); }); @@ -52,7 +52,7 @@ describe('disposedProxy', () => { const proxy = disposedProxy('testProperty', 'test instance'); expect(() => Object.keys(proxy)).toThrow( - "Cannot enumerate properties on test instance. " + + 'Cannot enumerate properties on test instance. ' + "The 'testProperty' has been cleaned up and is no longer available." ); }); @@ -61,7 +61,7 @@ describe('disposedProxy', () => { const proxy = disposedProxy('testProperty', 'test instance'); expect(() => Object.getPrototypeOf(proxy)).toThrow( - "Cannot get prototype of test instance. " + + 'Cannot get prototype of test instance. ' + "The 'testProperty' has been cleaned up and is no longer available." ); }); diff --git a/packages/cubejs-backend-shared/test/http-utils.test.ts b/packages/cubejs-backend-shared/test/http-utils.test.ts index 50e08d1de80be..100bf338e0f72 100644 --- a/packages/cubejs-backend-shared/test/http-utils.test.ts +++ b/packages/cubejs-backend-shared/test/http-utils.test.ts @@ -86,6 +86,7 @@ describe('extractArchive', () => { // producer capable of recording a symlink emits — with the default 0 (MS-DOS) // the external-attributes field is formally DOS attribute bits and the unix // mode below is not meant to be read at all. + // eslint-disable-next-line no-bitwise cdh.writeUInt16LE((3 << 8) | 20, 4); cdh.writeUInt16LE(10, 6); // version needed cdh.writeUInt16LE(0, 10); // method: stored @@ -96,6 +97,7 @@ describe('extractArchive', () => { // External attributes carry the unix mode in the high 16 bits, which is how a // zip records a symlink (`0o120000`). `>>> 0` because the shift overflows into a // negative signed int32 otherwise. + // eslint-disable-next-line no-bitwise cdh.writeUInt32LE((((entry.mode ?? 0o100644) << 16) >>> 0), 38); cdh.writeUInt32LE(offset, 42); // relative offset of local header central.push(cdh, name); diff --git a/packages/cubejs-backend-shared/test/package.test.ts b/packages/cubejs-backend-shared/test/package.test.ts index 99c254b11c854..660f821c0c25d 100644 --- a/packages/cubejs-backend-shared/test/package.test.ts +++ b/packages/cubejs-backend-shared/test/package.test.ts @@ -10,5 +10,5 @@ test('isSslKey', () => { expect(isSslKey(`-----BEGIN RSA PRIVATE KEY-----\nAbcDEF\n-----END RSA PRIVATE KEY-----`)).toBe(true); expect(isSslKey(`-----BEGIN EC PRIVATE KEY-----\nAbcDEF\n-----END EC PRIVATE KEY-----`)).toBe(true); expect(isSslKey(`-----BEGIN PRIVATE KEY-----\nAbcDEF\n-----END PRIVATE KEY-----`)).toBe(false); - expect(isSslKey('./file.path')).toBe(false) -}) \ No newline at end of file + expect(isSslKey('./file.path')).toBe(false); +}); diff --git a/packages/cubejs-base-driver/package.json b/packages/cubejs-base-driver/package.json index e5a49a15b90c1..16c3d4efdfb41 100644 --- a/packages/cubejs-base-driver/package.json +++ b/packages/cubejs-base-driver/package.json @@ -18,9 +18,7 @@ "tsc": "tsc", "watch": "tsc -w", "test": "npm run unit && npm run integration", - "unit": "NODE_OPTIONS=--experimental-vm-modules jest --runInBand --coverage --verbose test/unit", - "lint": "eslint src/* test/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* test/* --ext .ts,.js" + "unit": "NODE_OPTIONS=--experimental-vm-modules jest --runInBand --coverage --verbose test/unit" }, "files": [ "README.md", @@ -45,9 +43,6 @@ "typescript": "~6.0.3" }, "license": "Apache-2.0", - "eslintConfig": { - "extends": "../cubejs-linter" - }, "publishConfig": { "access": "public" } diff --git a/packages/cubejs-base-driver/src/BaseDriver.ts b/packages/cubejs-base-driver/src/BaseDriver.ts index bdb95de93dc98..4e054f5587772 100644 --- a/packages/cubejs-base-driver/src/BaseDriver.ts +++ b/packages/cubejs-base-driver/src/BaseDriver.ts @@ -635,7 +635,7 @@ export abstract class BaseDriver implements DriverInterface { return Date.now(); } - public wrapQueryWithLimit(query: { query: string, limit: number}) { + public wrapQueryWithLimit(query: { query: string, limit: number }) { query.query = `SELECT * FROM (${query.query}) AS t LIMIT ${query.limit}`; } diff --git a/packages/cubejs-bigquery-driver/package.json b/packages/cubejs-bigquery-driver/package.json index 9d30aaa82408a..4c02bde60a225 100644 --- a/packages/cubejs-bigquery-driver/package.json +++ b/packages/cubejs-bigquery-driver/package.json @@ -17,9 +17,7 @@ "watch": "tsc -w", "test": "yarn integration", "integration": "npm run integration:bigquery", - "integration:bigquery": "jest --verbose dist/test", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:bigquery": "jest --verbose dist/test" }, "files": [ "dist/src", @@ -49,8 +47,5 @@ "license": "Apache-2.0", "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-cli/package.json b/packages/cubejs-cli/package.json index ebdf5b36a72ea..fd0e880627640 100644 --- a/packages/cubejs-cli/package.json +++ b/packages/cubejs-cli/package.json @@ -19,9 +19,7 @@ "tsc": "tsc", "watch": "tsc -w", "test": "npm run unit", - "unit": "jest dist/test", - "lint": "eslint src/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* --ext .ts,.js" + "unit": "jest dist/test" }, "files": [ "dist/src/*", @@ -64,8 +62,5 @@ "jest": "^29", "typescript": "~6.0.3" }, - "license": "Apache-2.0", - "eslintConfig": { - "extends": "../cubejs-linter" - } + "license": "Apache-2.0" } diff --git a/packages/cubejs-clickhouse-driver/package.json b/packages/cubejs-clickhouse-driver/package.json index f1896ca78b8df..c62680b29e513 100644 --- a/packages/cubejs-clickhouse-driver/package.json +++ b/packages/cubejs-clickhouse-driver/package.json @@ -21,8 +21,6 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "lint": "eslint src/* test/* --ext .ts", - "lint:fix": "eslint --fix src/* test/* --ext .ts", "unit": "NODE_OPTIONS=--experimental-vm-modules jest dist/test/unit", "integration": "NODE_OPTIONS=--experimental-vm-modules jest dist/test/integration", "integration:clickhouse": "NODE_OPTIONS=--experimental-vm-modules jest dist/test/integration" @@ -45,8 +43,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-client-core/package.json b/packages/cubejs-client-core/package.json index 4fd3f55717d8e..629f7d7258c62 100644 --- a/packages/cubejs-client-core/package.json +++ b/packages/cubejs-client-core/package.json @@ -49,9 +49,7 @@ "watch": "tsc -w", "test": "npm run unit", "unit": "vitest run --coverage", - "bench": "vitest bench", - "lint": "eslint src/* test/ --ext .ts,.js", - "lint:fix": "eslint --fix src/* test/ --ext .ts,js" + "bench": "vitest bench" }, "files": [ "dist", @@ -67,8 +65,5 @@ "@vitest/coverage-v8": "^4", "typescript": "~6.0.3", "vitest": "^4" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-client-dx/.eslintrc.js b/packages/cubejs-client-dx/.eslintrc.js deleted file mode 100644 index 947ccc6f5d58a..0000000000000 --- a/packages/cubejs-client-dx/.eslintrc.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = { - extends: 'airbnb-base', - plugins: [ - 'import' - ], - parser: '@babel/eslint-parser', - rules: { - 'max-classes-per-file': 0, - 'prefer-object-spread': 0, - 'import/no-unresolved': 0, - 'comma-dangle': 0, - 'no-console': 0, - 'arrow-parens': 0, - 'import/extensions': 0, - quotes: ['warn', 'single'], - 'no-prototype-builtins': 0, - 'class-methods-use-this': 0, - 'no-param-reassign': 0, - 'no-mixed-operators': 0, - 'no-else-return': 0, - 'prefer-promise-reject-errors': 0, - 'no-plusplus': 0, - 'no-await-in-loop': 0, - 'operator-linebreak': 0, - 'max-len': ['error', 120, 2, { - ignoreUrls: true, - ignoreComments: false, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - }], - 'no-trailing-spaces': ['warn', { skipBlankLines: true }], - 'no-unused-vars': ['warn'], - 'object-curly-newline': 0 - }, - // env: { - // 'jest/globals': true - // } -}; diff --git a/packages/cubejs-client-dx/.oxlintrc.json b/packages/cubejs-client-dx/.oxlintrc.json new file mode 100644 index 0000000000000..87af15c292170 --- /dev/null +++ b/packages/cubejs-client-dx/.oxlintrc.json @@ -0,0 +1,31 @@ +// Delta from the repo-root config. This package predates the shared linter config and +// its own ESLint setup pinned eslint-config-airbnb-base 13 while everything else was on +// 14; extending the root config normalises it onto 14. Only the divergences this +// package actually asked for are restated below. +{ + "$schema": "../../node_modules/oxlint/configuration_schema.json", + "extends": ["../../.oxlintrc.json"], + // env and ignorePatterns are not inherited through `extends` + "env": { + "node": true, + "es6": true + }, + "ignorePatterns": ["dist/", "lib/", "coverage/", "**/*.d.ts"], + "rules": { + "@stylistic/max-len": [ + "error", + 120, + 2, + { + "ignoreUrls": true, + "ignoreComments": false, + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true + } + ], + "import/prefer-default-export": "error", + "no-underscore-dangle": "error", + "no-useless-constructor": "error" + } +} diff --git a/packages/cubejs-client-dx/package.json b/packages/cubejs-client-dx/package.json index 4c8a6fb8903be..11ddbeb3d101c 100644 --- a/packages/cubejs-client-dx/package.json +++ b/packages/cubejs-client-dx/package.json @@ -14,9 +14,7 @@ "author": "Cube Dev, Inc.", "scripts": { "test": "npm run unit", - "unit": "jest --passWithNoTests", - "lint": "eslint src/*.js", - "lint:fix": "eslint --fix src/*.js" + "unit": "jest --passWithNoTests" }, "files": [ "src", @@ -27,14 +25,9 @@ "license": "MIT", "devDependencies": { "@babel/core": "^7.24.5", - "@babel/eslint-parser": "^7", "@babel/preset-env": "^7.24.5", "@types/jest": "^29", "babel-jest": "^29", - "eslint": "^7.21.0", - "eslint-config-airbnb-base": "^13.1.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^10.0.0", "jest": "^29" }, "publishConfig": { diff --git a/packages/cubejs-client-react/.eslintrc.js b/packages/cubejs-client-react/.eslintrc.js deleted file mode 100644 index eee476603c427..0000000000000 --- a/packages/cubejs-client-react/.eslintrc.js +++ /dev/null @@ -1,80 +0,0 @@ -module.exports = { - extends: 'airbnb', - plugins: ['react', 'jsx-a11y', 'import', '@typescript-eslint'], - parser: '@typescript-eslint/parser', - parserOptions: { - ecmaVersion: 2020, - sourceType: 'module', - ecmaFeatures: { jsx: true }, - }, - settings: { - 'import/resolver': { - node: { extensions: ['.js', '.jsx', '.ts', '.tsx'] }, - }, - }, - rules: { - // Handled by the compiler - 'no-undef': 0, - // Base rules replaced by their TypeScript-aware versions - 'no-unused-vars': 0, - '@typescript-eslint/no-unused-vars': ['error', { args: 'none', ignoreRestSiblings: true }], - 'no-use-before-define': 0, - '@typescript-eslint/no-use-before-define': 'error', - // The base rules count overload signatures as redeclarations - 'no-redeclare': 0, - '@typescript-eslint/no-redeclare': 'error', - 'no-dupe-class-members': 0, - '@typescript-eslint/no-dupe-class-members': 'error', - 'no-shadow': 0, - '@typescript-eslint/no-shadow': 'error', - 'object-curly-newline': 0, - 'react/jsx-no-bind': 0, - 'react/jsx-first-prop-new-line': 0, - 'react/jsx-indent-props': 0, - 'react/jsx-filename-extension': 0, - 'react/react-in-jsx-scope': 0, // remove when import React is ready - 'import/no-unresolved': 0, - 'react/jsx-props-no-spreading': 0, - 'comma-dangle': 0, - 'no-console': 0, - 'no-plusplus': 0, - 'import/prefer-default-export': 0, - 'import/no-named-as-default': 0, - 'import/no-named-as-default-member': 0, - 'arrow-parens': 0, - 'react/jsx-no-undef': 0, - 'react/jsx-tag-spacing': 0, - 'react/prefer-stateless-function': 0, - 'react/forbid-prop-types': 0, - 'react/prop-types': 0, - 'import/extensions': 0, - quotes: ['warn', 'single'], - 'no-prototype-builtins': 0, - 'class-methods-use-this': 0, - 'no-param-reassign': 0, - 'no-mixed-operators': 0, - 'no-else-return': 0, - 'react/static-property-placement': 0, - 'react/destructuring-assignment': 0, - 'max-len': [ - 'error', - 120, - 2, - { - ignoreUrls: true, - // The published JSDoc is prose copied into the declarations - ignoreComments: true, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - }, - ], - 'no-trailing-spaces': ['error', { skipBlankLines: true }], - 'react/sort-comp': [ - 1, - { - order: ['static-variables', 'static-methods', 'lifecycle', 'everything-else', 'render'], - }, - ], - }, -}; diff --git a/packages/cubejs-client-react/.oxlintrc.json b/packages/cubejs-client-react/.oxlintrc.json new file mode 100644 index 0000000000000..88722c03423d7 --- /dev/null +++ b/packages/cubejs-client-react/.oxlintrc.json @@ -0,0 +1,928 @@ +// eslint-config-airbnb (the React flavour) ported to oxlint, expressed as the delta +// from the repo-root config. Rules with no oxlint equivalent and not carried over: +// react/sort-comp, react/no-deprecated, react/no-typos, react/no-unused-state, +// react/no-access-state-in-setstate, and the PropTypes family (no-unused-prop-types, +// require-default-props, forbid-foreign-prop-types, default-props-match-prop-types) +// -- all legacy class-component rules, and this package is TS + hooks. +{ + "$schema": "../../node_modules/oxlint/configuration_schema.json", + "extends": [ + "../../.oxlintrc.json" + ], + "plugins": [ + "eslint", + "import", + "jsx-a11y", + "node", + "react", + "typescript", + "unicorn" + ], + "jsPlugins": [ + "@stylistic/eslint-plugin" + ], + "env": { + "node": true, + "browser": true, + "es6": true + }, + "ignorePatterns": [ + "dist/", + "lib/", + "coverage/", + "**/*.d.ts" + ], + "rules": { + "@stylistic/jsx-closing-bracket-location": [ + "error", + "line-aligned" + ], + "@stylistic/jsx-closing-tag-location": "error", + "@stylistic/jsx-curly-newline": [ + "error", + { + "multiline": "consistent", + "singleline": "consistent" + } + ], + "@stylistic/jsx-curly-spacing": [ + "error", + "never", + { + "allowMultiline": true + } + ], + "@stylistic/jsx-equals-spacing": [ + "error", + "never" + ], + "@stylistic/jsx-max-props-per-line": [ + "error", + { + "maximum": 1, + "when": "multiline" + } + ], + "@stylistic/jsx-one-expression-per-line": [ + "error", + { + "allow": "single-child" + } + ], + "@stylistic/jsx-quotes": [ + "error", + "prefer-double" + ], + "@stylistic/jsx-wrap-multilines": [ + "error", + { + "declaration": "parens-new-line", + "assignment": "parens-new-line", + "return": "parens-new-line", + "arrow": "parens-new-line", + "condition": "parens-new-line", + "logical": "parens-new-line", + "prop": "parens-new-line" + } + ], + "@stylistic/max-len": [ + "error", + 120, + 2, + { + "ignoreUrls": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true + } + ], + "@stylistic/no-trailing-spaces": [ + "error", + { + "skipBlankLines": true, + "ignoreComments": false + } + ], + "@stylistic/operator-linebreak": [ + "error", + "before", + { + "overrides": { + "=": "none" + } + } + ], + "@stylistic/type-annotation-spacing": "off", + "import/no-named-as-default": "off", + "import/no-named-as-default-member": "off", + "jsx-a11y/alt-text": [ + "error", + { + "elements": [ + "img", + "object", + "area", + "input[type=\"image\"]" + ], + "img": [], + "object": [], + "area": [], + "input[type=\"image\"]": [] + } + ], + "jsx-a11y/anchor-has-content": [ + "error", + { + "components": [] + } + ], + "jsx-a11y/anchor-is-valid": [ + "error", + { + "components": [ + "Link" + ], + "specialLink": [ + "to" + ], + "aspects": [ + "noHref", + "invalidHref", + "preferButton" + ] + } + ], + "jsx-a11y/aria-activedescendant-has-tabindex": "error", + "jsx-a11y/aria-props": "error", + "jsx-a11y/aria-proptypes": "error", + "jsx-a11y/aria-role": [ + "error", + { + "ignoreNonDOM": false + } + ], + "jsx-a11y/aria-unsupported-elements": "error", + "jsx-a11y/click-events-have-key-events": "error", + "jsx-a11y/control-has-associated-label": [ + "error", + { + "labelAttributes": [ + "label" + ], + "controlComponents": [], + "ignoreElements": [ + "audio", + "canvas", + "embed", + "input", + "textarea", + "tr", + "video" + ], + "ignoreRoles": [ + "grid", + "listbox", + "menu", + "menubar", + "radiogroup", + "row", + "tablist", + "toolbar", + "tree", + "treegrid" + ], + "depth": 5 + } + ], + "jsx-a11y/heading-has-content": [ + "error", + { + "components": [ + "" + ] + } + ], + "jsx-a11y/html-has-lang": "error", + "jsx-a11y/iframe-has-title": "error", + "jsx-a11y/img-redundant-alt": "error", + "jsx-a11y/interactive-supports-focus": "error", + "jsx-a11y/label-has-associated-control": [ + "error", + { + "labelComponents": [], + "labelAttributes": [], + "controlComponents": [], + "assert": "both", + "depth": 25 + } + ], + "jsx-a11y/lang": "error", + "jsx-a11y/media-has-caption": [ + "error", + { + "audio": [], + "video": [], + "track": [] + } + ], + "jsx-a11y/mouse-events-have-key-events": "error", + "jsx-a11y/no-access-key": "error", + "jsx-a11y/no-autofocus": [ + "error", + { + "ignoreNonDOM": true + } + ], + "jsx-a11y/no-distracting-elements": [ + "error", + { + "elements": [ + "marquee", + "blink" + ] + } + ], + "jsx-a11y/no-interactive-element-to-noninteractive-role": [ + "error", + { + "tr": [ + "none", + "presentation" + ] + } + ], + "jsx-a11y/no-noninteractive-element-interactions": [ + "error", + { + "handlers": [ + "onClick", + "onMouseDown", + "onMouseUp", + "onKeyPress", + "onKeyDown", + "onKeyUp" + ] + } + ], + "jsx-a11y/no-noninteractive-element-to-interactive-role": [ + "error", + { + "ul": [ + "listbox", + "menu", + "menubar", + "radiogroup", + "tablist", + "tree", + "treegrid" + ], + "ol": [ + "listbox", + "menu", + "menubar", + "radiogroup", + "tablist", + "tree", + "treegrid" + ], + "li": [ + "menuitem", + "option", + "row", + "tab", + "treeitem" + ], + "table": [ + "grid" + ], + "td": [ + "gridcell" + ] + } + ], + "jsx-a11y/no-noninteractive-tabindex": [ + "error", + { + "tags": [], + "roles": [ + "tabpanel" + ] + } + ], + "jsx-a11y/no-redundant-roles": "error", + "jsx-a11y/no-static-element-interactions": [ + "error", + { + "handlers": [ + "onClick", + "onMouseDown", + "onMouseUp", + "onKeyPress", + "onKeyDown", + "onKeyUp" + ] + } + ], + "jsx-a11y/role-has-required-aria-props": "error", + "jsx-a11y/role-supports-aria-props": "error", + "jsx-a11y/scope": "error", + "jsx-a11y/tabindex-no-positive": "error", + "max-classes-per-file": [ + "error", + 1 + ], + "no-await-in-loop": "error", + "no-empty-function": [ + "error", + { + "allow": [ + "arrowFunctions", + "functions", + "methods" + ] + } + ], + "no-undef": "off", + "no-underscore-dangle": [ + "error", + { + "allow": [ + "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__" + ], + "allowAfterThis": false, + "allowAfterSuper": false, + "enforceInMethodNames": true, + "allowAfterThisConstructor": false, + "allowFunctionParams": true, + "enforceInClassFields": false, + "allowInArrayDestructuring": true, + "allowInObjectDestructuring": true + } + ], + "no-unused-vars": [ + "error", + { + "args": "none", + "ignoreRestSiblings": true + } + ], + "no-use-before-define": "error", + "no-useless-constructor": "error", + "prefer-object-spread": "error", + "prefer-promise-reject-errors": [ + "error", + { + "allowEmptyReject": true + } + ], + "react/button-has-type": [ + "error", + { + "button": true, + "submit": true, + "reset": false + } + ], + "react/jsx-boolean-value": [ + "error", + "never", + { + "always": [] + } + ], + "react/jsx-curly-brace-presence": [ + "error", + { + "props": "never", + "children": "never" + } + ], + "react/jsx-fragments": [ + "error", + "syntax" + ], + "react/jsx-no-comment-textnodes": "error", + "react/jsx-no-duplicate-props": "error", + "react/jsx-no-target-blank": [ + "error", + { + "enforceDynamicLinks": "always", + "links": true, + "forms": false + } + ], + "react/jsx-pascal-case": [ + "error", + { + "allowAllCaps": true, + "ignore": [] + } + ], + "react/no-array-index-key": "error", + "react/no-children-prop": "error", + "react/no-danger": "warn", + "react/no-danger-with-children": "error", + "react/no-did-update-set-state": "error", + "react/no-find-dom-node": "error", + "react/no-is-mounted": "error", + "react/no-redundant-should-component-update": "error", + "react/no-render-return-value": "error", + "react/no-string-refs": "error", + "react/no-this-in-sfc": "error", + "react/no-unescaped-entities": "error", + "react/no-unknown-property": "error", + "react/no-will-update-set-state": "error", + "react/prefer-es6-class": [ + "error", + "always" + ], + "react/require-render-return": "error", + "react/self-closing-comp": "error", + "react/state-in-constructor": [ + "error", + "always" + ], + "react/style-prop-object": "error", + "react/void-dom-elements-no-children": "error", + "typescript/prefer-as-const": "off", + "typescript/prefer-namespace-keyword": "off", + "typescript/triple-slash-reference": "off", + "@stylistic/indent": [ + "error", + 2, + { + "SwitchCase": 1, + "VariableDeclarator": 1, + "outerIIFEBody": 1, + "FunctionDeclaration": { + "parameters": 1, + "body": 1 + }, + "FunctionExpression": { + "parameters": 1, + "body": 1 + }, + "CallExpression": { + "arguments": 1 + }, + "ArrayExpression": 1, + "ObjectExpression": 1, + "ImportDeclaration": 1, + "flatTernaryExpressions": false, + "ignoredNodes": [], + "ignoreComments": false, + "offsetTernaryExpressions": false + } + ] + }, + "overrides": [ + { + "files": [ + "**/*.ts", + "**/*.tsx" + ], + "rules": { + "@stylistic/jsx-closing-bracket-location": [ + "error", + "line-aligned" + ], + "@stylistic/jsx-closing-tag-location": "error", + "@stylistic/jsx-curly-newline": [ + "error", + { + "multiline": "consistent", + "singleline": "consistent" + } + ], + "@stylistic/jsx-curly-spacing": [ + "error", + "never", + { + "allowMultiline": true + } + ], + "@stylistic/jsx-equals-spacing": [ + "error", + "never" + ], + "@stylistic/jsx-max-props-per-line": [ + "error", + { + "maximum": 1, + "when": "multiline" + } + ], + "@stylistic/jsx-one-expression-per-line": [ + "error", + { + "allow": "single-child" + } + ], + "@stylistic/jsx-quotes": [ + "error", + "prefer-double" + ], + "@stylistic/jsx-wrap-multilines": [ + "error", + { + "declaration": "parens-new-line", + "assignment": "parens-new-line", + "return": "parens-new-line", + "arrow": "parens-new-line", + "condition": "parens-new-line", + "logical": "parens-new-line", + "prop": "parens-new-line" + } + ], + "@stylistic/max-len": [ + "error", + 120, + 2, + { + "ignoreUrls": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true + } + ], + "@stylistic/no-trailing-spaces": [ + "error", + { + "skipBlankLines": true, + "ignoreComments": false + } + ], + "@stylistic/operator-linebreak": [ + "error", + "before", + { + "overrides": { + "=": "none" + } + } + ], + "@stylistic/type-annotation-spacing": "off", + "constructor-super": "error", + "getter-return": [ + "error", + { + "allowImplicit": true + } + ], + "import/no-named-as-default": "off", + "import/no-named-as-default-member": "off", + "jsx-a11y/alt-text": [ + "error", + { + "elements": [ + "img", + "object", + "area", + "input[type=\"image\"]" + ], + "img": [], + "object": [], + "area": [], + "input[type=\"image\"]": [] + } + ], + "jsx-a11y/anchor-has-content": [ + "error", + { + "components": [] + } + ], + "jsx-a11y/anchor-is-valid": [ + "error", + { + "components": [ + "Link" + ], + "specialLink": [ + "to" + ], + "aspects": [ + "noHref", + "invalidHref", + "preferButton" + ] + } + ], + "jsx-a11y/aria-activedescendant-has-tabindex": "error", + "jsx-a11y/aria-props": "error", + "jsx-a11y/aria-proptypes": "error", + "jsx-a11y/aria-role": [ + "error", + { + "ignoreNonDOM": false + } + ], + "jsx-a11y/aria-unsupported-elements": "error", + "jsx-a11y/click-events-have-key-events": "error", + "jsx-a11y/control-has-associated-label": [ + "error", + { + "labelAttributes": [ + "label" + ], + "controlComponents": [], + "ignoreElements": [ + "audio", + "canvas", + "embed", + "input", + "textarea", + "tr", + "video" + ], + "ignoreRoles": [ + "grid", + "listbox", + "menu", + "menubar", + "radiogroup", + "row", + "tablist", + "toolbar", + "tree", + "treegrid" + ], + "depth": 5 + } + ], + "jsx-a11y/heading-has-content": [ + "error", + { + "components": [ + "" + ] + } + ], + "jsx-a11y/html-has-lang": "error", + "jsx-a11y/iframe-has-title": "error", + "jsx-a11y/img-redundant-alt": "error", + "jsx-a11y/interactive-supports-focus": "error", + "jsx-a11y/label-has-associated-control": [ + "error", + { + "labelComponents": [], + "labelAttributes": [], + "controlComponents": [], + "assert": "both", + "depth": 25 + } + ], + "jsx-a11y/lang": "error", + "jsx-a11y/media-has-caption": [ + "error", + { + "audio": [], + "video": [], + "track": [] + } + ], + "jsx-a11y/mouse-events-have-key-events": "error", + "jsx-a11y/no-access-key": "error", + "jsx-a11y/no-autofocus": [ + "error", + { + "ignoreNonDOM": true + } + ], + "jsx-a11y/no-distracting-elements": [ + "error", + { + "elements": [ + "marquee", + "blink" + ] + } + ], + "jsx-a11y/no-interactive-element-to-noninteractive-role": [ + "error", + { + "tr": [ + "none", + "presentation" + ] + } + ], + "jsx-a11y/no-noninteractive-element-interactions": [ + "error", + { + "handlers": [ + "onClick", + "onMouseDown", + "onMouseUp", + "onKeyPress", + "onKeyDown", + "onKeyUp" + ] + } + ], + "jsx-a11y/no-noninteractive-element-to-interactive-role": [ + "error", + { + "ul": [ + "listbox", + "menu", + "menubar", + "radiogroup", + "tablist", + "tree", + "treegrid" + ], + "ol": [ + "listbox", + "menu", + "menubar", + "radiogroup", + "tablist", + "tree", + "treegrid" + ], + "li": [ + "menuitem", + "option", + "row", + "tab", + "treeitem" + ], + "table": [ + "grid" + ], + "td": [ + "gridcell" + ] + } + ], + "jsx-a11y/no-noninteractive-tabindex": [ + "error", + { + "tags": [], + "roles": [ + "tabpanel" + ] + } + ], + "jsx-a11y/no-redundant-roles": "error", + "jsx-a11y/no-static-element-interactions": [ + "error", + { + "handlers": [ + "onClick", + "onMouseDown", + "onMouseUp", + "onKeyPress", + "onKeyDown", + "onKeyUp" + ] + } + ], + "jsx-a11y/role-has-required-aria-props": "error", + "jsx-a11y/role-supports-aria-props": "error", + "jsx-a11y/scope": "error", + "jsx-a11y/tabindex-no-positive": "error", + "max-classes-per-file": [ + "error", + 1 + ], + "no-await-in-loop": "error", + "no-const-assign": "error", + "no-dupe-class-members": "error", + "no-dupe-keys": "error", + "no-empty-function": [ + "error", + { + "allow": [ + "arrowFunctions", + "functions", + "methods" + ] + } + ], + "no-func-assign": "error", + "no-new-native-nonconstructor": "error", + "no-obj-calls": "error", + "no-redeclare": "error", + "no-this-before-super": "error", + "no-undef": "off", + "no-underscore-dangle": [ + "error", + { + "allow": [ + "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__" + ], + "allowAfterThis": false, + "allowAfterSuper": false, + "enforceInMethodNames": true, + "allowAfterThisConstructor": false, + "allowFunctionParams": true, + "enforceInClassFields": false, + "allowInArrayDestructuring": true, + "allowInObjectDestructuring": true + } + ], + "no-unreachable": "error", + "no-unsafe-negation": "error", + "no-unused-vars": [ + "error", + { + "args": "none", + "ignoreRestSiblings": true + } + ], + "no-use-before-define": "error", + "no-useless-constructor": "error", + "prefer-object-spread": "error", + "prefer-promise-reject-errors": [ + "error", + { + "allowEmptyReject": true + } + ], + "react/button-has-type": [ + "error", + { + "button": true, + "submit": true, + "reset": false + } + ], + "react/jsx-boolean-value": [ + "error", + "never", + { + "always": [] + } + ], + "react/jsx-curly-brace-presence": [ + "error", + { + "props": "never", + "children": "never" + } + ], + "react/jsx-fragments": [ + "error", + "syntax" + ], + "react/jsx-no-comment-textnodes": "error", + "react/jsx-no-duplicate-props": "error", + "react/jsx-no-target-blank": [ + "error", + { + "enforceDynamicLinks": "always", + "links": true, + "forms": false + } + ], + "react/jsx-pascal-case": [ + "error", + { + "allowAllCaps": true, + "ignore": [] + } + ], + "react/no-array-index-key": "error", + "react/no-children-prop": "error", + "react/no-danger": "warn", + "react/no-danger-with-children": "error", + "react/no-did-update-set-state": "error", + "react/no-find-dom-node": "error", + "react/no-is-mounted": "error", + "react/no-redundant-should-component-update": "error", + "react/no-render-return-value": "error", + "react/no-string-refs": "error", + "react/no-this-in-sfc": "error", + "react/no-unescaped-entities": "error", + "react/no-unknown-property": "error", + "react/no-will-update-set-state": "error", + "react/prefer-es6-class": [ + "error", + "always" + ], + "react/require-render-return": "error", + "react/self-closing-comp": "error", + "react/state-in-constructor": [ + "error", + "always" + ], + "react/style-prop-object": "error", + "react/void-dom-elements-no-children": "error", + "typescript/explicit-member-accessibility": "off", + "typescript/prefer-as-const": "off", + "typescript/prefer-namespace-keyword": "off", + "typescript/triple-slash-reference": "off", + "valid-typeof": [ + "error", + { + "requireStringLiterals": true + } + ] + } + } + ] +} diff --git a/packages/cubejs-client-react/package.json b/packages/cubejs-client-react/package.json index dd9c84c1f6222..013b017920227 100644 --- a/packages/cubejs-client-react/package.json +++ b/packages/cubejs-client-react/package.json @@ -16,9 +16,7 @@ "scripts": { "build": "tsc --build", "tsc": "tsc --build", - "watch": "tsc --build --watch", - "lint": "eslint src --ext .ts,.tsx", - "lint:fix": "eslint --fix src --ext .ts,.tsx" + "watch": "tsc --build --watch" }, "files": [ "src", @@ -34,15 +32,6 @@ "@babel/core": "^7.24.5", "@types/ramda": "^0.27.40", "@types/react": "^16.9.41", - "@typescript-eslint/eslint-plugin": "^8.46.0", - "@typescript-eslint/parser": "^8.46.0", - "eslint": "^8.57.1", - "eslint-config-airbnb": "^18.1.0", - "eslint-config-airbnb-base": "^14.2.1", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-node": "^10.0.0", - "eslint-plugin-react": "^7.20.0", "typescript": "~6.0.3" }, "peerDependencies": { diff --git a/packages/cubejs-client-ws-transport/package.json b/packages/cubejs-client-ws-transport/package.json index 153a9e68f28e3..319e7fd90d5a1 100644 --- a/packages/cubejs-client-ws-transport/package.json +++ b/packages/cubejs-client-ws-transport/package.json @@ -14,9 +14,7 @@ "scripts": { "build": "npm run tsc", "tsc": "tsc && rm -rf temp", - "watch": "tsc -w", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "watch": "tsc -w" }, "dependencies": { "@babel/runtime": "^7.13.9", @@ -40,8 +38,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-crate-driver/package.json b/packages/cubejs-crate-driver/package.json index eb8eaa2ded2e3..f8a9d437c01d1 100644 --- a/packages/cubejs-crate-driver/package.json +++ b/packages/cubejs-crate-driver/package.json @@ -24,9 +24,7 @@ "test": "yarn integration", "integration": "npm run integration:crate", "integration:crate": "jest --verbose dist/test", - "unit": "jest --forceExit --verbose dist/test/CrateDriver.unit.test.js", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "unit": "jest --forceExit --verbose dist/test/CrateDriver.unit.test.js" }, "dependencies": { "@cubejs-backend/postgres-driver": "1.7.35", @@ -46,8 +44,5 @@ }, "jest": { "testEnvironment": "node" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-cubestore-driver/package.json b/packages/cubejs-cubestore-driver/package.json index 2fde2ab741c05..b919f6b7c5669 100644 --- a/packages/cubejs-cubestore-driver/package.json +++ b/packages/cubejs-cubestore-driver/package.json @@ -22,8 +22,6 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "lint": "eslint src/*.ts test/*.ts", - "lint:fix": "eslint --fix src/*.ts test/*.ts", "unit": "jest --coverage" }, "dependencies": { @@ -52,8 +50,5 @@ "license": "Apache-2.0", "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-databricks-jdbc-driver/package.json b/packages/cubejs-databricks-jdbc-driver/package.json index 41d3fba745738..4721f574692c6 100644 --- a/packages/cubejs-databricks-jdbc-driver/package.json +++ b/packages/cubejs-databricks-jdbc-driver/package.json @@ -20,8 +20,6 @@ "watch": "tsc -w", "test": "npm run unit-tests", "unit-tests": "NODE_OPTIONS=--experimental-vm-modules jest dist/test --forceExit", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts", "postinstall": "node bin/post-install" }, "files": [ @@ -49,8 +47,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-databricks-jdbc-driver/src/DatabricksDriver.ts b/packages/cubejs-databricks-jdbc-driver/src/DatabricksDriver.ts index 95a5f4b452099..63334ab110097 100644 --- a/packages/cubejs-databricks-jdbc-driver/src/DatabricksDriver.ts +++ b/packages/cubejs-databricks-jdbc-driver/src/DatabricksDriver.ts @@ -522,7 +522,7 @@ export class DatabricksDriver extends JDBCDriver { /** * Returns the list of the tables for the specified schema. */ - public async getTablesQuery(schemaName: string): Promise<{ 'table_name': string }[]> { + public async getTablesQuery(schemaName: string): Promise<{ table_name: string }[]> { const response = await this.query( `SHOW TABLES IN ${this.getSchemaFullName(schemaName)}`, [], @@ -701,7 +701,7 @@ export class DatabricksDriver extends JDBCDriver { const result = []; // eslint-disable-next-line camelcase - const response = await this.query<{col_name: string; data_type: string}>( + const response = await this.query<{ col_name: string; data_type: string }>( `DESCRIBE QUERY ${sql}`, params || [] ); diff --git a/packages/cubejs-databricks-jdbc-driver/src/DatabricksQuery.ts b/packages/cubejs-databricks-jdbc-driver/src/DatabricksQuery.ts index 2516c4a74c5ed..10034f57d0b79 100644 --- a/packages/cubejs-databricks-jdbc-driver/src/DatabricksQuery.ts +++ b/packages/cubejs-databricks-jdbc-driver/src/DatabricksQuery.ts @@ -221,7 +221,7 @@ export class DatabricksQuery extends BaseQuery { ' from_utc_timestamp({{ start }}, \'UTC\'), from_utc_timestamp({{ end }}, \'UTC\'), INTERVAL {{ granularity }}\n' + ' )) AS d)'; templates.statements.generated_time_series_with_cte_range_source = - 'SELECT d AS date_from,\n' + + 'SELECT d AS date_from,\n' + '(d + INTERVAL {{ granularity }}) - INTERVAL 1 MILLISECOND AS date_to\n' + 'FROM {{ range_source }}\n' + 'LATERAL VIEW explode(\n' + diff --git a/packages/cubejs-databricks-jdbc-driver/test/DatabricksDriver.test.ts b/packages/cubejs-databricks-jdbc-driver/test/DatabricksDriver.test.ts index a251e396d41e4..d6daef3cb1f62 100644 --- a/packages/cubejs-databricks-jdbc-driver/test/DatabricksDriver.test.ts +++ b/packages/cubejs-databricks-jdbc-driver/test/DatabricksDriver.test.ts @@ -25,7 +25,7 @@ jest.mock('@aws-sdk/s3-request-presigner', () => ({ })); jest.spyOn(ContainerClient.prototype, 'listBlobsFlat').mockImplementation( - jest.fn().mockReturnValue([{name: 'product.csv/test.csv'}]) + jest.fn().mockReturnValue([{ name: 'product.csv/test.csv' }]) ); jest.spyOn(BlobServiceClient.prototype, 'getUserDelegationKey').mockImplementation( jest.fn().mockReturnValue('mockKey') @@ -33,8 +33,8 @@ jest.spyOn(BlobServiceClient.prototype, 'getUserDelegationKey').mockImplementati describe('DatabricksDriver', () => { const mockTableName = 'product'; - const mockSql = 'SELECT * FROM ' + mockTableName; - const mockParams = [1] + const mockSql = `SELECT * FROM ${mockTableName}`; + const mockParams = [1]; const mockOptions: UnloadOptions = { maxFileSize: 3, query: { @@ -46,15 +46,15 @@ describe('DatabricksDriver', () => { const mockUnloadWithSql = jest.fn().mockResolvedValue('mockType'); beforeAll(() => { - process.env.CUBEJS_DB_DATABRICKS_ACCEPT_POLICY='true'; - process.env.CUBEJS_DB_DATABRICKS_URL='jdbc:databricks://adb-123456789.10.azuredatabricks.net:443'; - process.env.CUBEJS_DB_EXPORT_BUCKET_TYPE='azure'; - process.env.CUBEJS_DB_EXPORT_BUCKET='wasbs://cube-export@mock.blob.core.windows.net'; - process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_KEY='azure-key'; - process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_TENANT_ID='azure-tenant-id'; - process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_CLIENT_ID='azure-client-id'; - process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_CLIENT_SECRET='azure-client-sceret' - process.env.CUBEJS_DB_DATABRICKS_TOKEN='token'; + process.env.CUBEJS_DB_DATABRICKS_ACCEPT_POLICY = 'true'; + process.env.CUBEJS_DB_DATABRICKS_URL = 'jdbc:databricks://adb-123456789.10.azuredatabricks.net:443'; + process.env.CUBEJS_DB_EXPORT_BUCKET_TYPE = 'azure'; + process.env.CUBEJS_DB_EXPORT_BUCKET = 'wasbs://cube-export@mock.blob.core.windows.net'; + process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_KEY = 'azure-key'; + process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_TENANT_ID = 'azure-tenant-id'; + process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_CLIENT_ID = 'azure-client-id'; + process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_CLIENT_SECRET = 'azure-client-sceret'; + process.env.CUBEJS_DB_DATABRICKS_TOKEN = 'token'; }); afterEach(() => { @@ -71,7 +71,7 @@ describe('DatabricksDriver', () => { }); test('should get signed URLs of unloaded csv files by azure client secret', async () => { - process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_KEY=''; + process.env.CUBEJS_DB_EXPORT_BUCKET_AZURE_KEY = ''; databricksDriver = new DatabricksDriver(); databricksDriver['unloadWithSql'] = mockUnloadWithSql; diff --git a/packages/cubejs-dbt-schema-extension/package.json b/packages/cubejs-dbt-schema-extension/package.json index 283dc63c4c440..a045e3396cd2c 100644 --- a/packages/cubejs-dbt-schema-extension/package.json +++ b/packages/cubejs-dbt-schema-extension/package.json @@ -20,9 +20,7 @@ "scripts": { "build": "rm -rf dist && npm run tsc", "tsc": "tsc", - "watch": "tsc -w", - "lint": "eslint src/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* --ext .ts,.js" + "watch": "tsc -w" }, "dependencies": { "@cubejs-backend/schema-compiler": "1.7.35", @@ -39,9 +37,6 @@ "stream-to-array": "^2.3.0", "typescript": "~6.0.3" }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cubejs-dremio-driver/package.json b/packages/cubejs-dremio-driver/package.json index 675ad61830b2b..b3cc374cb27cf 100644 --- a/packages/cubejs-dremio-driver/package.json +++ b/packages/cubejs-dremio-driver/package.json @@ -18,9 +18,7 @@ "test": "yarn integration", "unit": "jest --verbose dist/test/unit", "integration": "npm run integration:dremio", - "integration:dremio": "jest --verbose dist/test", - "lint": "eslint driver/*.js", - "lint:fix": "eslint driver/*.js" + "integration:dremio": "jest --verbose dist/test" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -38,8 +36,5 @@ "license": "Apache-2.0", "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-dremio-driver/test/DremioQuery.test.ts b/packages/cubejs-dremio-driver/test/DremioQuery.test.ts index 618ab45415d29..f9583d1777c75 100644 --- a/packages/cubejs-dremio-driver/test/DremioQuery.test.ts +++ b/packages/cubejs-dremio-driver/test/DremioQuery.test.ts @@ -8,7 +8,6 @@ const prepareCompiler = (content: string) => originalPrepareCompiler({ }); describe('DremioQuery', () => { - jest.setTimeout(10 * 60 * 1000); // Engine needs to spin up const { compiler, joinGraph, cubeEvaluator } = prepareCompiler( diff --git a/packages/cubejs-druid-driver/package.json b/packages/cubejs-druid-driver/package.json index e74b491a877d5..ff5d3904f04ce 100644 --- a/packages/cubejs-druid-driver/package.json +++ b/packages/cubejs-druid-driver/package.json @@ -19,9 +19,7 @@ "tsc": "tsc", "watch": "tsc -w", "integration": "jest dist/test/*.js", - "integration:druid": "jest dist/test/*.js", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:druid": "jest dist/test/*.js" }, "files": [ "README.md", @@ -43,8 +41,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-duckdb-driver/package.json b/packages/cubejs-duckdb-driver/package.json index 03926dcf5a7ad..08cb9668a6321 100644 --- a/packages/cubejs-duckdb-driver/package.json +++ b/packages/cubejs-duckdb-driver/package.json @@ -23,9 +23,7 @@ "watch": "tsc -w", "unit": "jest --verbose dist/test/unit", "integration": "npm run integration:duckdb", - "integration:duckdb": "jest --verbose dist/test", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:duckdb": "jest --verbose dist/test" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -44,8 +42,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-firebolt-driver/package.json b/packages/cubejs-firebolt-driver/package.json index 5258bc6e9441d..d64a1d8e5e5b7 100644 --- a/packages/cubejs-firebolt-driver/package.json +++ b/packages/cubejs-firebolt-driver/package.json @@ -23,9 +23,7 @@ "watch": "tsc -w", "test": "yarn integration", "integration": "npm run integration:firebolt", - "integration:firebolt": "jest --verbose dist/test --runInBand", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:firebolt": "jest --verbose dist/test --runInBand" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -49,8 +47,5 @@ "setupFiles": [ "./test/test-env.js" ] - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-firebolt-driver/src/FireboltDriver.ts b/packages/cubejs-firebolt-driver/src/FireboltDriver.ts index 649f724a658a7..34dfcfd1945c1 100644 --- a/packages/cubejs-firebolt-driver/src/FireboltDriver.ts +++ b/packages/cubejs-firebolt-driver/src/FireboltDriver.ts @@ -306,7 +306,7 @@ export class FireboltDriver extends BaseDriver implements DriverInterface { /* eslint-disable camelcase */ public async getTablesQuery(): Promise< { table_name?: string; TABLE_NAME?: string }[] - > { + > { const data = await this.query<{ table_name: string }>('SHOW TABLES', []); return data.map(({ table_name }) => ({ table_name })); } diff --git a/packages/cubejs-hive-driver/package.json b/packages/cubejs-hive-driver/package.json index cc2631e4671a1..ba37c6fe60ddf 100644 --- a/packages/cubejs-hive-driver/package.json +++ b/packages/cubejs-hive-driver/package.json @@ -12,10 +12,7 @@ "node": ">=20.0.0" }, "main": "src/HiveDriver.js", - "scripts": { - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" - }, + "scripts": {}, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", "@cubejs-backend/shared": "1.7.35", @@ -34,8 +31,5 @@ }, "jest": { "testEnvironment": "node" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-jdbc-driver/package.json b/packages/cubejs-jdbc-driver/package.json index e624207bcd9dc..9992f946cae1b 100644 --- a/packages/cubejs-jdbc-driver/package.json +++ b/packages/cubejs-jdbc-driver/package.json @@ -17,9 +17,7 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "unit": "jest --verbose dist/test/unit", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "unit": "jest --verbose dist/test/unit" }, "files": [ "dist/src", @@ -35,9 +33,6 @@ "java": "^0.18.0" }, "license": "Apache-2.0", - "eslintConfig": { - "extends": "../cubejs-linter" - }, "jest": { "testEnvironment": "node" }, diff --git a/packages/cubejs-jdbc-driver/src/JDBCDriver.ts b/packages/cubejs-jdbc-driver/src/JDBCDriver.ts index 3b4736e7c523a..c2a4e3ccf5224 100644 --- a/packages/cubejs-jdbc-driver/src/JDBCDriver.ts +++ b/packages/cubejs-jdbc-driver/src/JDBCDriver.ts @@ -252,7 +252,7 @@ export class JDBCDriver extends BaseDriver { public async query(query: string, values: unknown[]): Promise { const queryWithParams = this.prepareQueryWithParams(query, values); - const cancelObj: {cancel?: Function} = {}; + const cancelObj: { cancel?: Function } = {}; const promise = this.queryPromised(queryWithParams, cancelObj, this.prepareConnectionQueries()); (promise as CancelablePromise).cancel = () => cancelObj.cancel && cancelObj.cancel() || @@ -298,7 +298,7 @@ export class JDBCDriver extends BaseDriver { try { const query = this.prepareQueryWithParams(sql, values); - const cancelObj: {cancel?: Function} = {}; + const cancelObj: { cancel?: Function } = {}; const createStatement = promisify(conn.createStatement.bind(conn)); const statement = await createStatement(); @@ -314,10 +314,10 @@ export class JDBCDriver extends BaseDriver { ( err: unknown, res: { - labels: string[], - types: number[], - rows: { next: nextFn }, - }, + labels: string[], + types: number[], + rows: { next: nextFn }, + }, ) => { if (err) { reject(err); diff --git a/packages/cubejs-ksql-driver/package.json b/packages/cubejs-ksql-driver/package.json index 4b79d6120fcd0..0b96b84cdd8db 100644 --- a/packages/cubejs-ksql-driver/package.json +++ b/packages/cubejs-ksql-driver/package.json @@ -21,9 +21,7 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "unit": "jest --verbose dist/test/unit", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "unit": "jest --verbose dist/test/unit" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -37,9 +35,6 @@ "publishConfig": { "access": "public" }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "devDependencies": { "@cubejs-backend/linter": "1.7.35", "@types/jest": "^29", diff --git a/packages/cubejs-linter/.oxlintrc.json b/packages/cubejs-linter/.oxlintrc.json new file mode 100644 index 0000000000000..7335782f87b7c --- /dev/null +++ b/packages/cubejs-linter/.oxlintrc.json @@ -0,0 +1,58 @@ +// Cube's shared oxlint configuration, extended by the repo-root .oxlintrc.json. +// +// airbnb-base.json is the mechanical port of the airbnb-base + typescript-eslint rule set +// this package used to export as an ESLint config. Everything in this file is a deliberate +// departure from that port, with the reason stated. +// +// Note that oxlint's `extends` merges `rules`, `plugins`, `jsPlugins` and `overrides`, but +// NOT `env` or `ignorePatterns` -- those are per-config-file and have to be restated by +// whoever extends this. An `overrides` entry's own `env` does carry across, though. +{ + "$schema": "../../node_modules/oxlint/configuration_schema.json", + "extends": ["./airbnb-base.json"], + "rules": { + // eslint-plugin-import never had a TypeScript resolver configured here + // (import/no-unresolved was off), so it could not resolve most imports and these four + // silently passed. oxlint resolves natively, which turns them on for the first time. + // Enabling them is separate work: as of this migration they report 173 dependency + // cycles, 366 hits on the `import R from 'ramda'; R.unnest()` idiom, and 2 genuine + // duplicate exports in client-core. + "import/no-cycle": "off", + "import/no-named-as-default": "off", + "import/no-named-as-default-member": "off", + "import/export": "off", + // Two additions to what the ESLint config asked for, both about what `--fix` does to + // strings that contain quotes. `avoidEscape` is airbnb's default and was lost when this + // package downgraded `quotes` to a warning. `allowTemplateLiterals` matters more: the + // codebase uses backticks deliberately for SQL and JSON literals, and "fixing" those + // into single quotes turns e.g. the driver parameter-escaping tests into backslash + // soup -- which is precisely the code where quoting has to stay readable. + "@stylistic/quotes": [ + "warn", + "single", + { "avoidEscape": true, "allowTemplateLiterals": "always" } + ], + // oxlint's built-in fallthrough comment pattern is stricter than ESLint's default and + // rejected the existing `// falls through, trick from 90x ...` comments. + "no-fallthrough": ["error", { "commentPattern": "falls?\\s?through" }] + }, + "overrides": [ + { + // oxlint honours neither `/* globals ... */` nor `/* eslint-env jest */`, which is how + // the .js test suites used to declare the jest globals. + "files": [ + "**/test/**", + "**/tests/**", + "**/__mocks__/**", + "**/*.test.js", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.spec.ts", + "**/*.integration.js", + "**/*.integration.ts" + ], + "env": { "jest": true } + } + ] +} diff --git a/packages/cubejs-linter/airbnb-base.json b/packages/cubejs-linter/airbnb-base.json new file mode 100644 index 0000000000000..32533ddaffade --- /dev/null +++ b/packages/cubejs-linter/airbnb-base.json @@ -0,0 +1,692 @@ +// GENERATED PORT -- do not hand-edit. This is the airbnb-base + typescript-eslint rule +// set that @cubejs-backend/linter used to export as an ESLint config, mapped 1:1 onto +// oxlint. Deliberate departures from it live in .oxlintrc.json, which extends this file. +// +// Rules with no oxlint or @stylistic equivalent, deliberately not carried over: +// +// camelcase, no-undef-init, lines-around-directive, strict +// no-restricted-syntax -- the ForInStatement ban; guard-for-in, no-labels and +// no-with (all still enabled) cover the rest of it +// consistent-return, dot-notation, no-return-await +// -- exist only as typescript/* rules needing options.typeAware +// import/order, import/no-extraneous-dependencies, import/no-useless-path-segments +// no-dupe-args, no-octal, no-octal-escape +// -- parse errors under ESM/strict, so unreachable in practice +{ + "plugins": [ + "eslint", + "import", + "node", + "typescript", + "unicorn" + ], + "jsPlugins": [ + "@stylistic/eslint-plugin" + ], + "categories": { + "correctness": "off" + }, + "env": { + "node": true, + "es6": true + }, + "rules": { + "@stylistic/array-bracket-spacing": [ + "error", + "never" + ], + "@stylistic/arrow-spacing": [ + "error", + { + "before": true, + "after": true + } + ], + "@stylistic/block-spacing": [ + "error", + "always" + ], + "@stylistic/brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "@stylistic/comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "@stylistic/comma-style": [ + "error", + "last", + { + "exceptions": { + "ArrayExpression": false, + "ArrayPattern": false, + "ArrowFunctionExpression": false, + "CallExpression": false, + "FunctionDeclaration": false, + "FunctionExpression": false, + "ImportDeclaration": false, + "ObjectExpression": false, + "ObjectPattern": false, + "VariableDeclaration": false, + "NewExpression": false + } + } + ], + "@stylistic/computed-property-spacing": [ + "error", + "never" + ], + "@stylistic/dot-location": [ + "error", + "property" + ], + "@stylistic/eol-last": [ + "error", + "always" + ], + "@stylistic/function-call-spacing": [ + "error", + "never" + ], + "@stylistic/function-paren-newline": [ + "error", + "consistent" + ], + "@stylistic/generator-star-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "@stylistic/implicit-arrow-linebreak": [ + "error", + "beside" + ], + "@stylistic/indent": [ + "error", + 2, + { + "SwitchCase": 1, + "VariableDeclarator": 1, + "outerIIFEBody": 1, + "FunctionDeclaration": { + "parameters": 1, + "body": 1 + }, + "FunctionExpression": { + "parameters": 1, + "body": 1 + }, + "CallExpression": { + "arguments": 1 + }, + "ArrayExpression": 1, + "ObjectExpression": 1, + "ImportDeclaration": 1, + "flatTernaryExpressions": false, + "ignoredNodes": [ + "JSXElement", + "JSXElement > *", + "JSXAttribute", + "JSXIdentifier", + "JSXNamespacedName", + "JSXMemberExpression", + "JSXSpreadAttribute", + "JSXExpressionContainer", + "JSXOpeningElement", + "JSXClosingElement", + "JSXFragment", + "JSXOpeningFragment", + "JSXClosingFragment", + "JSXText", + "JSXEmptyExpression", + "JSXSpreadChild" + ], + "ignoreComments": false, + "offsetTernaryExpressions": false + } + ], + "@stylistic/key-spacing": [ + "error", + { + "beforeColon": false, + "afterColon": true + } + ], + "@stylistic/keyword-spacing": [ + "error", + { + "before": true, + "after": true, + "overrides": { + "return": { + "after": true + }, + "throw": { + "after": true + }, + "case": { + "after": true + } + } + } + ], + "@stylistic/linebreak-style": [ + "error", + "unix" + ], + "@stylistic/lines-between-class-members": [ + "error", + "always", + { + "exceptAfterSingleLine": false + } + ], + "@stylistic/new-parens": "error", + "@stylistic/newline-per-chained-call": [ + "error", + { + "ignoreChainWithDepth": 4 + } + ], + "@stylistic/no-confusing-arrow": [ + "error", + { + "allowParens": true, + "onlyOneSimpleParam": false + } + ], + "@stylistic/no-extra-semi": "error", + "@stylistic/no-floating-decimal": "error", + "@stylistic/no-mixed-spaces-and-tabs": "error", + "@stylistic/no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "@stylistic/no-multiple-empty-lines": [ + "error", + { + "max": 1, + "maxBOF": 0, + "maxEOF": 0 + } + ], + "@stylistic/no-tabs": "error", + "@stylistic/no-trailing-spaces": [ + "warn", + { + "skipBlankLines": true, + "ignoreComments": false + } + ], + "@stylistic/no-whitespace-before-property": "error", + "@stylistic/nonblock-statement-body-position": [ + "error", + "beside", + { + "overrides": {} + } + ], + "@stylistic/object-curly-spacing": [ + "error", + "always" + ], + "@stylistic/object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "@stylistic/one-var-declaration-per-line": [ + "error", + "always" + ], + "@stylistic/padded-blocks": [ + "error", + { + "blocks": "never", + "classes": "never", + "switches": "never" + }, + { + "allowSingleLineBlocks": true + } + ], + "@stylistic/quote-props": [ + "error", + "as-needed", + { + "keywords": false, + "unnecessary": true, + "numbers": false + } + ], + "@stylistic/quotes": [ + "warn", + "single" + ], + "@stylistic/rest-spread-spacing": [ + "error", + "never" + ], + "@stylistic/semi": [ + "error", + "always" + ], + "@stylistic/semi-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "@stylistic/semi-style": [ + "error", + "last" + ], + "@stylistic/space-before-blocks": "error", + "@stylistic/space-before-function-paren": [ + "error", + { + "anonymous": "always", + "named": "never", + "asyncArrow": "always" + } + ], + "@stylistic/space-in-parens": [ + "error", + "never" + ], + "@stylistic/space-infix-ops": "error", + "@stylistic/space-unary-ops": [ + "error", + { + "words": true, + "nonwords": false, + "overrides": {} + } + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "line": { + "exceptions": [ + "-", + "+" + ], + "markers": [ + "=", + "!", + "/" + ] + }, + "block": { + "exceptions": [ + "-", + "+" + ], + "markers": [ + "=", + "!", + ":", + "::" + ], + "balanced": true + } + } + ], + "@stylistic/switch-colon-spacing": [ + "error", + { + "after": true, + "before": false + } + ], + "@stylistic/template-curly-spacing": "error", + "@stylistic/template-tag-spacing": [ + "error", + "never" + ], + "@stylistic/type-annotation-spacing": "error", + "@stylistic/wrap-iife": [ + "error", + "outside", + { + "functionPrototypeMethods": false + } + ], + "@stylistic/yield-star-spacing": [ + "error", + "after" + ], + "array-callback-return": [ + "error", + { + "allowImplicit": true, + "checkForEach": false, + "allowVoid": false + } + ], + "arrow-body-style": [ + "error", + "as-needed", + { + "requireReturnForObjectLiteral": false + } + ], + "block-scoped-var": "error", + "constructor-super": "error", + "curly": [ + "error", + "multi-line" + ], + "default-case": [ + "error", + { + "commentPattern": "^no default$" + } + ], + "eqeqeq": [ + "error", + "always", + { + "null": "ignore" + } + ], + "for-direction": "error", + "func-names": "warn", + "getter-return": [ + "error", + { + "allowImplicit": true + } + ], + "guard-for-in": "error", + "import/export": "error", + "import/first": "error", + "import/named": "error", + "import/newline-after-import": "error", + "import/no-absolute-path": "error", + "import/no-amd": "error", + "import/no-cycle": [ + "error", + { + "ignoreExternal": false, + "allowUnsafeDynamicCyclicDependency": false, + "disableScc": false + } + ], + "import/no-duplicates": "error", + "import/no-dynamic-require": "error", + "import/no-mutable-exports": "error", + "import/no-named-as-default": "error", + "import/no-named-as-default-member": "error", + "import/no-named-default": "error", + "import/no-self-import": "error", + "import/no-webpack-loader-syntax": "error", + "new-cap": [ + "error", + { + "newIsCap": true, + "newIsCapExceptions": [], + "capIsNew": false, + "capIsNewExceptions": [ + "Immutable.Map", + "Immutable.Set", + "Immutable.List" + ], + "properties": true + } + ], + "no-alert": "warn", + "no-array-constructor": "error", + "no-async-promise-executor": "error", + "no-bitwise": "error", + "no-caller": "error", + "no-case-declarations": "error", + "no-class-assign": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": [ + "error", + "always" + ], + "no-const-assign": "error", + "no-constant-condition": "warn", + "no-continue": "error", + "no-control-regex": "error", + "no-debugger": "error", + "no-delete-var": "error", + "no-dupe-class-members": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-empty": "error", + "no-empty-character-class": "error", + "no-empty-function": "error", + "no-empty-pattern": "error", + "no-eval": "error", + "no-ex-assign": "error", + "no-extend-native": "error", + "no-extra-bind": "error", + "no-extra-boolean-cast": "error", + "no-extra-label": "error", + "no-fallthrough": "error", + "no-func-assign": "error", + "no-global-assign": [ + "error", + { + "exceptions": [] + } + ], + "no-implied-eval": "error", + "no-inner-declarations": "error", + "no-invalid-regexp": "error", + "no-irregular-whitespace": "error", + "no-iterator": "error", + "no-label-var": "error", + "no-labels": [ + "error", + { + "allowLoop": false, + "allowSwitch": false + } + ], + "no-lone-blocks": "error", + "no-lonely-if": "error", + "no-loop-func": "error", + "no-misleading-character-class": "error", + "no-multi-assign": "error", + "no-multi-str": "error", + "no-nested-ternary": "error", + "no-new": "error", + "no-new-func": "error", + "no-new-native-nonconstructor": "error", + "no-new-wrappers": "error", + "no-obj-calls": "error", + "no-object-constructor": "error", + "no-proto": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-restricted-globals": "error", + "no-restricted-properties": "error", + "no-return-assign": [ + "error", + "always" + ], + "no-script-url": "error", + "no-self-assign": [ + "error", + { + "props": true + } + ], + "no-self-compare": "error", + "no-sequences": "error", + "no-shadow": "error", + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "error", + "no-template-curly-in-string": "error", + "no-this-before-super": "error", + "no-throw-literal": "error", + "no-undef": "error", + "no-unexpected-multiline": "error", + "no-unneeded-ternary": [ + "error", + { + "defaultAssignment": false + } + ], + "no-unreachable": "error", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unused-expressions": [ + "error", + { + "allowShortCircuit": false, + "allowTernary": false, + "allowTaggedTemplates": false, + "enforceForJSX": false + } + ], + "no-unused-labels": "error", + "no-unused-vars": [ + "warn", + { + "argsIgnorePattern": "^_.*", + "varsIgnorePattern": "^_.*" + } + ], + "no-use-before-define": [ + "error", + { + "functions": true, + "classes": true, + "variables": true + } + ], + "no-useless-catch": "error", + "no-useless-computed-key": "error", + "no-useless-concat": "error", + "no-useless-escape": "error", + "no-useless-rename": [ + "error", + { + "ignoreDestructuring": false, + "ignoreImport": false, + "ignoreExport": false + } + ], + "no-useless-return": "error", + "no-var": "error", + "no-void": "error", + "no-with": "error", + "node/global-require": "error", + "node/no-new-require": "error", + "node/no-path-concat": "error", + "object-shorthand": [ + "error", + "always", + { + "ignoreConstructors": false, + "avoidQuotes": true + } + ], + "one-var": [ + "error", + "never" + ], + "operator-assignment": [ + "error", + "always" + ], + "prefer-arrow-callback": [ + "error", + { + "allowNamedFunctions": false, + "allowUnboundThis": true + } + ], + "prefer-const": [ + "error", + { + "destructuring": "any", + "ignoreReadBeforeAssign": true + } + ], + "prefer-destructuring": [ + "error", + { + "VariableDeclarator": { + "array": false, + "object": true + }, + "AssignmentExpression": { + "array": true, + "object": false + } + }, + { + "enforceForRenamedProperties": false + } + ], + "prefer-numeric-literals": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "error", + "radix": "error", + "require-yield": "error", + "symbol-description": "error", + "typescript/prefer-as-const": "error", + "typescript/prefer-namespace-keyword": "error", + "typescript/triple-slash-reference": "error", + "unicode-bom": [ + "error", + "never" + ], + "unicorn/no-new-buffer": "error", + "use-isnan": "error", + "valid-typeof": [ + "error", + { + "requireStringLiterals": true + } + ], + "vars-on-top": "error", + "yoda": "error" + }, + "overrides": [ + { + "files": [ + "**/*.ts", + "**/*.tsx" + ], + "rules": { + "constructor-super": "off", + "getter-return": "off", + "no-const-assign": "off", + "no-dupe-class-members": "off", + "no-dupe-keys": "off", + "no-func-assign": "off", + "no-new-native-nonconstructor": "off", + "no-obj-calls": "off", + "no-redeclare": "off", + "no-this-before-super": "off", + "no-undef": "off", + "no-unreachable": "off", + "no-unsafe-negation": "off", + "typescript/explicit-member-accessibility": "error", + "valid-typeof": "off" + } + } + ] +} diff --git a/packages/cubejs-linter/index.js b/packages/cubejs-linter/index.js deleted file mode 100644 index 2e83c11f64c56..0000000000000 --- a/packages/cubejs-linter/index.js +++ /dev/null @@ -1,114 +0,0 @@ -module.exports = { - root: true, - extends: 'airbnb-base', - env: { - node: true, - }, - plugins: ['import', '@typescript-eslint/eslint-plugin', '@stylistic/ts'], - parser: '@typescript-eslint/parser', - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - ecmaFeatures: { - legacyDecorators: true, - }, - }, - rules: { - 'no-useless-constructor': 0, - 'max-classes-per-file': 0, - 'prefer-object-spread': 0, - 'import/no-unresolved': 0, - 'comma-dangle': 0, - 'no-console': 0, - 'arrow-parens': 0, - 'import/prefer-default-export': 0, - 'import/extensions': 0, - quotes: ['warn', 'single'], - 'no-prototype-builtins': 0, - 'class-methods-use-this': 0, - 'no-param-reassign': 0, - 'no-mixed-operators': 0, - 'no-else-return': 0, - 'prefer-promise-reject-errors': 0, - 'no-plusplus': 0, - 'no-await-in-loop': 0, - 'operator-linebreak': 0, - // linter can't fix this itself and, in some cases, conflicts with `arrow-body-style` - 'max-len': 0, - 'no-trailing-spaces': ['warn', { skipBlankLines: true }], - 'object-curly-newline': 0, - // TypeScript Recommended - 'no-array-constructor': 'off', - '@typescript-eslint/no-array-constructor': 'error', - 'no-empty-function': 'off', - '@typescript-eslint/no-empty-function': 'error', - 'no-extra-semi': 'off', - '@stylistic/ts/no-extra-semi': 'error', - 'no-underscore-dangle': 'off', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': [ - 'warn', - { - argsIgnorePattern: '^_.*', - varsIgnorePattern: '^_.*', - }, - ], - // '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/prefer-as-const': 'error', - '@typescript-eslint/prefer-namespace-keyword': 'error', - '@typescript-eslint/triple-slash-reference': 'error', - '@stylistic/ts/type-annotation-spacing': 'error', - '@stylistic/ts/space-infix-ops': 'error', - 'no-restricted-syntax': [ - 'error', - { - selector: 'ForInStatement', - message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', - }, - { - selector: 'LabeledStatement', - message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', - }, - { - selector: 'WithStatement', - message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', - }, - ], - }, - overrides: [ - { - files: ['*.ts', '*.tsx'], - rules: { - // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/eslint-recommended.ts - 'constructor-super': 'off', // ts(2335) & ts(2377) - 'getter-return': 'off', // ts(2378) - 'no-const-assign': 'off', // ts(2588) - 'no-dupe-args': 'off', // ts(2300) - 'no-dupe-class-members': 'off', // ts(2393) & ts(2300) - 'no-dupe-keys': 'off', // ts(1117) - 'no-func-assign': 'off', // ts(2539) - 'no-import-assign': 'off', // ts(2539) & ts(2540) - 'no-new-symbol': 'off', // ts(2588) - 'no-obj-calls': 'off', // ts(2349) - 'no-redeclare': 'off', // ts(2451) - 'no-setter-return': 'off', // ts(2408) - 'no-this-before-super': 'off', // ts(2376) - 'no-undef': 'off', // ts(2304) - 'no-unreachable': 'off', // ts(7027) - 'no-unsafe-negation': 'off', // ts(2365) & ts(2360) & ts(2358) - 'no-var': 'error', // ts transpiles let/const to var, so no need for vars any more - 'prefer-const': 'error', // ts provides better types with const - 'prefer-rest-params': 'error', // ts provides better types with rest args over arguments - 'prefer-spread': 'error', // ts transpiles spread to apply, so no need for manual apply - 'valid-typeof': 'off', // ts(2367) - // TypeScript Additional - '@typescript-eslint/explicit-member-accessibility': 'error', - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': ['error', { ignoreTypeValueShadow: true }], - 'no-duplicate-imports': 'off', - semi: 'off', - '@stylistic/ts/semi': 'error', - }, - }, - ], -}; diff --git a/packages/cubejs-linter/package.json b/packages/cubejs-linter/package.json index 3d2955f8b9481..55838a28deef6 100644 --- a/packages/cubejs-linter/package.json +++ b/packages/cubejs-linter/package.json @@ -1,31 +1,23 @@ { "name": "@cubejs-backend/linter", - "description": "Cube.js ESLint (virtual package) for linting code", + "description": "Cube.js shared oxlint configuration (virtual package) for linting code", "author": "Cube Dev, Inc.", "version": "1.7.35", "repository": { "type": "git", "url": "https://github.com/cube-js/cube.git", - "directory": "packages/cubejs-mssql-driver" + "directory": "packages/cubejs-linter" }, "engines": { "node": ">=20.0.0" }, - "main": "index.js", - "peerDependencies": { - "eslint": ">=8.57" - }, "dependencies": { - "@stylistic/eslint-plugin-ts": "^3.1.0", - "@typescript-eslint/eslint-plugin": "^8.46.0", - "@typescript-eslint/parser": "^8.46.0", - "eslint": "^8.57.1", - "eslint-config-airbnb-base": "^14.2.1", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^10.0.0" + "@stylistic/eslint-plugin": "^5.10.0", + "oxlint": "^1.82.0" }, "files": [ - "index.js" + ".oxlintrc.json", + "airbnb-base.json" ], "license": "Apache-2.0", "publishConfig": { diff --git a/packages/cubejs-materialize-driver/package.json b/packages/cubejs-materialize-driver/package.json index feaade5571fce..e92f8bae502a3 100644 --- a/packages/cubejs-materialize-driver/package.json +++ b/packages/cubejs-materialize-driver/package.json @@ -22,9 +22,7 @@ "tsc": "tsc", "watch": "tsc -w", "integration": "npm run integration:materialize", - "integration:materialize": "jest --verbose dist/test", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:materialize": "jest --verbose dist/test" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -45,8 +43,5 @@ }, "jest": { "testEnvironment": "node" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-materialize-driver/src/MaterializeDriver.ts b/packages/cubejs-materialize-driver/src/MaterializeDriver.ts index bbd0db1554f4b..d843bbeb3285d 100644 --- a/packages/cubejs-materialize-driver/src/MaterializeDriver.ts +++ b/packages/cubejs-materialize-driver/src/MaterializeDriver.ts @@ -167,7 +167,7 @@ export class MaterializeDriver extends PostgresDriver { * @returns {Promise} version */ public async getMaterializeVersion(): Promise { - const [{ version }] = await this.query<{version: string}>('SELECT mz_version() as version;', []); + const [{ version }] = await this.query<{ version: string }>('SELECT mz_version() as version;', []); // Materialize returns the version as follows: 'v0.24.3-alpha.5 (65778f520)' return version.split(' ')[0]; diff --git a/packages/cubejs-materialize-driver/test/MaterializeDriver.test.ts b/packages/cubejs-materialize-driver/test/MaterializeDriver.test.ts index 2480b8a15409e..eebeaa5fef501 100644 --- a/packages/cubejs-materialize-driver/test/MaterializeDriver.test.ts +++ b/packages/cubejs-materialize-driver/test/MaterializeDriver.test.ts @@ -156,8 +156,7 @@ describe('MaterializeDriver', () => { const data = await driver.query(`SHOW CLUSTER;`, []); expect(data).toEqual([ { - 'cluster': 'quickstart', + cluster: 'quickstart', }]); }); - }); diff --git a/packages/cubejs-mongobi-driver/package.json b/packages/cubejs-mongobi-driver/package.json index 670f0fff474f0..fce5ce0e0e596 100644 --- a/packages/cubejs-mongobi-driver/package.json +++ b/packages/cubejs-mongobi-driver/package.json @@ -21,8 +21,6 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts", "integration": "jest dist/test", "integration:mongobi": "jest dist/test" }, @@ -45,8 +43,5 @@ }, "jest": { "testEnvironment": "node" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-mssql-driver/package.json b/packages/cubejs-mssql-driver/package.json index 361eff9800bad..cfc5853863dbc 100644 --- a/packages/cubejs-mssql-driver/package.json +++ b/packages/cubejs-mssql-driver/package.json @@ -20,9 +20,7 @@ "scripts": { "build": "rm -rf dist && npm run tsc", "tsc": "tsc", - "watch": "tsc -w", - "lint": "eslint src/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* --ext .ts,.js" + "watch": "tsc -w" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -36,9 +34,6 @@ "jest": { "testEnvironment": "node" }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cubejs-mssql-driver/src/MSSqlDriver.ts b/packages/cubejs-mssql-driver/src/MSSqlDriver.ts index d24fdc498e4c9..6ded1beebb0df 100644 --- a/packages/cubejs-mssql-driver/src/MSSqlDriver.ts +++ b/packages/cubejs-mssql-driver/src/MSSqlDriver.ts @@ -80,33 +80,33 @@ export class MSSqlDriver extends BaseDriver implements DriverInterface { * Class constructor. */ public constructor(config: MSSqlDriverConfiguration & { - /** + /** * Data source name. */ - dataSource?: string, + dataSource?: string, - /** + /** * Whether this driver is used for pre-aggregations. */ - preAggregations?: boolean, + preAggregations?: boolean, - /** + /** * Max pool size value for the [cube]<-->[db] pool. */ - maxPoolSize?: number, + maxPoolSize?: number, - /** + /** * Min pool size value for the [cube]<-->[db] pool. */ - minPoolSize?: number, + minPoolSize?: number, - /** + /** * Time to wait for a response from a connection after validation * request before determining it as not valid. Default - 10000 ms. */ - testConnectionTimeout?: number, - server?: string, - } = {}) { + testConnectionTimeout?: number, + server?: string, + } = {}) { super({ testConnectionTimeout: config.testConnectionTimeout, }); @@ -395,7 +395,7 @@ export class MSSqlDriver extends BaseDriver implements DriverInterface { return !!this.config.readOnly; } - public wrapQueryWithLimit(query: { query: string, limit: number}) { + public wrapQueryWithLimit(query: { query: string, limit: number }) { query.query = `SELECT TOP ${query.limit} * FROM (${query.query}) AS t`; } diff --git a/packages/cubejs-mysql-aurora-serverless-driver/package.json b/packages/cubejs-mysql-aurora-serverless-driver/package.json index fae0c947c3c68..5aee782acef0e 100644 --- a/packages/cubejs-mysql-aurora-serverless-driver/package.json +++ b/packages/cubejs-mysql-aurora-serverless-driver/package.json @@ -17,8 +17,7 @@ "test": "npm run unit && npm run integration", "unit": "jest ./**/*.test.js", "integration": "jest ./**/*.integration.js", - "integration:mysql-aurora-serverless": "npm run integration", - "lint": "eslint driver/*.js test/*.js" + "integration:mysql-aurora-serverless": "npm run integration" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -37,8 +36,5 @@ "license": "Apache-2.0", "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-mysql-driver/package.json b/packages/cubejs-mysql-driver/package.json index 1e4ce877c7ea4..0f5568eca0845 100644 --- a/packages/cubejs-mysql-driver/package.json +++ b/packages/cubejs-mysql-driver/package.json @@ -22,9 +22,7 @@ "tsc": "tsc", "watch": "tsc -w", "integration": "npm run integration:mysql", - "integration:mysql": "jest --verbose dist/test", - "lint": "eslint src/* test/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* test/* --ext .ts,.js" + "integration:mysql": "jest --verbose dist/test" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -41,9 +39,6 @@ "testcontainers": "^10.28.0", "typescript": "~6.0.3" }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cubejs-oracle-driver/driver/OracleDriver.js b/packages/cubejs-oracle-driver/driver/OracleDriver.js index c2796a12fc538..2312fc799c764 100644 --- a/packages/cubejs-oracle-driver/driver/OracleDriver.js +++ b/packages/cubejs-oracle-driver/driver/OracleDriver.js @@ -26,7 +26,7 @@ const OracleTypeToGenericType = { binary_float: 'float', binary_double: 'double', date: 'timestamp', - 'number': 'decimal', + number: 'decimal', }; const sortByKeys = (unordered) => { @@ -40,12 +40,12 @@ const sortByKeys = (unordered) => { }; const reduceCb = (result, i) => { - let schema = (result[i.table_schema] || {}); - let tables = (schema[i.table_name] || []); - let attributes = new Array(); + const schema = (result[i.table_schema] || {}); + const tables = (schema[i.table_name] || []); + const attributes = []; - if (i.key_type === "P" || i.key_type === "U") { - attributes.push(["primaryKey"]); + if (i.key_type === 'P' || i.key_type === 'U') { + attributes.push(['primaryKey']); } tables.push({ diff --git a/packages/cubejs-pinot-driver/package.json b/packages/cubejs-pinot-driver/package.json index 38e7c23243585..b8aa0ccda7a5e 100644 --- a/packages/cubejs-pinot-driver/package.json +++ b/packages/cubejs-pinot-driver/package.json @@ -23,9 +23,7 @@ "watch": "tsc -w", "unit": "jest --verbose dist/test/unit", "integration": "npm run integration:pinot", - "integration:pinot": "jest --verbose dist/test", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:pinot": "jest --verbose dist/test" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -46,8 +44,5 @@ "should": "^13.2.3", "testcontainers": "^10.28.0", "typescript": "~6.0.3" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-playground/.eslintignore b/packages/cubejs-playground/.eslintignore deleted file mode 100644 index 72e8ffc0db8aa..0000000000000 --- a/packages/cubejs-playground/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/packages/cubejs-postgres-driver/package.json b/packages/cubejs-postgres-driver/package.json index df4ec6cf3b3cf..5e918331f6591 100644 --- a/packages/cubejs-postgres-driver/package.json +++ b/packages/cubejs-postgres-driver/package.json @@ -22,9 +22,7 @@ "tsc": "tsc", "watch": "tsc -w", "integration": "npm run integration:postgres", - "integration:postgres": "jest --verbose dist/test", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:postgres": "jest --verbose dist/test" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -48,8 +46,5 @@ }, "jest": { "testEnvironment": "node" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-prestodb-driver/package.json b/packages/cubejs-prestodb-driver/package.json index a0abd8dde6d92..ea05a79e255d9 100644 --- a/packages/cubejs-prestodb-driver/package.json +++ b/packages/cubejs-prestodb-driver/package.json @@ -23,9 +23,7 @@ "watch": "tsc -w", "unit": "NODE_OPTIONS=--experimental-vm-modules jest dist/test/unit", "integration": "NODE_OPTIONS=--experimental-vm-modules jest dist/test/integration", - "integration:presto": "NODE_OPTIONS=--experimental-vm-modules jest dist/test/integration", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:presto": "NODE_OPTIONS=--experimental-vm-modules jest dist/test/integration" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -45,8 +43,5 @@ "should": "^13.2.3", "testcontainers": "^10.28.0", "typescript": "~6.0.3" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-prestodb-driver/src/PrestoDriver.ts b/packages/cubejs-prestodb-driver/src/PrestoDriver.ts index 3fb05c790d479..8b9f2be749b1b 100644 --- a/packages/cubejs-prestodb-driver/src/PrestoDriver.ts +++ b/packages/cubejs-prestodb-driver/src/PrestoDriver.ts @@ -40,7 +40,7 @@ export type PrestoDriverExportBucket = { }; export type PrestoDriverInternalConfiguration = { - engine?: 'presto' | 'trino'; + engine?: 'presto' | 'trino'; }; export type PrestoDriverConfiguration = PrestoDriverExportBucket & PrestoDriverInternalConfiguration & { diff --git a/packages/cubejs-query-orchestrator/CLAUDE.md b/packages/cubejs-query-orchestrator/CLAUDE.md index 2867ba7b7f237..22a95f1d2b136 100644 --- a/packages/cubejs-query-orchestrator/CLAUDE.md +++ b/packages/cubejs-query-orchestrator/CLAUDE.md @@ -125,7 +125,7 @@ Key configuration options in `QueryOrchestratorOptions`: ## Development Notes - Uses TypeScript with relaxed strict settings (`tsconfig.json`) -- Inherits linting rules from `@cubejs-backend/linter` +- Linted by the repo-root `oxlint` run; rules come from `@cubejs-backend/linter` - Jest configuration extends base repository config - Docker Compose setup for integration testing - Coverage reports generated in `coverage/` directory diff --git a/packages/cubejs-query-orchestrator/package.json b/packages/cubejs-query-orchestrator/package.json index 46f43babaf0be..a611d3ed82051 100644 --- a/packages/cubejs-query-orchestrator/package.json +++ b/packages/cubejs-query-orchestrator/package.json @@ -21,9 +21,7 @@ "unit": "jest --runInBand --forceExit --coverage --verbose test/unit", "integration": "jest --runInBand --verbose test/integration", "integration:cubestore": "jest --runInBand --verbose test/integration/cubestore", - "bench:suite": "node dist/test/benchmarks/run-suite.js", - "lint": "eslint src/* test/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* test/* --ext .ts,.js" + "bench:suite": "node dist/test/benchmarks/run-suite.js" }, "files": [ "README.md", @@ -48,8 +46,5 @@ "typescript": "~6.0.3", "yargs": "^17.7.1" }, - "license": "Apache-2.0", - "eslintConfig": { - "extends": "../cubejs-linter" - } + "license": "Apache-2.0" } diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts b/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts index b98de6f3eed96..76956bfbed07f 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts @@ -87,12 +87,12 @@ export function getStructureVersion(preAggregation) { } export type VersionEntry = { - 'table_name': string, - 'content_version': string, - 'structure_version': string, - 'last_updated_at': number, - 'build_range_end'?: string, - 'naming_version'?: number + table_name: string, + content_version: string, + structure_version: string, + last_updated_at: number, + build_range_end?: string, + naming_version?: number }; export type VersionEntriesObj = { @@ -765,7 +765,7 @@ export class PreAggregations { /** * Returns registered queries queues hash table. */ - public getQueues(): {[dataSource: string]: QueryQueue} { + public getQueues(): { [dataSource: string]: QueryQueue } { return this.queue; } diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts b/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts index db2b6aa6b72aa..aae7f7d24a1c0 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts @@ -879,7 +879,7 @@ export class QueryCache { /** * Returns registered queries queues hash table. */ - public getQueues(): {[dataSource: string]: QueryQueue} { + public getQueues(): { [dataSource: string]: QueryQueue } { return this.queue; } diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts b/packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts index e9d582825e3e1..f7bfa71a74702 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts @@ -361,7 +361,7 @@ export class QueryOrchestrator { } public async getPreAggregationVersionEntries( - preAggregations: { preAggregation: any, partitions: any[]}[], + preAggregations: { preAggregation: any, partitions: any[] }[], preAggregationsSchema: string, requestId: string, ) { diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/QueryQueue.ts b/packages/cubejs-query-orchestrator/src/orchestrator/QueryQueue.ts index 7268a8bc64572..9a541adb78827 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/QueryQueue.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/QueryQueue.ts @@ -118,8 +118,8 @@ export class QueryQueue { protected readonly streamEvents = new EventEmitter(); public constructor( - protected readonly redisQueuePrefix: string, - options: QueryQueueOptions + protected readonly redisQueuePrefix: string, + options: QueryQueueOptions ) { this.concurrency = options.concurrency || 2; this.continueWaitTimeout = options.continueWaitTimeout || 10; diff --git a/packages/cubejs-query-orchestrator/test/unit/PreAggregations.test.ts b/packages/cubejs-query-orchestrator/test/unit/PreAggregations.test.ts index 8da233f14d7bf..aa148b775ac95 100644 --- a/packages/cubejs-query-orchestrator/test/unit/PreAggregations.test.ts +++ b/packages/cubejs-query-orchestrator/test/unit/PreAggregations.test.ts @@ -1290,7 +1290,7 @@ describe('PreAggregations', () => { { indexName: 'm_x_c_actionable_hourly_agg_main_with_index_month1_device_tag_description_index', sql: [ - "CREATE INDEX m_x_c_actionable_hourly_agg_main_with_index_month1_device_tag_description_index ON prod_pre_aggregations_mxc.m_x_c_actionable_hourly_agg_main_with_index_month120260112 (`m_x_c_actionable_hourly_agg__device_name`, `m_x_c_actionable_hourly_agg__tag_name`, `m_x_c_actionable_hourly_agg__description`, `m_x_c_actionable_hourly_agg__timestamp_hour`)", + 'CREATE INDEX m_x_c_actionable_hourly_agg_main_with_index_month1_device_tag_description_index ON prod_pre_aggregations_mxc.m_x_c_actionable_hourly_agg_main_with_index_month120260112 (`m_x_c_actionable_hourly_agg__device_name`, `m_x_c_actionable_hourly_agg__tag_name`, `m_x_c_actionable_hourly_agg__description`, `m_x_c_actionable_hourly_agg__timestamp_hour`)', [], {} ] @@ -1298,7 +1298,7 @@ describe('PreAggregations', () => { { indexName: 'm_x_c_actionable_hourly_agg_main_with_index_month1_tag_description_device_index', sql: [ - "CREATE INDEX m_x_c_actionable_hourly_agg_main_with_index_month1_tag_description_device_index ON prod_pre_aggregations_mxc.m_x_c_actionable_hourly_agg_main_with_index_month120260112 (`m_x_c_actionable_hourly_agg__tag_name`, `m_x_c_actionable_hourly_agg__description`, `m_x_c_actionable_hourly_agg__device_name`)", + 'CREATE INDEX m_x_c_actionable_hourly_agg_main_with_index_month1_tag_description_device_index ON prod_pre_aggregations_mxc.m_x_c_actionable_hourly_agg_main_with_index_month120260112 (`m_x_c_actionable_hourly_agg__tag_name`, `m_x_c_actionable_hourly_agg__description`, `m_x_c_actionable_hourly_agg__device_name`)', [], {} ] diff --git a/packages/cubejs-questdb-driver/package.json b/packages/cubejs-questdb-driver/package.json index cea95af34e661..c04da593efb1e 100644 --- a/packages/cubejs-questdb-driver/package.json +++ b/packages/cubejs-questdb-driver/package.json @@ -22,9 +22,7 @@ "tsc": "tsc", "watch": "tsc -w", "integration": "npm run integration:questdb", - "integration:questdb": "jest --verbose dist/test", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:questdb": "jest --verbose dist/test" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -49,8 +47,5 @@ }, "jest": { "testEnvironment": "node" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-redshift-driver/package.json b/packages/cubejs-redshift-driver/package.json index 1b1579a9a8ae9..87148d419924f 100644 --- a/packages/cubejs-redshift-driver/package.json +++ b/packages/cubejs-redshift-driver/package.json @@ -20,9 +20,7 @@ "scripts": { "build": "rm -rf dist && npm run tsc", "tsc": "tsc", - "watch": "tsc -w", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "watch": "tsc -w" }, "dependencies": { "@aws-sdk/client-redshift": "^3.22.0", @@ -42,8 +40,5 @@ }, "jest": { "testEnvironment": "node" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-redshift-driver/src/RedshiftDriver.ts b/packages/cubejs-redshift-driver/src/RedshiftDriver.ts index bfe75d581931b..f2bb1abc8bed6 100644 --- a/packages/cubejs-redshift-driver/src/RedshiftDriver.ts +++ b/packages/cubejs-redshift-driver/src/RedshiftDriver.ts @@ -30,14 +30,14 @@ interface RedshiftDriverExportRequiredAWS { region: string, } -interface RedshiftDriverExportArnAWS extends RedshiftDriverExportRequiredAWS{ +interface RedshiftDriverExportArnAWS extends RedshiftDriverExportRequiredAWS { // ARN used to access S3 unload data from e.g. EC2 instances, instead of explicit key/secret credentials. // See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html // Resources needing to read these files will need proper read permissions on their role as well. unloadArn?: string, } -interface RedshiftDriverExportKeySecretAWS extends RedshiftDriverExportRequiredAWS{ +interface RedshiftDriverExportKeySecretAWS extends RedshiftDriverExportRequiredAWS { keyId?: string, secretKey?: string, } diff --git a/packages/cubejs-schema-compiler/.eslintignore b/packages/cubejs-schema-compiler/.eslintignore deleted file mode 100644 index 7083b0743fa69..0000000000000 --- a/packages/cubejs-schema-compiler/.eslintignore +++ /dev/null @@ -1,9 +0,0 @@ -src/parser/GenericSqlLexer.ts -src/parser/GenericSqlListener.ts -src/parser/GenericSqlParser.ts -src/parser/GenericSqlVisitor.ts -src/parser/Python3Lexer.ts -src/parser/Python3ParserListener.ts -src/parser/Python3Parser.ts -src/parser/Python3ParserVisitor.ts -test/unit/fixtures/* diff --git a/packages/cubejs-schema-compiler/package.json b/packages/cubejs-schema-compiler/package.json index c9d62f26ad39f..3a86e4bc2a6ae 100644 --- a/packages/cubejs-schema-compiler/package.json +++ b/packages/cubejs-schema-compiler/package.json @@ -27,9 +27,7 @@ "integration:mssql": "TZ=UTC jest dist/test/integration/mssql", "integration:mysql": "TZ=UTC jest dist/test/integration/mysql", "integration:postgres": "TZ=UTC jest dist/test/integration/postgres", - "integration:clickhouse": "TZ=UTC jest dist/test/integration/clickhouse", - "lint": "eslint src/* test/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* test/* --ext .ts,.js" + "integration:clickhouse": "TZ=UTC jest dist/test/integration/clickhouse" }, "dependencies": { "@babel/code-frame": "^7.24", @@ -84,8 +82,5 @@ "testcontainers": "^10.28.0", "typescript": "~6.0.3" }, - "license": "Apache-2.0", - "eslintConfig": { - "extends": "../cubejs-linter" - } + "license": "Apache-2.0" } diff --git a/packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts b/packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts index 2762ca2223fed..dd08062b1dfc1 100644 --- a/packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts +++ b/packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts @@ -16,7 +16,7 @@ export class BaseMeasure { public readonly joinHint: Array = []; - protected preparePatchedMeasure(sourceMeasure: string, newMeasureType: string | null, addFilters: Array<{sql: Function}>): MeasureDefinition { + protected preparePatchedMeasure(sourceMeasure: string, newMeasureType: string | null, addFilters: Array<{ sql: Function }>): MeasureDefinition { const source = this.query.cubeEvaluator.measureByPath(sourceMeasure); const aggType = source.aggType ?? source.type; diff --git a/packages/cubejs-schema-compiler/src/adapter/windows-iana.ts b/packages/cubejs-schema-compiler/src/adapter/windows-iana.ts index ec34509f1765d..451ae64d94c92 100644 --- a/packages/cubejs-schema-compiler/src/adapter/windows-iana.ts +++ b/packages/cubejs-schema-compiler/src/adapter/windows-iana.ts @@ -451,7 +451,7 @@ const ianaToWindows: Record = { 'Pacific/Truk': 'West Pacific Standard Time', 'Pacific/Wake': 'UTC+12', 'Pacific/Wallis': 'UTC+12', - 'UTC': 'UTC', + UTC: 'UTC', }; export function resolveWindowsTimezone(iana: string): string { diff --git a/packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts b/packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts index 23766167c3f80..86fa3279ab834 100644 --- a/packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts +++ b/packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts @@ -114,15 +114,15 @@ export type JoinDefinition = { export type Filter = | { - member: string; - memberReference?: string; - [key: string]: any; - } + member: string; + memberReference?: string; + [key: string]: any; + } | { - and?: Filter[]; - or?: Filter[]; - [key: string]: any; - }; + and?: Filter[]; + or?: Filter[]; + [key: string]: any; + }; export type AccessPolicyDefinition = { group?: string; @@ -734,10 +734,10 @@ export class CubeSymbols implements TranspilerSymbolResolver, CompilerInterface const body = ` var base = \`\${(${baseSql.toString()})(${baseSqlArgs.join(', ')})}\`; ${resolvedParams.map((p, idx) => { - const sep = idx === 0 ? '?' : '&'; - const paramArgs = paramArgSets[idx].join(', '); - return `base += " || '${sep}${p.encodedKey}=' || " + SQL_UTILS.urlEncode((${p.valueFn.toString()})(${paramArgs}));`; - }).join('\n ')} + const sep = idx === 0 ? '?' : '&'; + const paramArgs = paramArgSets[idx].join(', '); + return `base += " || '${sep}${p.encodedKey}=' || " + SQL_UTILS.urlEncode((${p.valueFn.toString()})(${paramArgs}));`; + }).join('\n ')} return base; `; diff --git a/packages/cubejs-schema-compiler/src/compiler/JoinGraph.ts b/packages/cubejs-schema-compiler/src/compiler/JoinGraph.ts index 58cd1360b6e43..b758a2749edb7 100644 --- a/packages/cubejs-schema-compiler/src/compiler/JoinGraph.ts +++ b/packages/cubejs-schema-compiler/src/compiler/JoinGraph.ts @@ -63,11 +63,11 @@ export class JoinGraph implements CompilerInterface { public compile(cubes: unknown, errorReporter: ErrorReporter): void { this.edges = R.compose< - Array, - Array, - Array<[string, JoinEdge][]>, - Array<[string, JoinEdge]>, - Record + Array, + Array, + Array<[string, JoinEdge][]>, + Array<[string, JoinEdge]>, + Record >( R.fromPairs, R.unnest, @@ -78,11 +78,11 @@ export class JoinGraph implements CompilerInterface { // This requires @types/ramda@0.29 or newer // @ts-ignore this.nodes = R.compose< - Record, - Array<[string, JoinEdge]>, - Array, - Record | undefined>, - Record> + Record, + Array<[string, JoinEdge]>, + Array, + Record | undefined>, + Record> >( // This requires @types/ramda@0.29 or newer // @ts-ignore @@ -177,10 +177,10 @@ export class JoinGraph implements CompilerInterface { const key = JSON.stringify(cubesToJoin); if (!this.builtJoins[key]) { const join = R.pipe< - JoinHints, - Array, - Array, - Array + JoinHints, + Array, + Array, + Array >( R.map( (cube: JoinHint): JoinTree | null => this.buildJoinTreeForRoot(cube, R.without([cube], cubesToJoin)) diff --git a/packages/cubejs-schema-compiler/src/compiler/PrepareCompiler.ts b/packages/cubejs-schema-compiler/src/compiler/PrepareCompiler.ts index e36e6cb02589b..fd04edeeb07b7 100644 --- a/packages/cubejs-schema-compiler/src/compiler/PrepareCompiler.ts +++ b/packages/cubejs-schema-compiler/src/compiler/PrepareCompiler.ts @@ -47,15 +47,15 @@ export interface CompilerInterface { } export type Compiler = { - compiler: DataSchemaCompiler; - metaTransformer: CubeToMetaTransformer; - cubeEvaluator: CubeEvaluator; - contextEvaluator: ContextEvaluator; - viewGroupEvaluator: ViewGroupEvaluator; - joinGraph: JoinGraph; - compilerCache: CompilerCache; - headCommitId?: string; - compilerId: string; + compiler: DataSchemaCompiler; + metaTransformer: CubeToMetaTransformer; + cubeEvaluator: CubeEvaluator; + contextEvaluator: ContextEvaluator; + viewGroupEvaluator: ViewGroupEvaluator; + joinGraph: JoinGraph; + compilerCache: CompilerCache; + headCommitId?: string; + compilerId: string; }; export const prepareCompiler = (repo: SchemaFileRepository, options: PrepareCompilerOptions = {}): Compiler => { diff --git a/packages/cubejs-schema-compiler/src/scaffolding/formatters/BaseSchemaFormatter.ts b/packages/cubejs-schema-compiler/src/scaffolding/formatters/BaseSchemaFormatter.ts index 1c49e6d567e26..c511ddfbca8bf 100644 --- a/packages/cubejs-schema-compiler/src/scaffolding/formatters/BaseSchemaFormatter.ts +++ b/packages/cubejs-schema-compiler/src/scaffolding/formatters/BaseSchemaFormatter.ts @@ -35,9 +35,9 @@ export abstract class BaseSchemaFormatter { protected readonly scaffoldingSchema: ScaffoldingSchema; public constructor( - protected readonly dbSchema: DatabaseSchema, - protected readonly driver: any, - protected readonly options: SchemaFormatterOptions + protected readonly dbSchema: DatabaseSchema, + protected readonly driver: any, + protected readonly options: SchemaFormatterOptions ) { this.scaffoldingSchema = new ScaffoldingSchema(dbSchema, this.options); } diff --git a/packages/cubejs-schema-compiler/test/integration/mysql/mysql-pre-aggregations.test.ts b/packages/cubejs-schema-compiler/test/integration/mysql/mysql-pre-aggregations.test.ts index 27f095b45167f..388840e81fe76 100644 --- a/packages/cubejs-schema-compiler/test/integration/mysql/mysql-pre-aggregations.test.ts +++ b/packages/cubejs-schema-compiler/test/integration/mysql/mysql-pre-aggregations.test.ts @@ -216,7 +216,7 @@ describe('MySqlPreAggregations', () => { const preAggregations = cubeEvaluator.scheduledPreAggregations(); const partitionedPreAgg = - preAggregations.find(p => p.preAggregationName === 'partitioned' && p.cube === 'visitors'); + preAggregations.find(p => p.preAggregationName === 'partitioned' && p.cube === 'visitors'); const minMaxQueries = query.preAggregationStartEndQueries('visitors', partitionedPreAgg?.preAggregation); diff --git a/packages/cubejs-schema-compiler/test/integration/postgres/member-expressions-on-views.test.ts b/packages/cubejs-schema-compiler/test/integration/postgres/member-expressions-on-views.test.ts index 80f6beb4ffe3d..9c08f4713aad6 100644 --- a/packages/cubejs-schema-compiler/test/integration/postgres/member-expressions-on-views.test.ts +++ b/packages/cubejs-schema-compiler/test/integration/postgres/member-expressions-on-views.test.ts @@ -294,7 +294,7 @@ describe('Member expressions on views', () => { baseQuery: { measures: Array, dimensions: Array, - order: Array<{id: string, desc: boolean}>, + order: Array<{ id: string, desc: boolean }>, }, baseExpectedResults: Array>, testMeasures: Array<{ diff --git a/packages/cubejs-schema-compiler/test/integration/postgres/pre-aggregations.test.ts b/packages/cubejs-schema-compiler/test/integration/postgres/pre-aggregations.test.ts index ecf69afe129ea..10e843a84dc1d 100644 --- a/packages/cubejs-schema-compiler/test/integration/postgres/pre-aggregations.test.ts +++ b/packages/cubejs-schema-compiler/test/integration/postgres/pre-aggregations.test.ts @@ -2422,7 +2422,7 @@ describe('PreAggregations', () => { const preAggregations = cubeEvaluator.scheduledPreAggregations(); const partitionedPreAgg = - preAggregations.find(p => p.preAggregationName === 'partitioned' && p.cube === 'visitor_checkins'); + preAggregations.find(p => p.preAggregationName === 'partitioned' && p.cube === 'visitor_checkins'); const minMaxQueries = query.preAggregationStartEndQueries('visitor_checkins', partitionedPreAgg?.preAggregation); @@ -2458,7 +2458,7 @@ describe('PreAggregations', () => { const preAggregations = cubeEvaluator.scheduledPreAggregations(); const partitionedPreAgg = - preAggregations.find(p => p.preAggregationName === 'emptyPartitioned' && p.cube === 'visitor_checkins'); + preAggregations.find(p => p.preAggregationName === 'emptyPartitioned' && p.cube === 'visitor_checkins'); const minMaxQueries = query.preAggregationStartEndQueries('visitor_checkins', partitionedPreAgg?.preAggregation); diff --git a/packages/cubejs-server-core/package.json b/packages/cubejs-server-core/package.json index d2d073cfea0d1..58c07e0e2a655 100644 --- a/packages/cubejs-server-core/package.json +++ b/packages/cubejs-server-core/package.json @@ -23,8 +23,6 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "lint": "eslint src/* test/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* test/* --ext .ts,.js", "test": "npm run unit", "unit": "jest --runInBand --forceExit --coverage dist/test" }, @@ -75,8 +73,5 @@ "jest": "^29", "typescript": "~6.0.3" }, - "license": "Apache-2.0", - "eslintConfig": { - "extends": "../cubejs-linter" - } + "license": "Apache-2.0" } diff --git a/packages/cubejs-server-core/src/core/RefreshScheduler.ts b/packages/cubejs-server-core/src/core/RefreshScheduler.ts index 6c824bbfea4ef..b35cfe00475ff 100644 --- a/packages/cubejs-server-core/src/core/RefreshScheduler.ts +++ b/packages/cubejs-server-core/src/core/RefreshScheduler.ts @@ -57,7 +57,7 @@ type JobedPreAggregation = { tableName: string, targetTableName: string, // eslint-disable-next-line camelcase - refreshKeyValues: {refresh_key: string}[][], + refreshKeyValues: { refresh_key: string }[][], queryKey: any[], lastUpdatedAt: string, type: string, diff --git a/packages/cubejs-server-core/src/core/types.ts b/packages/cubejs-server-core/src/core/types.ts index 2e4084159a551..db0910160505b 100644 --- a/packages/cubejs-server-core/src/core/types.ts +++ b/packages/cubejs-server-core/src/core/types.ts @@ -166,9 +166,9 @@ export type DriverFactoryFn = (context: DriverContext) => Promise | BaseDriver | DriverConfig; export type DbTypeInternalFn = (context: DbTypeInternalContext) => - Promise; +Promise; export type DriverFactoryInternalFn = (context: DriverContext) => - Promise; +Promise; export type DialectFactoryFn = (context: DialectContext) => BaseQuery; diff --git a/packages/cubejs-server/package.json b/packages/cubejs-server/package.json index 5550fc3b8926e..2220ac73b1538 100644 --- a/packages/cubejs-server/package.json +++ b/packages/cubejs-server/package.json @@ -33,8 +33,6 @@ "tsc": "tsc", "watch": "tsc -w", "test": "npm run unit", - "lint": "eslint src/* test/ --ext .ts,.js", - "lint:fix": "eslint --fix src/* test/ --ext .ts,js", "unit": "jest", "unit:debug": "jest --runInBand", "jest:shapshot": "jest --updateSnapshot test" @@ -76,9 +74,6 @@ "typescript": "~6.0.3" }, "license": "Apache-2.0", - "eslintConfig": { - "extends": "../cubejs-linter" - }, "oclif": { "commands": "./dist/src/command", "bin": "cubejs-server", diff --git a/packages/cubejs-server/scripts/test.js b/packages/cubejs-server/scripts/test.js index 31090fb594d5c..8749a942c8c2e 100644 --- a/packages/cubejs-server/scripts/test.js +++ b/packages/cubejs-server/scripts/test.js @@ -1,27 +1,28 @@ -"use strict"; +'use strict'; // Do this as the first thing so that any code reading it knows the right env. -process.env.BABEL_ENV = "test"; -process.env.NODE_ENV = "test"; -process.env.PUBLIC_URL = ""; +process.env.BABEL_ENV = 'test'; +process.env.NODE_ENV = 'test'; +process.env.PUBLIC_URL = ''; // Makes the script crash on unhandled rejections instead of silently // ignoring them. In the future, promise rejections that are not handled will // terminate the Node.js process with a non-zero exit code. -process.on("unhandledRejection", (err) => { +process.on('unhandledRejection', (err) => { throw err; }); // Ensure environment variables are read. -require('dotenv').config() +require('dotenv').config(); -const jest = require("jest"); -const execSync = require("child_process").execSync; -let argv = process.argv.slice(2); +const jest = require('jest'); +const { execSync } = require('child_process'); + +const argv = process.argv.slice(2); function isInGitRepository() { try { - execSync("git rev-parse --is-inside-work-tree", { stdio: "ignore" }); + execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' }); return true; } catch (e) { return false; @@ -29,10 +30,10 @@ function isInGitRepository() { } // Watch unless on CI or explicitly running all tests -if (!process.env.CI && argv.indexOf("--watchAll") === -1) { +if (!process.env.CI && argv.indexOf('--watchAll') === -1) { // https://github.com/facebook/create-react-app/issues/5210 const hasSourceControl = isInGitRepository(); - argv.push(hasSourceControl ? "--watch" : "--watchAll"); + argv.push(hasSourceControl ? '--watch' : '--watchAll'); } jest.run(argv); diff --git a/packages/cubejs-server/src/server.ts b/packages/cubejs-server/src/server.ts index 11b4fa54fe431..85dbfc8d6960f 100644 --- a/packages/cubejs-server/src/server.ts +++ b/packages/cubejs-server/src/server.ts @@ -85,7 +85,7 @@ export class CubejsServer { return new CubeCore(config, systemOptions); } - public async listen(options: http.ServerOptions = {}): Promise<{app: Express, port: number, server: GracefulHttpServer, version: any }> { + public async listen(options: http.ServerOptions = {}): Promise<{ app: Express, port: number, server: GracefulHttpServer, version: any }> { try { if (this.server) { throw new Error('CubeServer is already listening'); diff --git a/packages/cubejs-snowflake-driver/package.json b/packages/cubejs-snowflake-driver/package.json index 042d7bf1403d7..39224ac8080bc 100644 --- a/packages/cubejs-snowflake-driver/package.json +++ b/packages/cubejs-snowflake-driver/package.json @@ -23,9 +23,7 @@ "watch": "tsc -w", "unit": "vitest run test/unit", "integration": "npm run integration:snowflake", - "integration:snowflake": "vitest run test/SnowflakeDriver.test.ts", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:snowflake": "vitest run test/SnowflakeDriver.test.ts" }, "dependencies": { "@aws-sdk/client-s3": "^3.726.0", @@ -37,9 +35,6 @@ "publishConfig": { "access": "public" }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "devDependencies": { "@cubejs-backend/linter": "1.7.35", "@types/node": "^22", diff --git a/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts b/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts index b71f48d93fea3..04093c25aea65 100644 --- a/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts +++ b/packages/cubejs-snowflake-driver/src/SnowflakeDriver.ts @@ -836,7 +836,7 @@ export class SnowflakeDriver extends BaseDriver implements DriverInterface { }, (stmt, rows) => { const hydrationMap = this.generateHydrationMap(stmt.getColumns() ?? []); - const types: {name: string, type: string}[] = + const types: { name: string, type: string }[] = this.getTypes(stmt); if (rows?.length && Object.keys(hydrationMap).length) { for (const row of rows) { @@ -878,7 +878,7 @@ export class SnowflakeDriver extends BaseDriver implements DriverInterface { const abort = stmtPromise.cancel; const promise = >stmtPromise.then((stmt) => { - const types: {name: string, type: string}[] = + const types: { name: string, type: string }[] = this.getTypes(stmt); const hydrationMap = this.generateHydrationMap(stmt.getColumns() ?? []); diff --git a/packages/cubejs-sqlite-driver/package.json b/packages/cubejs-sqlite-driver/package.json index 648c52ce87a70..fba3e618c39dc 100644 --- a/packages/cubejs-sqlite-driver/package.json +++ b/packages/cubejs-sqlite-driver/package.json @@ -14,7 +14,6 @@ "main": "driver/SqliteDriver.js", "typings": "driver/index.d.ts", "scripts": { - "lint": "eslint **/*.js", "unit": "jest" }, "dependencies": { @@ -29,8 +28,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-templates/package.json b/packages/cubejs-templates/package.json index 3f40ff41692ac..3f26fe89ab832 100644 --- a/packages/cubejs-templates/package.json +++ b/packages/cubejs-templates/package.json @@ -17,9 +17,7 @@ "scripts": { "build": "rm -rf dist && npm run tsc", "tsc": "tsc", - "watch": "tsc -w", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "watch": "tsc -w" }, "files": [ "dist" @@ -27,9 +25,6 @@ "publishConfig": { "access": "public" }, - "eslintConfig": { - "extends": "../cubejs-linter" - }, "dependencies": { "@cubejs-backend/shared": "1.7.35", "cross-spawn": "^7.0.3", diff --git a/packages/cubejs-testing-drivers/package.json b/packages/cubejs-testing-drivers/package.json index 33540960c9e8e..60300bcd4f238 100644 --- a/packages/cubejs-testing-drivers/package.json +++ b/packages/cubejs-testing-drivers/package.json @@ -16,8 +16,6 @@ }, "scripts": { "tsc": "tsc", - "lint": "eslint src/* test/ --ext .ts", - "lint:fix": "eslint --fix src/* test/ --ext .ts", "image": "node dist/test/buildCubeImage", "test-driver": "TZ=UTC NODE_OPTIONS=--experimental-vm-modules jest --forceExit --runInBand --verbose", "athena-driver": "yarn test-driver -i dist/test/athena-driver.test.js", @@ -126,8 +124,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-testing-drivers/src/types/Environment.ts b/packages/cubejs-testing-drivers/src/types/Environment.ts index 26e9b80c82323..28dd542e1a85c 100644 --- a/packages/cubejs-testing-drivers/src/types/Environment.ts +++ b/packages/cubejs-testing-drivers/src/types/Environment.ts @@ -2,17 +2,17 @@ import { Readable } from 'stream'; export type Environment = { cube: { - port: number; - pgPort?: number; - logs: Readable; + port: number; + pgPort?: number; + logs: Readable; }; store: { port: number; logs: Readable; }; data?: { - port: number; - logs: Readable; + port: number; + logs: Readable; }; stop: () => Promise; }; diff --git a/packages/cubejs-testing-shared/package.json b/packages/cubejs-testing-shared/package.json index 1e198917a1c11..29c885145f050 100644 --- a/packages/cubejs-testing-shared/package.json +++ b/packages/cubejs-testing-shared/package.json @@ -17,9 +17,7 @@ "scripts": { "build": "rm -rf dist && npm run tsc", "tsc": "tsc", - "watch": "tsc -w", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "watch": "tsc -w" }, "files": [ "dist/src/*" @@ -45,8 +43,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-testing-shared/src/query-test.abstract.ts b/packages/cubejs-testing-shared/src/query-test.abstract.ts index cb6cf9a624991..2b18b51feaf76 100644 --- a/packages/cubejs-testing-shared/src/query-test.abstract.ts +++ b/packages/cubejs-testing-shared/src/query-test.abstract.ts @@ -190,9 +190,9 @@ export abstract class QueryTestAbstract { expect(table.aggregate_columns).toMatch('{ column: Column { name: "cards__sum", column_type: Int, column_index: 4 }, function: SUM }'); // eslint-disable-next-line camelcase - const indexes = await connection.query<{name: string; index_type: string}>('select * from system.indexes', [], {}); + const indexes = await connection.query<{ name: string; index_type: string }>('select * from system.indexes', [], {}); expect(indexes).toHaveLength(4); - const indexesMap: {[key: string]: any} = { + const indexesMap: { [key: string]: any } = { cards_count_created_at_reg_default: { type: 'Regular', seen: false }, cards_count_created_at_reg: { type: 'Regular', seen: false }, cards_count_created_at_aggr: { type: 'Aggregate', seen: false }, diff --git a/packages/cubejs-testing/cypress.config.ts b/packages/cubejs-testing/cypress.config.ts index c6c76430688f7..107573a9ba7f3 100644 --- a/packages/cubejs-testing/cypress.config.ts +++ b/packages/cubejs-testing/cypress.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'cypress' +import { defineConfig } from 'cypress'; export default defineConfig({ chromeWebSecurity: false, @@ -14,7 +14,8 @@ export default defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { - return require('./cypress/plugins/index.js')(on, config) + // eslint-disable-next-line node/global-require + return require('./cypress/plugins/index.js')(on, config); }, baseUrl: 'http://localhost:3080', specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', diff --git a/packages/cubejs-testing/package.json b/packages/cubejs-testing/package.json index 2462b8bafae3c..bc2ae827e45e4 100644 --- a/packages/cubejs-testing/package.json +++ b/packages/cubejs-testing/package.json @@ -19,8 +19,6 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "lint": "eslint src/* test/ test/bin --ext .ts", - "lint:fix": "eslint --fix src/* test/ test/bin --ext .ts", "dataset:minimal": "node dist/test/bin/download-dataset.js", "birdbox": "jest --runInBand --verbose dist/test", "birdbox:snapshot": "jest --runInBand --updateSnapshot --verbose dist/test", @@ -123,7 +121,6 @@ "cypress-localstorage-commands": "^1.4.5", "cypress-plugin-snapshots": "^1.4.4", "cypress-wait-until": "^1.7.2", - "eslint-plugin-cypress": "^2.12.1", "globby": "^11.0.4", "jest": "^29", "jsonwebtoken": "^9.0.2", @@ -134,8 +131,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-testing/src/REQUIRED_ENV_VARS.ts b/packages/cubejs-testing/src/REQUIRED_ENV_VARS.ts index 5e1c5d0748f89..2091c60571bd5 100644 --- a/packages/cubejs-testing/src/REQUIRED_ENV_VARS.ts +++ b/packages/cubejs-testing/src/REQUIRED_ENV_VARS.ts @@ -2,7 +2,7 @@ * Environment variables that cannot be hardcoded, and instead must be specified via the cli. * Usually cloud db config & auth variables. */ -export const REQUIRED_ENV_VARS: {[key: string]: string[]} = { +export const REQUIRED_ENV_VARS: { [key: string]: string[] } = { athena: [ 'CUBEJS_AWS_KEY', 'CUBEJS_AWS_SECRET', diff --git a/packages/cubejs-testing/src/birdbox.ts b/packages/cubejs-testing/src/birdbox.ts index 2fc03b71fbe35..65a5e75baf1b2 100644 --- a/packages/cubejs-testing/src/birdbox.ts +++ b/packages/cubejs-testing/src/birdbox.ts @@ -678,7 +678,7 @@ export async function startBirdBoxFromCli( } export interface BirdboxOptions { - // Schema directory. LOCAL mode. + // Schema directory. LOCAL mode. schemaDir?: string, // Config file. LOCAL mode. cubejsConfig?: string, diff --git a/packages/cubejs-testing/test/rest-test-suite.ts b/packages/cubejs-testing/test/rest-test-suite.ts index e5a1bb73e2d6d..729df5fde95d3 100644 --- a/packages/cubejs-testing/test/rest-test-suite.ts +++ b/packages/cubejs-testing/test/rest-test-suite.ts @@ -99,7 +99,7 @@ export function executeTestSuite({ type, config = {}, driver }: TestSuite) { */ async function preAggregationsJob(selector: any): Promise { type PostResponse = string[]; - type GetResponse = {[token: string]: { + type GetResponse = { [token: string]: { status: string; table: string; selector: { @@ -109,7 +109,7 @@ export function executeTestSuite({ type, config = {}, driver }: TestSuite) { cubes?: string[], preAggregations?: string[], }; - }}; + } }; const url = `${systemUrl}/pre-aggregations/jobs`; let response; diff --git a/packages/cubejs-testing/test/smoke-cubesql.test.ts b/packages/cubejs-testing/test/smoke-cubesql.test.ts index aba83d17c8ba1..fafa83f19fffb 100644 --- a/packages/cubejs-testing/test/smoke-cubesql.test.ts +++ b/packages/cubejs-testing/test/smoke-cubesql.test.ts @@ -658,7 +658,7 @@ describe('SQL API', () => { test('select dimension agg where false', async () => { const query = - 'SELECT MAX("createdAt") AS "max" FROM "BigOrders" WHERE 1 = 0'; + 'SELECT MAX("createdAt") AS "max" FROM "BigOrders" WHERE 1 = 0'; const res = await connection.query(query); expect(res.rows).toEqual([{ max: null }]); }); diff --git a/packages/cubejs-trino-driver/package.json b/packages/cubejs-trino-driver/package.json index a37fdfc7f1f18..748ad53f1f41a 100644 --- a/packages/cubejs-trino-driver/package.json +++ b/packages/cubejs-trino-driver/package.json @@ -23,9 +23,7 @@ "watch": "tsc -w", "unit": "jest dist/test/unit", "integration": "jest dist/test/integration", - "integration:trino": "jest dist/test/integration", - "lint": "eslint src/* --ext .ts", - "lint:fix": "eslint --fix src/* --ext .ts" + "integration:trino": "jest dist/test/integration" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -46,8 +44,5 @@ "jest": "^29", "testcontainers": "^10.28.0", "typescript": "~6.0.3" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/packages/cubejs-vertica-driver/package.json b/packages/cubejs-vertica-driver/package.json index 9a520cb8477c7..26c1ee15df569 100644 --- a/packages/cubejs-vertica-driver/package.json +++ b/packages/cubejs-vertica-driver/package.json @@ -14,9 +14,7 @@ "main": "src/VerticaDriver.js", "scripts": { "integration": "npm run integration:vertica", - "integration:vertica": "jest --verbose ./test", - "lint": "eslint **/*.js", - "lint:fix": "eslint --fix **/*.js" + "integration:vertica": "jest --verbose ./test" }, "dependencies": { "@cubejs-backend/base-driver": "1.7.35", @@ -35,8 +33,5 @@ }, "publishConfig": { "access": "public" - }, - "eslintConfig": { - "extends": "../cubejs-linter" } } diff --git a/rust/cubestore/package.json b/rust/cubestore/package.json index eabb3b0fea72f..cf676f69f3bae 100644 --- a/rust/cubestore/package.json +++ b/rust/cubestore/package.json @@ -14,8 +14,6 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "lint": "eslint js-wrapper/* --ext .ts,.js", - "lint:fix": "eslint --fix js-wrapper/* --ext .ts,js", "unit": "jest", "unit:debug": "jest --runInBand", "version": "node scripts/sync-cargo-version.js", @@ -47,9 +45,6 @@ "@octokit/core": "^3.2.5", "source-map-support": "^0.5.19" }, - "eslintConfig": { - "extends": "../../packages/cubejs-linter" - }, "jest": { "roots": [ "/dist" From 60b9b01489242320f016283cde4710ddedaf7e2e Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Mon, 7 Sep 2026 18:27:59 +0200 Subject: [PATCH 02/11] refactor(linter): migrate cubejs-client-vue3 from ESLint to oxlint The package was left on ESLint by the oxlint migration with the note that "oxlint cannot parse Vue SFCs" -- but it has no .vue files at all, just nine plain .js ones, and there are no SFCs anywhere in the repo. Drop it from the root ignorePatterns and delete the ESLint plumbing: the eslint devDependency, the in-package eslintConfig, the lint script and tests/unit/.eslintrc.js. No nested .oxlintrc.json is needed -- the root env plus the jest `overrides` already in @cubejs-backend/linter cover the package. Its own config was a lone `eslint:recommended`, so it had never seen the shared airbnb-base rules; enabling them reported 50 findings. `oxlint --fix` (three passes) cleared 47. The rest, and two spots the autofix left less readable: - validateFilters: the inner reduce shadowed the outer `acc` and `filters` - render(): the `isQueryPresent` computed shadowed the import of the same name; read it off `this` at the use site, like the neighbouring `this.*` props, so the slot prop keeps its name - reduceOrderMembers / resolveMembers: implicit-arrow-linebreak had collapsed one into a ~125-char line and wrapped the other in `(\n {...}\n)` `import/named` false-positives on the `GRANULARITIES` re-export in index.js: it does not follow client-core's `export * from './time.js'`, though the name resolves at runtime. Suppressed inline. Worth noting the finding only appears once packages/cubejs-client-core/dist exists -- oxlint resolves imports natively, so with dist absent it reports nothing, which makes the import/* rules build-order dependent. Verified: oxlint clean with client-core's dist both present and absent, repo `yarn lint:js` exits 0, and the package's 36 tests pass. Co-Authored-By: Claude Opus 5 (1M context) --- .oxlintrc.json | 3 - packages/cubejs-client-vue3/package.json | 18 ----- .../cubejs-client-vue3/src/QueryBuilder.js | 70 +++++++++---------- .../cubejs-client-vue3/src/QueryRenderer.js | 14 ++-- packages/cubejs-client-vue3/src/index.js | 4 ++ .../tests/unit/.eslintrc.js | 5 -- .../tests/unit/QueryBuilder.spec.js | 62 ++++++++-------- .../tests/unit/__mocks__/fileMock.js | 2 +- .../tests/unit/__mocks__/responses.js | 2 +- 9 files changed, 75 insertions(+), 105 deletions(-) delete mode 100644 packages/cubejs-client-vue3/tests/unit/.eslintrc.js diff --git a/.oxlintrc.json b/.oxlintrc.json index 793c82928ec4e..3e1cc653322f9 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -25,10 +25,7 @@ "docs-mintlify/", "examples/", "rust/cubesql/", - // still on ESLint: oxlint cannot parse Vue SFCs - "packages/cubejs-client-vue3/", // never covered by the ESLint setup this replaced - "packages/cubejs-client-ngx/", "packages/cubejs-playground/", "packages/cubejs-testing/cypress/", "packages/cubejs-testing/birdbox-fixtures/", diff --git a/packages/cubejs-client-vue3/package.json b/packages/cubejs-client-vue3/package.json index 07f7fb028de1b..a0e721052affb 100644 --- a/packages/cubejs-client-vue3/package.json +++ b/packages/cubejs-client-vue3/package.json @@ -14,7 +14,6 @@ "Cube Dev, Inc." ], "scripts": { - "lint": "eslint src tests", "test": "jest", "unit": "npm run test:unit", "test:unit": "jest", @@ -35,7 +34,6 @@ "@babel/preset-env": "^7.24.5", "@vue/test-utils": "^2.4", "babel-jest": "^29", - "eslint": "^7.21.0", "jest": "^29", "jest-environment-jsdom": "^29", "vue": "^3.0" @@ -43,22 +41,6 @@ "peerDependencies": { "vue": "^3.0.0" }, - "eslintConfig": { - "root": true, - "env": { - "es2021": true, - "node": true, - "jest": true - }, - "extends": [ - "eslint:recommended" - ], - "rules": {}, - "parserOptions": { - "ecmaVersion": 2021, - "sourceType": "module" - } - }, "browserslist": [ "> 1%", "last 2 versions", diff --git a/packages/cubejs-client-vue3/src/QueryBuilder.js b/packages/cubejs-client-vue3/src/QueryBuilder.js index 26b19c04a97bf..e99941df21d93 100644 --- a/packages/cubejs-client-vue3/src/QueryBuilder.js +++ b/packages/cubejs-client-vue3/src/QueryBuilder.js @@ -21,52 +21,47 @@ const toOrderMember = (member) => ({ title: member.title, }); -const reduceOrderMembers = (array) => - array.reduce((acc, { id, order }) => (order !== 'none' ? [...acc, [id, order]] : acc), []); +const reduceOrderMembers = (array) => array.reduce( + (acc, { id, order }) => (order !== 'none' ? [...acc, [id, order]] : acc), + [] +); -const operators = [ 'and', 'or' ] +const operators = ['and', 'or']; -const validateFilters = (filters) => - filters.reduce((acc, raw) => { - if (raw.operator) { - return [...acc, raw]; - } - - const validBooleanFilter = operators.reduce((acc, operator) => { - const filters = raw[operator]; +const validateFilters = (filters) => filters.reduce((acc, raw) => { + if (raw.operator) { + return [...acc, raw]; + } - const booleanFilters = validateFilters(filters || []); + const validBooleanFilter = operators.reduce((booleanAcc, operator) => { + const booleanFilters = validateFilters(raw[operator] || []); - if (booleanFilters.length) { - return { ...acc, [operator]: booleanFilters }; - } + if (booleanFilters.length) { + return { ...booleanAcc, [operator]: booleanFilters }; + } - return acc; - }, {}); + return booleanAcc; + }, {}); - if (operators.some((operator) => validBooleanFilter[operator])) { - return [...acc, validBooleanFilter]; - } + if (operators.some((operator) => validBooleanFilter[operator])) { + return [...acc, validBooleanFilter]; + } - return acc; - }, []); + return acc; +}, []); const getDimensionOrMeasure = (meta, m) => { const memberName = m.member || m.dimension; return memberName && meta.resolveMember(memberName, ['dimensions', 'measures']); }; -const resolveMembers = (meta, arr) => - arr && - arr.map((e, index) => { - return { - ...e, - member: getDimensionOrMeasure(meta, e), - index, - and: resolveMembers(meta, e.and), - or: resolveMembers(meta, e.or), - }; - }); +const resolveMembers = (meta, arr) => arr && arr.map((e, index) => ({ + ...e, + member: getDimensionOrMeasure(meta, e), + index, + and: resolveMembers(meta, e.and), + or: resolveMembers(meta, e.or), +})); export default { components: { @@ -139,7 +134,6 @@ export default { segments, timeDimensions, validatedQuery, - isQueryPresent, availableSegments, availableTimeDimensions, availableDimensions, @@ -160,7 +154,7 @@ export default { builderProps = { query, validatedQuery, - isQueryPresent, + isQueryPresent: this.isQueryPresent, chartType, measures, dimensions, @@ -329,7 +323,7 @@ export default { }); if (validatedQuery.filters) { - validatedQuery.filters = validateFilters(validatedQuery.filters) + validatedQuery.filters = validateFilters(validatedQuery.filters); } // only set limit and offset if there are elements otherwise an invalid request with just limit/offset @@ -374,7 +368,7 @@ export default { }; this.chartType = chartType || this.chartType; - let pivot = ResultSet.getNormalizedPivotConfig( + const pivot = ResultSet.getNormalizedPivotConfig( validatedQuery, pivotConfig !== undefined ? pivotConfig : this.pivotConfig ); @@ -496,7 +490,7 @@ export default { and: resolveMembers(this.meta, member.and), or: resolveMembers(this.meta, member.or), member: getDimensionOrMeasure(this.meta, member), - } + }; } else { mem = this[`available${name}`].find((m) => m.name === member); } diff --git a/packages/cubejs-client-vue3/src/QueryRenderer.js b/packages/cubejs-client-vue3/src/QueryRenderer.js index ef38a6d54748a..821a44607d53e 100644 --- a/packages/cubejs-client-vue3/src/QueryRenderer.js +++ b/packages/cubejs-client-vue3/src/QueryRenderer.js @@ -129,14 +129,12 @@ export default { this.loading = true; const resultPromises = Promise.all( - toPairs(queries).map(([name, query]) => - this.cubeApi - .load(query, { - mutexObj: this.mutexObj, - mutexKey: name, - }) - .then((r) => [name, r]) - ) + toPairs(queries).map(([name, query]) => this.cubeApi + .load(query, { + mutexObj: this.mutexObj, + mutexKey: name, + }) + .then((r) => [name, r])) ); this.resultSet = fromPairs(await resultPromises); diff --git a/packages/cubejs-client-vue3/src/index.js b/packages/cubejs-client-vue3/src/index.js index bee202e0713c8..1b4ebc99bef3c 100644 --- a/packages/cubejs-client-vue3/src/index.js +++ b/packages/cubejs-client-vue3/src/index.js @@ -1,3 +1,7 @@ +// oxlint's import/named does not follow the `export * from './time.js'` chain in +// @cubejs-client/core, so it only sees this name as missing once that package's dist +// exists -- and reports nothing before it is built. +// eslint-disable-next-line import/named import { GRANULARITIES } from '@cubejs-client/core'; import QueryRenderer from './QueryRenderer'; diff --git a/packages/cubejs-client-vue3/tests/unit/.eslintrc.js b/packages/cubejs-client-vue3/tests/unit/.eslintrc.js deleted file mode 100644 index 013a195bf0433..0000000000000 --- a/packages/cubejs-client-vue3/tests/unit/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - env: { - jest: true - } -} \ No newline at end of file diff --git a/packages/cubejs-client-vue3/tests/unit/QueryBuilder.spec.js b/packages/cubejs-client-vue3/tests/unit/QueryBuilder.spec.js index 5ddd5269ac686..b9041dd5544f8 100644 --- a/packages/cubejs-client-vue3/tests/unit/QueryBuilder.spec.js +++ b/packages/cubejs-client-vue3/tests/unit/QueryBuilder.spec.js @@ -505,9 +505,9 @@ describe('QueryBuilder.vue', () => { it('filters with boolean logical operators without explicit set', async () => { const cube = createCubeApi(); jest - .spyOn(cube, 'request') - .mockImplementation(fetchMock(load)) - .mockImplementationOnce(fetchMock(meta)); + .spyOn(cube, 'request') + .mockImplementation(fetchMock(load)) + .mockImplementationOnce(fetchMock(meta)); const filter = { or: [ @@ -872,9 +872,9 @@ describe('QueryBuilder.vue', () => { const cube = createCubeApi(); jest - .spyOn(cube, 'request') - .mockImplementation(fetchMock(load)) - .mockImplementationOnce(fetchMock(meta)); + .spyOn(cube, 'request') + .mockImplementation(fetchMock(load)) + .mockImplementationOnce(fetchMock(meta)); const wrapper = shallowMount(QueryBuilder, { propsData: { @@ -1028,9 +1028,9 @@ describe('QueryBuilder.vue', () => { it('does not contain time dimension if granularity is set to none', async () => { const cube = createCubeApi(); jest - .spyOn(cube, 'request') - .mockImplementation(fetchMock(load)) - .mockImplementationOnce(fetchMock(meta)); + .spyOn(cube, 'request') + .mockImplementation(fetchMock(load)) + .mockImplementationOnce(fetchMock(meta)); const wrapper = shallowMount(QueryBuilder, { props: { @@ -1048,22 +1048,22 @@ describe('QueryBuilder.vue', () => { expect(wrapper.vm.orderMembers.length).toBe(1); expect(wrapper.vm.orderMembers).toEqual( - expect.arrayContaining([ - expect.objectContaining({ - id: 'Orders.count', - title: 'Orders Count', - order: 'none', - }), - ]) + expect.arrayContaining([ + expect.objectContaining({ + id: 'Orders.count', + title: 'Orders Count', + order: 'none', + }), + ]) ); }); it('contains time dimension if granularity is not none', async () => { const cube = createCubeApi(); jest - .spyOn(cube, 'request') - .mockImplementation(fetchMock(load)) - .mockImplementationOnce(fetchMock(meta)); + .spyOn(cube, 'request') + .mockImplementation(fetchMock(load)) + .mockImplementationOnce(fetchMock(meta)); const wrapper = shallowMount(QueryBuilder, { props: { @@ -1082,18 +1082,18 @@ describe('QueryBuilder.vue', () => { expect(wrapper.vm.orderMembers.length).toBe(2); expect(wrapper.vm.orderMembers).toEqual( - expect.arrayContaining([ - expect.objectContaining({ - id: 'Orders.createdAt', - title: 'Orders Created at', - order: 'none' - }), - expect.objectContaining({ - id: 'Orders.count', - title: 'Orders Count', - order: 'none', - }) - ]) + expect.arrayContaining([ + expect.objectContaining({ + id: 'Orders.createdAt', + title: 'Orders Created at', + order: 'none' + }), + expect.objectContaining({ + id: 'Orders.count', + title: 'Orders Count', + order: 'none', + }) + ]) ); }); it('calls copyQueryFromProps if query is changed', async () => { diff --git a/packages/cubejs-client-vue3/tests/unit/__mocks__/fileMock.js b/packages/cubejs-client-vue3/tests/unit/__mocks__/fileMock.js index 850025b2b115d..9dc5fc1e4a43e 100644 --- a/packages/cubejs-client-vue3/tests/unit/__mocks__/fileMock.js +++ b/packages/cubejs-client-vue3/tests/unit/__mocks__/fileMock.js @@ -1 +1 @@ -module.exports = ''; \ No newline at end of file +module.exports = ''; diff --git a/packages/cubejs-client-vue3/tests/unit/__mocks__/responses.js b/packages/cubejs-client-vue3/tests/unit/__mocks__/responses.js index 58aeb40f3066d..dfbafd2e5308c 100644 --- a/packages/cubejs-client-vue3/tests/unit/__mocks__/responses.js +++ b/packages/cubejs-client-vue3/tests/unit/__mocks__/responses.js @@ -723,7 +723,7 @@ export default (body = {}, status = 200) => () => ({ status, json: async () => body, text: async () => JSON.stringify(body), - clone: function() { + clone() { return this; }, ok: status >= 200 && status <= 399 From 9c2ca653dad4efa53faee52498f69aee79d7f89f Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Mon, 7 Sep 2026 18:33:32 +0200 Subject: [PATCH 03/11] refactor(linter): migrate cubejs-client-ngx from prettier to oxlint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `cubejs-client-ngx` was never covered by the ESLint setup — no `lint` script, no `eslintConfig` block — so 1c1111099f carried it straight into oxlint's ignore list. Its only style tooling was a `.prettierrc` that no script ever invoked. Drop the unused prettier config and take the package off the ignore list, so it lints with the rest of the repo. 114 violations: `oxlint --fix` cleared ~26, the rest are here. Most of the volume is mechanical — `public` on 67 class members (`typescript/explicit-member-accessibility`) and the blank lines `lines-between-class-members` wants — but four are not: | file | rule | what was wrong | | --- | --- | --- | | `src/client.ts` | `no-shadow` | `watch()`'s `next: async (query)` shadowed the outer `query` param | | `src/query-builder/query-members.ts` | `no-unexpected-multiline` | `BaseMember.remove()` indexed `asCubeQuery()` on the next line, skipping the `\|\| []` the `members` getter already applies | | `src/query-builder/query-members.ts` | `no-shadow` | `handleOrderMembersChange` destructured `order` twice inside `const order = ...` | | `src/query-builder/query-builder.service.ts` | `no-return-assign` | both promise executors were `(resolve) => (this._resolveX = resolve)` | `remove()` changes behaviour slightly: removing from an absent member list now writes `[]` instead of throwing a TypeError. The two angle-bracket casts became `as` casts. Left alone, `keyword-spacing` demands a space before `this` and renders them ` this.meta`. One suppression, for an oxlint false positive: `no-shadow` flags the `MemberType.Order` enum member against the imported `Order` class. Enum members are not bindings, so nothing is shadowed. `ng build` still passes. --- packages/cubejs-client-ngx/.prettierrc | 19 --- packages/cubejs-client-ngx/index.ts | 2 +- packages/cubejs-client-ngx/src/client.ts | 27 ++-- .../src/query-builder/builder-meta.ts | 41 +++--- .../src/query-builder/chart-type.ts | 2 +- .../src/query-builder/common.ts | 8 +- .../src/query-builder/pivot-config.ts | 10 +- .../query-builder/query-builder.service.ts | 65 +++++---- .../src/query-builder/query-members.ts | 138 ++++++++---------- .../src/query-builder/query.ts | 36 +++-- 10 files changed, 166 insertions(+), 182 deletions(-) delete mode 100644 packages/cubejs-client-ngx/.prettierrc diff --git a/packages/cubejs-client-ngx/.prettierrc b/packages/cubejs-client-ngx/.prettierrc deleted file mode 100644 index a5d7bd5bab16f..0000000000000 --- a/packages/cubejs-client-ngx/.prettierrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "semi": true, - "singleQuote": true, - "arrowParens": "always", - "trailingComma": "es5", - "bracketSpacing": true, - "jsxBracketSameLine": false, - "overrides": [ - { - "files": ["*.css", "*.scss"], - "options": { - "singleQuote": false - } - } - ] -} diff --git a/packages/cubejs-client-ngx/index.ts b/packages/cubejs-client-ngx/index.ts index 55dfa84373c96..cdb23e58e95c2 100644 --- a/packages/cubejs-client-ngx/index.ts +++ b/packages/cubejs-client-ngx/index.ts @@ -3,4 +3,4 @@ // replaces this file with production index.ts when it rewrites private symbol // names. -export * from './src/public_api'; \ No newline at end of file +export * from './src/public_api'; diff --git a/packages/cubejs-client-ngx/src/client.ts b/packages/cubejs-client-ngx/src/client.ts index 0c86ea53bd411..07ebbe79665d7 100644 --- a/packages/cubejs-client-ngx/src/client.ts +++ b/packages/cubejs-client-ngx/src/client.ts @@ -22,7 +22,7 @@ export class CubeClient { private cubeApi: CubeApi; - constructor(@Inject('config') private config: any | Observable) { + public constructor(@Inject('config') private config: any | Observable) { if (this.config instanceof Observable) { this.config.subscribe(() => { this.ready$.next(true); @@ -56,7 +56,7 @@ export class CubeClient { query: Query | Query[], options?: LoadMethodOptions ): Observable> { - return from(>>this.apiInstance().load(query, options)); + return from(this.apiInstance().load(query, options) as Promise>); } public sql( @@ -78,18 +78,15 @@ export class CubeClient { } public watch(query, params = {}): Observable> { - return new Observable((observer) => - query.subscribe({ - next: async (query) => { - try { - const resultSet = await this.apiInstance().load(query, params); - observer.next(resultSet); - } catch(err) { - observer.error(err); - } - - }, - }) - ); + return new Observable((observer) => query.subscribe({ + next: async (currentQuery) => { + try { + const resultSet = await this.apiInstance().load(currentQuery, params); + observer.next(resultSet); + } catch (err) { + observer.error(err); + } + }, + })); } } diff --git a/packages/cubejs-client-ngx/src/query-builder/builder-meta.ts b/packages/cubejs-client-ngx/src/query-builder/builder-meta.ts index b57dba6bd4f96..3638744939936 100644 --- a/packages/cubejs-client-ngx/src/query-builder/builder-meta.ts +++ b/packages/cubejs-client-ngx/src/query-builder/builder-meta.ts @@ -6,33 +6,36 @@ import { } from '@cubejs-client/core'; export class BuilderMeta { - measures: TCubeMeasure[]; - dimensions: TCubeDimension[]; - segments: TCubeSegment[]; - timeDimensions: TCubeDimension[]; - filters: Array; + public measures: TCubeMeasure[]; - constructor(public readonly meta: Meta) { + public dimensions: TCubeDimension[]; + + public segments: TCubeSegment[]; + + public timeDimensions: TCubeDimension[]; + + public filters: Array; + + public constructor(public readonly meta: Meta) { this.mapMeta(); } private mapMeta() { - const allDimensions = ( - this.meta.membersForQuery(null, 'dimensions') - ); + const allDimensions = this.meta.membersForQuery( + null, + 'dimensions' + ) as TCubeDimension[]; - this.measures = this.meta.membersForQuery(null, 'measures'); + this.measures = this.meta.membersForQuery(null, 'measures') as TCubeMeasure[]; this.segments = this.meta.membersForQuery(null, 'segments'); this.dimensions = allDimensions.filter(({ type }) => type !== 'time'); this.timeDimensions = allDimensions.filter(({ type }) => type === 'time'); - this.filters = [...allDimensions, ...this.measures].map((member) => { - return { - ...member, - operators: this.meta.filterOperatorsForMember(member.name, [ - 'dimensions', - 'measures', - ]), - }; - }); + this.filters = [...allDimensions, ...this.measures].map((member) => ({ + ...member, + operators: this.meta.filterOperatorsForMember(member.name, [ + 'dimensions', + 'measures', + ]), + })); } } diff --git a/packages/cubejs-client-ngx/src/query-builder/chart-type.ts b/packages/cubejs-client-ngx/src/query-builder/chart-type.ts index 9d950086667ab..4342c27918c05 100644 --- a/packages/cubejs-client-ngx/src/query-builder/chart-type.ts +++ b/packages/cubejs-client-ngx/src/query-builder/chart-type.ts @@ -3,7 +3,7 @@ import { StateSubject } from './common'; export type TChartType = 'line' | 'area' | 'bar' | 'number' | 'table' | 'pie'; export class ChartType extends StateSubject { - constructor(value) { + public constructor(value) { super(value); } } diff --git a/packages/cubejs-client-ngx/src/query-builder/common.ts b/packages/cubejs-client-ngx/src/query-builder/common.ts index 13f11ebabdab0..26a658088b356 100644 --- a/packages/cubejs-client-ngx/src/query-builder/common.ts +++ b/packages/cubejs-client-ngx/src/query-builder/common.ts @@ -1,17 +1,17 @@ import { BehaviorSubject } from 'rxjs'; export class StateSubject { - subject: BehaviorSubject; + public subject: BehaviorSubject; - constructor(value: T) { + public constructor(value: T) { this.subject = new BehaviorSubject(value); } - get() { + public get() { return this.subject.getValue(); } - set(value: T) { + public set(value: T) { this.subject.next(value); } } diff --git a/packages/cubejs-client-ngx/src/query-builder/pivot-config.ts b/packages/cubejs-client-ngx/src/query-builder/pivot-config.ts index 4a453926212c0..863ca1ddd5a1f 100644 --- a/packages/cubejs-client-ngx/src/query-builder/pivot-config.ts +++ b/packages/cubejs-client-ngx/src/query-builder/pivot-config.ts @@ -6,11 +6,11 @@ import { import { StateSubject } from './common'; export class PivotConfig extends StateSubject { - constructor(pivotConfig: TPivotConfig) { + public constructor(pivotConfig: TPivotConfig) { super(pivotConfig); } - - moveItem( + + public moveItem( sourceIndex: number, destinationIndex: number, sourceAxis: TSourceAxis, @@ -26,8 +26,8 @@ export class PivotConfig extends StateSubject { ) ); } - - setFillMissingDates(fillMissingDates: boolean) { + + public setFillMissingDates(fillMissingDates: boolean) { this.subject.next({ ...this.get(), fillMissingDates diff --git a/packages/cubejs-client-ngx/src/query-builder/query-builder.service.ts b/packages/cubejs-client-ngx/src/query-builder/query-builder.service.ts index ba1f5e46fe7ad..b5c428a8a38dd 100644 --- a/packages/cubejs-client-ngx/src/query-builder/query-builder.service.ts +++ b/packages/cubejs-client-ngx/src/query-builder/query-builder.service.ts @@ -26,23 +26,32 @@ export type TQueryBuilderState = { @Injectable() export class QueryBuilderService { private _cube: CubeClient; + private _meta: Meta; + private _query: Query; + private _disableHeuristics: boolean = false; + private _resolveQuery: (query: Query) => void; + private _resolveBuilderMeta: (query: BuilderMeta) => void; + private _heuristicChange$ = new Subject(); - readonly builderMeta = new Promise( - (resolve) => (this._resolveBuilderMeta = resolve) - ); - readonly query = new Promise( - (resolve) => (this._resolveQuery = resolve) - ); - readonly state = new BehaviorSubject({}); + public readonly builderMeta = new Promise((resolve) => { + this._resolveBuilderMeta = resolve; + }); - pivotConfig: PivotConfig; - chartType: ChartType; + public readonly query = new Promise((resolve) => { + this._resolveQuery = resolve; + }); + + public readonly state = new BehaviorSubject({}); + + public pivotConfig: PivotConfig; + + public chartType: ChartType; private async init() { this.pivotConfig = new PivotConfig(null); @@ -64,24 +73,22 @@ export class QueryBuilderService { if (!this._disableHeuristics) { this._heuristicChange$ .pipe( - switchMap((data) => { - return combineLatest([ - this._cube.dryRun(data.query).pipe(catchError((error) => { - console.error(error); - return of(null); - })), - of(data.shouldApplyHeuristicOrder), - ]); - }) + switchMap((data) => combineLatest([ + this._cube.dryRun(data.query).pipe(catchError((error) => { + console.error(error); + return of(null); + })), + of(data.shouldApplyHeuristicOrder), + ])) ) .subscribe( ([dryRunResponse, shouldApplyHeuristicOrder]) => { if (!dryRunResponse) { return; } - + const { pivotQuery, queryOrder } = dryRunResponse; - + this.pivotConfig.set( ResultSet.getNormalizedPivotConfig( pivotQuery, @@ -126,7 +133,7 @@ export class QueryBuilderService { return query; } - setCubeClient(cubeClient: CubeClient) { + public setCubeClient(cubeClient: CubeClient) { this._cube = cubeClient; this.init(); } @@ -134,11 +141,9 @@ export class QueryBuilderService { private subscribe() { Object.getOwnPropertyNames(this).forEach((key) => { if (this[key] instanceof StateSubject) { - this[key].subject.subscribe((value) => - this.setPartialState({ - [key]: value, - }) - ); + this[key].subject.subscribe((value) => this.setPartialState({ + [key]: value, + })); } }); this.query.then((query) => { @@ -150,7 +155,7 @@ export class QueryBuilderService { }); } - async deserialize(state) { + public async deserialize(state) { if (state.query) { (await this.query).setQuery(state.query); } @@ -164,18 +169,18 @@ export class QueryBuilderService { this.subscribe(); } - setPartialState(partialState) { + public setPartialState(partialState) { this.state.next({ ...this.state.getValue(), ...partialState, }); } - disableHeuristics() { + public disableHeuristics() { this._disableHeuristics = false; } - enableHeuristics() { + public enableHeuristics() { this._disableHeuristics = true; } } diff --git a/packages/cubejs-client-ngx/src/query-builder/query-members.ts b/packages/cubejs-client-ngx/src/query-builder/query-members.ts index 69db485db9369..c4a21cd1a88d5 100644 --- a/packages/cubejs-client-ngx/src/query-builder/query-members.ts +++ b/packages/cubejs-client-ngx/src/query-builder/query-members.ts @@ -21,7 +21,7 @@ export type TOrderMember = { }; export class BaseMember { - constructor( + public constructor( private query: Query, private field: 'measures' | 'dimensions' | 'segments' ) {} @@ -30,59 +30,55 @@ export class BaseMember { return this.query.asCubeQuery()[this.field] || []; } - add(name: string) { + public add(name: string) { this.query.setPartialQuery({ [this.field]: [...this.members, name], }); } - replace(name: string, replaceWithName: string) { + public replace(name: string, replaceWithName: string) { this.query.setPartialQuery({ - [this.field]: this.members.map((currentName) => - currentName === name ? replaceWithName : currentName + [this.field]: this.members.map( + (currentName) => (currentName === name ? replaceWithName : currentName) ), }); } - remove(by: string | number) { + public remove(by: string | number) { this.query.setPartialQuery({ - [this.field]: this.query - .asCubeQuery() - [this.field].filter((currentName, index) => { - if (typeof by === 'string') { - return currentName !== by; - } + [this.field]: this.members.filter((currentName, index) => { + if (typeof by === 'string') { + return currentName !== by; + } - return index !== by; - }), + return index !== by; + }), }); } - set(members: string[]) { + public set(members: string[]) { this.query.setPartialQuery({ [this.field]: members, }); } - asArray() { - return (this.query.asCubeQuery()[this.field] || []).map((name) => - this.query.meta.resolveMember(name, this.field) - ); + public asArray() { + return this.members.map((name) => this.query.meta.resolveMember(name, this.field)); } } export class TimeDimensionMember { - constructor(private query: Query) {} + public constructor(private query: Query) {} private get members() { return this.query.asCubeQuery().timeDimensions || []; } - get granularity() { + public get granularity() { return this.members[0]?.granularity; } - updateTimeDimension(by: string | number, updateWith: any) { + public updateTimeDimension(by: string | number, updateWith: any) { const timeDimensions = this.members.map((td, index) => { if (td.dimension === by || index === by) { return { @@ -98,7 +94,7 @@ export class TimeDimensionMember { }); } - add(name: string) { + public add(name: string) { this.query.setPartialQuery({ timeDimensions: [ { @@ -108,7 +104,7 @@ export class TimeDimensionMember { }); } - remove(name: string) { + public remove(name: string) { this.query.setPartialQuery({ timeDimensions: this.members.filter( ({ dimension }) => dimension !== name @@ -116,43 +112,41 @@ export class TimeDimensionMember { }); } - set(timeDimensions: any[]) { + public set(timeDimensions: any[]) { this.query.setPartialQuery({ timeDimensions, }); } - setDateRange(by: string | number, dateRange: string | string[]) { + public setDateRange(by: string | number, dateRange: string | string[]) { this.updateTimeDimension(by, { dateRange }); } - setGranularity(by: string | number, granularity: TimeDimensionGranularity) { + public setGranularity(by: string | number, granularity: TimeDimensionGranularity) { this.updateTimeDimension(by, { granularity }); } - asArray(): any[] { - return (this.query.asCubeQuery().timeDimensions || []).map((td) => { - return { - ...this.query.meta.resolveMember(td.dimension, 'dimensions'), - ...td, - }; - }); + public asArray(): any[] { + return this.members.map((td) => ({ + ...this.query.meta.resolveMember(td.dimension, 'dimensions'), + ...td, + })); } } export class Order { - orderMembers = new BehaviorSubject([]); + public orderMembers = new BehaviorSubject([]); - constructor(private query: Query) { + public constructor(private query: Query) { this.query.subject.subscribe(this.handleQueryChange.bind(this)); this.orderMembers.subscribe(this.handleOrderMembersChange.bind(this)); } private handleOrderMembersChange(orderMembers: TOrderMember[]) { const order = orderMembers - .filter(({ order }) => order !== 'none') + .filter((orderMember) => orderMember.order !== 'none') .reduce( - (memo, { id, order }) => ({ ...memo, [id]: order }), + (memo, orderMember) => ({ ...memo, [orderMember.id]: orderMember.order }), {} ) as TQueryOrderObject; @@ -167,17 +161,15 @@ export class Order { ...this.query.measures.asArray(), ...this.query.dimensions.asArray(), ...this.query.timeDimensions.asArray(), - ].map(({ name, title }) => { - return { - id: name, - order: this.of(name), - title, - }; - }) + ].map(({ name, title }) => ({ + id: name, + order: this.of(name), + title, + })) ); } - setMemberOrder(id: string, order: TOrder) { + public setMemberOrder(id: string, order: TOrder) { this.orderMembers.next( this.orderMembers.getValue().map((orderMember) => { if (orderMember.id === id) { @@ -191,7 +183,7 @@ export class Order { ); } - reorder(sourceIndex: number, destinationIndex: number) { + public reorder(sourceIndex: number, destinationIndex: number) { this.orderMembers.next( moveItemInArray( this.orderMembers.getValue(), @@ -201,15 +193,15 @@ export class Order { ); } - of(member: string) { + public of(member: string) { return (this.query.asCubeQuery().order || {})[member] || 'none'; } - set(order: TQueryOrderObject | TQueryOrderArray) { + public set(order: TQueryOrderObject | TQueryOrderArray) { this.query.setPartialQuery({ order }); } - asArray(): TQueryOrderArray { + public asArray(): TQueryOrderArray { if (Array.isArray(this.query.asCubeQuery().order)) { return this.query.asCubeQuery().order as TQueryOrderArray; } @@ -217,7 +209,7 @@ export class Order { return Object.entries(this.query.asCubeQuery().order || {}); } - asObject(): TQueryOrderObject { + public asObject(): TQueryOrderObject { return this.asArray().reduce( (memo, [key, value]) => ({ ...memo, [key]: value }), {} @@ -226,14 +218,14 @@ export class Order { } export class FilterMember { - constructor(private query: Query) {} + public constructor(private query: Query) {} private get filters() { // TODO: update this type assertion once the QueryBuilder supports logical and/or return (this.query.asCubeQuery().filters || []) as (UnaryFilter | BinaryFilter)[]; } - update(by: string | number, updateWith: Partial) { + public update(by: string | number, updateWith: Partial) { const filters = this.filters.map((filter, index) => { if (index === by || filter.member === by || filter.dimension === by) { return { @@ -249,13 +241,13 @@ export class FilterMember { }); } - add(filter: Filter) { + public add(filter: Filter) { this.query.setPartialQuery({ filters: [...this.filters, filter], }); } - remove(by: string | number) { + public remove(by: string | number) { this.query.setPartialQuery({ filters: this.filters.filter((filter, index) => { if (filter.member === by || filter.dimension === by || index === by) { @@ -267,39 +259,37 @@ export class FilterMember { }); } - set(filters: Filter[]) { + public set(filters: Filter[]) { this.query.setPartialQuery({ filters, }); } - replace(name: string, replaceWithName: string) { + public replace(name: string, replaceWithName: string) { this.query.setPartialQuery({ filters: this.filters.map((filter) => { const field = filter.member ? 'member' : 'dimension'; return filter.member === name || filter.dimension === name ? { - ...filter, - [field]: replaceWithName, - } + ...filter, + [field]: replaceWithName, + } : filter; }), }); } - asArray(): any[] { - return this.filters.map((filter) => { - return { - ...this.query.meta.resolveMember(filter.member || filter.dimension, [ - 'dimensions', - 'measures', - ]), - operators: this.query.meta.filterOperatorsForMember( - filter.member || filter.dimension, - ['dimensions', 'measures'] - ), - ...filter, - }; - }); + public asArray(): any[] { + return this.filters.map((filter) => ({ + ...this.query.meta.resolveMember(filter.member || filter.dimension, [ + 'dimensions', + 'measures', + ]), + operators: this.query.meta.filterOperatorsForMember( + filter.member || filter.dimension, + ['dimensions', 'measures'] + ), + ...filter, + })); } } diff --git a/packages/cubejs-client-ngx/src/query-builder/query.ts b/packages/cubejs-client-ngx/src/query-builder/query.ts index 1e1c9f67cafc1..8e512c914e457 100644 --- a/packages/cubejs-client-ngx/src/query-builder/query.ts +++ b/packages/cubejs-client-ngx/src/query-builder/query.ts @@ -9,6 +9,9 @@ export enum MemberType { Segments = 'segments', TimeDimensions = 'timeDimensions', Filters = 'filters', + // enum members are not bindings, so this does not actually shadow the + // imported `Order` class + // eslint-disable-next-line no-shadow Order = 'order', } @@ -19,14 +22,19 @@ export type OnChangeCallback = ( ) => TCubeQuery; export class Query extends StateSubject { - measures: BaseMember; - dimensions: BaseMember; - segments: BaseMember; - timeDimensions: TimeDimensionMember; - filters: FilterMember; - order: Order; - - constructor( + public measures: BaseMember; + + public dimensions: BaseMember; + + public segments: BaseMember; + + public timeDimensions: TimeDimensionMember; + + public filters: FilterMember; + + public order: Order; + + public constructor( public meta: Meta, private _onBeforeChange: OnChangeCallback = (newQuery) => newQuery ) { @@ -43,15 +51,15 @@ export class Query extends StateSubject { this.order = new Order(this); } - asCubeQuery(): TCubeQuery { + public asCubeQuery(): TCubeQuery { return this.subject.getValue() || {}; } - setQuery(query: TCubeQuery) { + public setQuery(query: TCubeQuery) { this.subject.next(this._onBeforeChange(query, this.subject.getValue(), this)); } - setPartialQuery(partialQuery: Partial) { + public setPartialQuery(partialQuery: Partial) { this.subject.next( this._onBeforeChange( { @@ -64,11 +72,11 @@ export class Query extends StateSubject { ); } - setLimit(limit: number) { + public setLimit(limit: number) { this.setPartialQuery({ limit }); } - - isPresent(): boolean { + + public isPresent(): boolean { return isQueryPresent(this.asCubeQuery()); } } From 090a7b1f162874299c79f1aca87c386c78ed8728 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Mon, 7 Sep 2026 18:41:55 +0200 Subject: [PATCH 04/11] chore: Regenerate yarn.lock after the oxlint migration The migration commits dropped `eslint` and its shareable configs from 49 package.json files, but the lockfile was only partially rewritten and still pinned the whole ESLint 8 tree. Wiping every node_modules and reinstalling from scratch settles it. | | | | --- | --- | | `yarn.lock` | 170 insertions(+), 751 deletions(-) | | `yarn install` | exit 0, postinstall hooks not skipped | | `yarn install --frozen-lockfile` | passes -- lockfile agrees with every package.json | | `yarn lint` | 0 errors | `eslint@^8.57.1` is gone along with its transitive tree: `@eslint/js`, `@eslint/eslintrc`, `@eslint-community/eslint-utils`, `@eslint-community/regexpp`, `@humanwhocodes/config-array`, `@humanwhocodes/object-schema`, `@humanwhocodes/module-importer`, and all of `@typescript-eslint/*` -- plus the shareable configs and plugins that hung off them (`eslint-config-airbnb-base`, `eslint-plugin-cypress`, `eslint-import-resolver-node`, `eslint-module-utils`, `doctrine`, `enquirer`, `astral-regex`, `confusing-browser-globals`). No `eslint` binary is left in the tree at all -- only `oxlint`. The remaining deletions are not dropped packages but merged resolution keys being re-narrowed (`ajv`, `debug`, `cross-spawn`, `escape-string-regexp`), because some specifiers no longer have a requester. Five `eslint`-ish entries survive on purpose: they are transitive dependencies of `@stylistic/eslint-plugin`, which the oxlint config loads as a jsPlugin. `cubejs-playground` still declares `eslint-config-airbnb`, `eslint-plugin-jsx-a11y` and `eslint-plugin-react` at this point, which is why those trees are still here; the commit that enables oxlint for that package removes them and prunes the rest. --- yarn.lock | 921 ++++++++++-------------------------------------------- 1 file changed, 170 insertions(+), 751 deletions(-) diff --git a/yarn.lock b/yarn.lock index a7c6f314c2ce0..b571acfd174e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,11 +7,6 @@ resolved "https://registry.yarnpkg.com/@4tw/cypress-drag-drop/-/cypress-drag-drop-1.8.1.tgz#0758a09387a8c5d9ea54b049904e285836d2f8c8" integrity sha512-w8DSGYhe8JK+dAH8wp0+FJaQ8XXIhKasbnGJTHWARyYAkEco+Zri6AJveAjrhBnmvzxbGzALzovcvKUN5zLJuQ== -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - "@ampproject/remapping@2.3.0", "@ampproject/remapping@^2.2.0": version "2.3.0" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" @@ -1338,13 +1333,6 @@ events "^3.0.0" tslib "^2.2.0" -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.24", "@babel/code-frame@^7.24.7", "@babel/code-frame@^7.26.2", "@babel/code-frame@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.7.tgz#f2fbbfea87c44a21590ec515b778b2c26d8866e7" @@ -1422,15 +1410,6 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/eslint-parser@^7": - version "7.29.7" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.29.7.tgz#272cc7531972ff45bc0db96c45349cb7304d21e1" - integrity sha512-zxt+UJTOMKvUt3yOg+D58MLuz334pHp93qifMFcjIIO+9hN6t+ufw2gi7vDPMpxvfnHRR+3VVXvIjineCcgyXw== - dependencies: - "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" - eslint-visitor-keys "^2.1.0" - semver "^6.3.1" - "@babel/generator@7.26.10": version "7.26.10" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.10.tgz#a60d9de49caca16744e6340c3658dfef6138c3f7" @@ -1598,7 +1577,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz#7f0871d99824d23137d60f86fcf6130fd5a1b51f" integrity sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw== -"@babel/helper-validator-identifier@^7.25.9", "@babel/helper-validator-identifier@^7.29.7": +"@babel/helper-validator-identifier@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz#bd87084ced0c796ec46bda492de6e83d29e89fc2" integrity sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg== @@ -1625,16 +1604,6 @@ "@babel/template" "^7.29.7" "@babel/types" "^7.29.7" -"@babel/highlight@^7.10.4": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.25.9.tgz#8141ce68fc73757946f983b343f1231f4691acc6" - integrity sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw== - dependencies: - "@babel/helper-validator-identifier" "^7.25.9" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" - "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.24", "@babel/parser@^7.25.0", "@babel/parser@^7.26.10", "@babel/parser@^7.29.0", "@babel/parser@^7.29.7": version "7.29.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.7.tgz#837b87387cbf5ec5530cb634b3c622f68edb9334" @@ -3263,53 +3232,13 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== -"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.9.1": +"@eslint-community/eslint-utils@^4.9.1": version "4.10.1" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz#8911bd72b2c3640a543609e0400b8c4d2e7e7cb6" integrity sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg== dependencies: eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.12.2", "@eslint-community/regexpp@^4.6.1": - version "4.12.2" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" - integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== - -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== - dependencies: - ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" - import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - strip-json-comments "^3.1.1" - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.57.1": - version "8.57.1" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" - integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== - "@fastify/busboy@^2.0.0": version "2.1.1" resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" @@ -3478,39 +3407,6 @@ dependencies: "@hapi/hoek" "^9.0.0" -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== - dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== - dependencies: - "@humanwhocodes/object-schema" "^1.2.0" - debug "^4.1.1" - minimatch "^3.0.4" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^1.2.0": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - "@inquirer/ansi@^1.0.0", "@inquirer/ansi@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.2.tgz#674a4c4d81ad460695cb2a1fc69d78cd187f337e" @@ -4687,13 +4583,6 @@ resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-18.2.19.tgz#b5ba332a47bdf8660abbfb5369f2d4d0588bfefc" integrity sha512-bExj5JrByKPibsqBbn5Pjn8lo91AUOTsyP2hgKpnOnmSr62rhWSiRwXltgz2MCiZRmuUznpt93WiOLixgYfYvQ== -"@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": - version "5.1.1-v1" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" - integrity sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg== - dependencies: - eslint-scope "5.1.1" - "@nodable/entities@2.1.0", "@nodable/entities@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@nodable/entities/-/entities-2.1.0.tgz#f543e5c6446720d4cf9e498a83019dd159973bc2" @@ -4712,7 +4601,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -5534,6 +5423,101 @@ resolved "https://registry.yarnpkg.com/@oxc-project/types/-/types-0.124.0.tgz#1dfd7b3fbb98febc2f91b505f48c940db73c8701" integrity sha512-VBFWMTBvHxS11Z5Lvlr3IWgrwhMTXV+Md+EQF0Xf60+wAdsGFTBx7X7K/hP4pi8N7dcm1RvcHwDxZ16Qx8keUg== +"@oxlint/binding-android-arm-eabi@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.82.0.tgz#25c27e3bf20c613c011935a7f0e68dab306ee885" + integrity sha512-a3LB+C5Dsj5b/qtmG/mv5WrzuiXEpg1KF5nXWcEvaoN5TYAqkIvxPOwTPp3Jy/FoGpRo8zsTFhMElMXfeoOEzA== + +"@oxlint/binding-android-arm64@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm64/-/binding-android-arm64-1.82.0.tgz#85324457efa9c0e59b2945da77c22785af14306f" + integrity sha512-OBlhRgNqFblGpGenno/aqOfJLOkQ2B8Ig3iDAalfn0H8hJGZKXPeexCRTDm6uwv6YUjSA9Xnwt1y/Bgj5ZH8uw== + +"@oxlint/binding-darwin-arm64@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.82.0.tgz#71e3e4ffeee40c9301c5e0cb9e311c4643312543" + integrity sha512-dsopxqtY5ZdyT9uLHyGt1SyiLop6hi7hWI3PKpePodkRQOkLaCm+OE4fR9CAz9qdfjiFO8531tX/QDyP/psjFg== + +"@oxlint/binding-darwin-x64@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.82.0.tgz#2fe6907076a21726b6c5da6ea884e6fb8e1af6d0" + integrity sha512-94Lu0SgTClKColU66g1VDuigV3HkcbkJBnTtZjGYfE8UPugaWDgKrm2icjC6HJVUYler2OXaHP/X0TBy8+CowQ== + +"@oxlint/binding-freebsd-x64@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.82.0.tgz#c58a5b1e773a3d49d7c7dd790d0d51600a547a88" + integrity sha512-hne/V06ewhh1i0w8+l7GDNROAGCGPmyFuOwiP7YTRu0JycyStJ4785dmF8xU5p0uUwt2emvIF9vc7Xjis+cJ0g== + +"@oxlint/binding-linux-arm-gnueabihf@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.82.0.tgz#1e71b17c23f382264a35f0e25249d17a540c1112" + integrity sha512-aWY2xtbZf1LneW9Qsv/n2Sp8gOu74JrlQzEtj4coHX2SHFrCfhmAumaU+sI/A5nr+yoTRTSmI/pL2s6ADlNSkw== + +"@oxlint/binding-linux-arm-musleabihf@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.82.0.tgz#c296047dedc511ef333f55e06858b0d71123ccde" + integrity sha512-Fe+TtXCXMh/5f7kWlZ2VAwsMumZWtraFlKVk1NJlL52/beGwfDE7ov+/8gVirHzWokzGu7X65hSPq0ucPDskWQ== + +"@oxlint/binding-linux-arm64-gnu@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.82.0.tgz#e82c10c2a03afb3427e1913d792e30e2bfcfe5ff" + integrity sha512-6azCZ6OJudlvipNttXCCQcyeFfcJ/NvUZdSN1z8elo73kCHtyQC7WTiUcSjWYvJ1jaq9KDUyMAoAS/vNzhBomA== + +"@oxlint/binding-linux-arm64-musl@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.82.0.tgz#91f993479bc8c7e78b14f51cbbb5093e4a4774ff" + integrity sha512-PLEaSD8IAIIlwW4dwOd9YaxuxeOpwiXL4J24rcnE4iNtyM5j9Q9/3+gti08oXpx0u2ygNjRDx9xjWWpQonuJEw== + +"@oxlint/binding-linux-ppc64-gnu@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.82.0.tgz#56d529040051fb385701b6417dc399645a62aa43" + integrity sha512-D94em/BwknNTn4vqxjHh5wb2oL566eFhArabqKIr0cNZMHOJuiraFp1A8tXpH05bbE5tqwEfLXTI0MWEGtn3Dw== + +"@oxlint/binding-linux-riscv64-gnu@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.82.0.tgz#6e4ed3a91d05ff3ae830818c7b3e5950015835f3" + integrity sha512-MOprxBaoYU2D4VgxXCl3ghydThWtx7Um1lL51kGYNeQ5Al7WzsH7/tqGdNtbLrIWnjq3bsm13+nz/gRIxjrOXw== + +"@oxlint/binding-linux-riscv64-musl@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.82.0.tgz#eb4ccf461b8341ba341c031d6e3dd21df264dd35" + integrity sha512-5h55QsfJ/luDXZzC20k6SNOY1Az+dCP9WvntKtcUWh2JhckAdwApY2ZusaBTwLENnReXU+A2fJtSrYvZJNKNPg== + +"@oxlint/binding-linux-s390x-gnu@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.82.0.tgz#3e8f1b2e8a24aebe5fd67034fa53e43c9c09d4c1" + integrity sha512-IE8NJNLlHr0CaXyGJPGVn0eTkUyoj1I2UfA8x7I4PSOYKsQ/6btVC7Pywrj5onk0cMH25r6Z38SoN3AvE5Zuog== + +"@oxlint/binding-linux-x64-gnu@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.82.0.tgz#c1d495644513a28e5c527627e6f5a8ab43694b81" + integrity sha512-XUUUxaBo9XKl+J1B9EmP1cTGQPddzeURvoGkfwh/94PGnbW+hBprDljneoI2M1jzC1bzrIV3ihc7iM9UXl8+tg== + +"@oxlint/binding-linux-x64-musl@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.82.0.tgz#bbf73a69c005eead6d8b09aa035ec3ecb271983a" + integrity sha512-SWLSFulX9TDuH6yvbPYp4+VNn6jkkIvvI+KiujDM5rWBRHEfkesCC/pCneIIUr6ovkxZ5fRtpi2v5Cz5FrMJZg== + +"@oxlint/binding-openharmony-arm64@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.82.0.tgz#05d7b4fe00ee26c0c92ba5c0680163431db42431" + integrity sha512-BQy35f6ZUdNr9a6c7B7orxQTcLjByGT2z3WAgmRovpRwmPYAaJ+NTplmMzhdjdJ4qSchfMNZy/Ukg+qRg6zseQ== + +"@oxlint/binding-win32-arm64-msvc@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.82.0.tgz#6888180ad209d56da4d9e49459ff00ee1e159d5d" + integrity sha512-V4QhSTg5gctZue8RJjsGi7NpQPThr/p1/HfmiMC5kfe1KFEup9SQRVub4A6kijQjdHfxj7bLL1KO3QO7/5bwMQ== + +"@oxlint/binding-win32-ia32-msvc@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.82.0.tgz#f638c533f412a63727501c9af1b1f3b17551a2eb" + integrity sha512-TUSCLaKB2yktpFAJ/r3HAUYsaV/3DT7JS4iNKyoh3a9YNwD0UG7Ezh4D8m23654vQcU6P/RQrCAjRPKe4peP/A== + +"@oxlint/binding-win32-x64-msvc@1.82.0": + version "1.82.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.82.0.tgz#5eeac01f542780b69d6a0d10461cec93e4ae91a0" + integrity sha512-VTVoRIWJTb+wvUX8EYoPArfFH02whuR10goFXE/LHRRX33ajRrFgqbcONXZMiF4C5rnattfkm87HqYn8jb8hmQ== + "@parcel/watcher-android-arm64@2.5.1": version "2.5.1" resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz#507f836d7e2042f798c7d07ad19c3546f9848ac1" @@ -7758,14 +7742,17 @@ resolved "https://registry.yarnpkg.com/@standard-schema/spec/-/spec-1.1.0.tgz#a79b55dbaf8604812f52d140b2c9ab41bc150bb8" integrity sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w== -"@stylistic/eslint-plugin-ts@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-3.1.0.tgz#bb2622bdb307a258e041e04bbce8c398097d0dfa" - integrity sha512-ExsbaLmPTt3Y9bWN64nw+hpsnLAScLH25ncPxrV16FG2Lvg5wn6aRfMqldUGpu+YdqVmFFU1zehgFh6RIHT6YA== +"@stylistic/eslint-plugin@^5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-5.10.0.tgz#471bbd9f7a27ceaac4a217e7f5b3890855e5640c" + integrity sha512-nPK52ZHvot8Ju/0A4ucSX1dcPV2/1clx0kLcH5wDmrE4naKso7TUC/voUyU1O9OTKTrR6MYip6LP0ogEMQ9jPQ== dependencies: - "@typescript-eslint/utils" "^8.13.0" - eslint-visitor-keys "^4.2.0" - espree "^10.3.0" + "@eslint-community/eslint-utils" "^4.9.1" + "@typescript-eslint/types" "^8.56.0" + eslint-visitor-keys "^4.2.1" + espree "^10.4.0" + estraverse "^5.3.0" + picomatch "^4.0.3" "@swc/helpers@^0.5.0": version "0.5.6" @@ -8244,11 +8231,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - "@types/jsonfile@*": version "6.1.4" resolved "https://registry.yarnpkg.com/@types/jsonfile/-/jsonfile-6.1.4.tgz#614afec1a1164e7d670b4a7ad64df3e7beb7b702" @@ -8686,112 +8668,16 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^8.46.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.69.0.tgz#bf74cc392ebcaaf096bc8b4c4d7bbeb0677687b8" - integrity sha512-t5jQTKPIgVW1PE6dR6H6Qz5gm8zjMlX5/2gRaOGd9eO6V7J+tQc6iWKukEe7dY8u9HyYasQ0yfF0/FSSTEO2gA== - dependencies: - "@eslint-community/regexpp" "^4.12.2" - "@typescript-eslint/scope-manager" "8.69.0" - "@typescript-eslint/type-utils" "8.69.0" - "@typescript-eslint/utils" "8.69.0" - "@typescript-eslint/visitor-keys" "8.69.0" - ignore "^7.0.5" - natural-compare "^1.4.0" - ts-api-utils "^2.5.0" - -"@typescript-eslint/parser@^8.46.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.69.0.tgz#de3ead2b35e5c71580eda40820adb4fd14834ca1" - integrity sha512-l4b0DhWioGg6Gt2ebGlvfkFMOjRsauxtsnDRwUSRX1qHq3HdTfQHV8wW9zEXeciai6HfeaKOedQn2Zoofx3WBw== - dependencies: - "@typescript-eslint/scope-manager" "8.69.0" - "@typescript-eslint/types" "8.69.0" - "@typescript-eslint/typescript-estree" "8.69.0" - "@typescript-eslint/visitor-keys" "8.69.0" - debug "^4.4.3" - -"@typescript-eslint/project-service@8.69.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.69.0.tgz#cf728554436a50e644a5214a89fe02cb1ffa9af8" - integrity sha512-yi4obFrHMmnsesWehHbkg9zMA7Jt8cXT+mKM08G999pH1yT6nqgsHx7MYm0uY1wAj8CqiBXYRJ7WAT0QdQHQXg== - dependencies: - "@typescript-eslint/tsconfig-utils" "^8.69.0" - "@typescript-eslint/types" "^8.69.0" - debug "^4.4.3" - -"@typescript-eslint/scope-manager@8.69.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.69.0.tgz#13f3d1e25108e95a9ceb5a198806d1fa558f8c7a" - integrity sha512-ewfspqWvSxKSOaplqAUNbaSFO0eB6w1EtQ+esfYFRm3614Ty4uNtExkcbgd6nWsXphbqKyf9ZYdbZdv2xEoWEQ== - dependencies: - "@typescript-eslint/types" "8.69.0" - "@typescript-eslint/visitor-keys" "8.69.0" - -"@typescript-eslint/tsconfig-utils@8.69.0", "@typescript-eslint/tsconfig-utils@^8.69.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.69.0.tgz#d3b0ccc781ab252a90a0b3989b9d1eb85ab59469" - integrity sha512-xNqK7YTDZsLniQMV/4rpFR8Z5JlqeRvVjuG1YgF/mdPVH84HSD19L8CczMA0qg2RfwEV231GHH3VnToJDo4MfQ== - -"@typescript-eslint/type-utils@8.69.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.69.0.tgz#7ce68d2ebcbedd8421806c27a7f360755017159f" - integrity sha512-ZfoJAVg3JZndQEpEl9petVlxau3lRuElc4HRMuAlLCf8to04/iHz692RUSNmXKDjEuJmIL+KZ2/BsOcBc16dsA== - dependencies: - "@typescript-eslint/types" "8.69.0" - "@typescript-eslint/typescript-estree" "8.69.0" - "@typescript-eslint/utils" "8.69.0" - debug "^4.4.3" - ts-api-utils "^2.5.0" - -"@typescript-eslint/types@8.69.0", "@typescript-eslint/types@^8.69.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.69.0.tgz#5d9ad3f707c2e4f70a2db540031104df3e63bcf5" - integrity sha512-K3VrubUPhlo9VDBS6QdI8YB5j7ClpqLRdefcz6PFrhnwicehBweqQ9Evhl4l+FYz0HdDmMqIiSX0aldGRYtDCA== - -"@typescript-eslint/typescript-estree@8.69.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.69.0.tgz#efa915913ffe2049bbfd26092b95d1bc7c9c454f" - integrity sha512-AdFkgqck3Vudb/kWnxlyafU/4aBhHrbQ9locP2N4psXTy5mOBg0SHJumnLvx7r6g1gV4DKvUFwV2nJZBoqOD8w== - dependencies: - "@typescript-eslint/project-service" "8.69.0" - "@typescript-eslint/tsconfig-utils" "8.69.0" - "@typescript-eslint/types" "8.69.0" - "@typescript-eslint/visitor-keys" "8.69.0" - debug "^4.4.3" - minimatch "^10.2.2" - semver "^7.7.3" - tinyglobby "^0.2.15" - ts-api-utils "^2.5.0" - -"@typescript-eslint/utils@8.69.0", "@typescript-eslint/utils@^8.13.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.69.0.tgz#67ad9c00edf12fe2fbc0bf0a71b00822a8d02e97" - integrity sha512-tUbx60BBqQa31kXF5MCsOOLL5E/WzUuxIn7YpAvq+eaUlqvk8/NXnXMBNAdLCr0icjkzem7iUA5QqWHe/hJ1aw== - dependencies: - "@eslint-community/eslint-utils" "^4.9.1" - "@typescript-eslint/scope-manager" "8.69.0" - "@typescript-eslint/types" "8.69.0" - "@typescript-eslint/typescript-estree" "8.69.0" - -"@typescript-eslint/visitor-keys@8.69.0": - version "8.69.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.69.0.tgz#f659785dbb79733c40499f71a65439e2033966b5" - integrity sha512-+rmdgPA+EXkNgKYvHvFfhrs35utXbwaC5PGpDquSXcoXQDKUA5UjV0LmTucG/4JXkM31BTu4TilHtrN8IVBe8w== - dependencies: - "@typescript-eslint/types" "8.69.0" - eslint-visitor-keys "^5.0.0" +"@typescript-eslint/types@^8.56.0": + version "8.70.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.70.0.tgz#9ee52888cdeca604fe9436935219b967fa7f6053" + integrity sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ== "@ungap/structured-clone@^0.3.4": version "0.3.4" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-0.3.4.tgz#f6d804e185591373992781361e4aa5bb81ffba35" integrity sha512-TSVh8CpnwNAsPC5wXcIyh92Bv1gq6E9cNDeeLu7Z4h8V4/qWtXJp7y42qljRkqcpmsve1iozwv1wr+3BNdILCg== -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - "@vitejs/plugin-basic-ssl@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.1.0.tgz#8b840305a6b48e8764803435ec0c716fa27d3802" @@ -9220,7 +9106,7 @@ acorn-import-attributes@^1.9.5: resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== -acorn-jsx@^5.3.1, acorn-jsx@^5.3.2: +acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== @@ -9244,12 +9130,12 @@ acorn-walk@^8.0.2: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.0.tgz#2097665af50fd0cf7a2dfccd2b9368964e66540f" integrity sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA== -acorn@^7.0.0, acorn@^7.4.0: +acorn@^7.0.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.1.0, acorn@^8.15.0, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.1.0, acorn@^8.15.0, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2: version "8.18.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.18.0.tgz#4faf01b2d6d326bfeed97aea1f52220b5f4c1940" integrity sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ== @@ -9332,7 +9218,7 @@ ajv-keywords@^5.1.0: dependencies: fast-deep-equal "^3.1.3" -ajv@8.17.1, ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.9.0: +ajv@8.17.1, ajv@^8.0.0, ajv@^8.12.0, ajv@^8.9.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== @@ -9342,7 +9228,7 @@ ajv@8.17.1, ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.9.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.12.6: +ajv@^6.12.5, ajv@^6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -9357,7 +9243,7 @@ anser@^2.1.1: resolved "https://registry.yarnpkg.com/anser/-/anser-2.1.1.tgz#8afae28d345424c82de89cc0e4d1348eb0c5af7c" integrity sha512-nqLm4HxOTpeLOxcmB3QWmV5TcDFhW9y/fyQ+hivtDFcK4OQ+pQ5fzPnXHM1Mfcm0VkLtvVi1TCPr++Qy0Q/3EQ== -ansi-colors@4.1.3, ansi-colors@^4.1.1, ansi-colors@^4.1.3: +ansi-colors@4.1.3, ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== @@ -9603,15 +9489,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.flat@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13" - integrity sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - array.prototype.flatmap@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz#908dc82d8a406930fdf38598d51e7411d18d4446" @@ -9727,11 +9604,6 @@ ast-v8-to-istanbul@^1.0.0: estree-walker "^3.0.3" js-tokens "^10.0.0" -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - async-limiter@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" @@ -11097,7 +10969,7 @@ config-chain@^1.1.13: ini "^1.3.4" proto-list "~1.2.1" -confusing-browser-globals@^1.0.10, confusing-browser-globals@^1.0.5: +confusing-browser-globals@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== @@ -11395,7 +11267,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.6: +cross-spawn@^7.0.0, cross-spawn@^7.0.3, cross-spawn@^7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -11764,21 +11636,21 @@ dayjs@1.x, dayjs@^1.10.0, dayjs@^1.10.4: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.7.tgz#2cf5f91add28116748440866a0a1d26f3a6ce468" integrity sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig== -debug@2.6.9, debug@^2.2.0, debug@^2.6.9: +debug@2.6.9, debug@^2.2.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@4, debug@4.4.3, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.4.1, debug@^4.4.3: +debug@4, debug@4.4.3, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.4.1, debug@^4.4.3: version "4.4.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== dependencies: ms "^2.1.3" -debug@^3.1.0, debug@^3.2.7: +debug@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -11844,11 +11716,6 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" @@ -12078,13 +11945,6 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dom-align@^1.7.0: version "1.12.2" resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.12.2.tgz#0f8164ebd0c9c21b0c790310493cd855892acd4b" @@ -12367,14 +12227,6 @@ enhanced-resolve@^5.17.1: graceful-fs "^4.2.4" tapable "^2.2.0" -enquirer@^2.3.5: - version "2.4.1" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" - integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== - dependencies: - ansi-colors "^4.1.1" - strip-ansi "^6.0.1" - entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -12679,7 +12531,7 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: +escape-string-regexp@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== @@ -12700,15 +12552,6 @@ escodegen@^2.0.0, escodegen@^2.1.0: optionalDependencies: source-map "~0.6.1" -eslint-config-airbnb-base@^13.1.0: - version "13.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.2.0.tgz#f6ea81459ff4dec2dda200c35f1d8f7419d57943" - integrity sha512-1mg/7eoB4AUeB0X1c/ho4vb2gYkNH8Trr/EgCT/aGmKhhG+F6vF5s8+iRBlWAzFIAphxIdp3YfEKgEl0f9Xg+w== - dependencies: - confusing-browser-globals "^1.0.5" - object.assign "^4.1.0" - object.entries "^1.1.0" - eslint-config-airbnb-base@^14.2.1: version "14.2.1" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" @@ -12727,57 +12570,6 @@ eslint-config-airbnb@^18.1.0: object.assign "^4.1.2" object.entries "^1.1.2" -eslint-import-resolver-node@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" - integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== - dependencies: - debug "^3.2.7" - resolve "^1.20.0" - -eslint-module-utils@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz#b435001c9f8dd4ab7f6d0efcae4b9696d4c24b7c" - integrity sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ== - dependencies: - debug "^3.2.7" - find-up "^2.1.0" - pkg-dir "^2.0.0" - -eslint-plugin-cypress@^2.12.1: - version "2.12.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632" - integrity sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA== - dependencies: - globals "^11.12.0" - -eslint-plugin-es@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz#0f5f5da5f18aa21989feebe8a73eadefb3432976" - integrity sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ== - dependencies: - eslint-utils "^1.4.2" - regexpp "^3.0.0" - -eslint-plugin-import@^2.22.1: - version "2.25.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz#a554b5f66e08fb4f6dc99221866e57cfff824766" - integrity sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg== - dependencies: - array-includes "^3.1.4" - array.prototype.flat "^1.2.5" - debug "^2.6.9" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.1" - has "^1.0.3" - is-core-module "^2.8.0" - is-glob "^4.0.3" - minimatch "^3.0.4" - object.values "^1.1.5" - resolve "^1.20.0" - tsconfig-paths "^3.11.0" - eslint-plugin-jsx-a11y@^6.2.3: version "6.5.1" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz#cdbf2df901040ca140b6ec14715c988889c2a6d8" @@ -12796,18 +12588,6 @@ eslint-plugin-jsx-a11y@^6.2.3: language-tags "^1.0.5" minimatch "^3.0.4" -eslint-plugin-node@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz#fd1adbc7a300cf7eb6ac55cf4b0b6fc6e577f5a6" - integrity sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ== - dependencies: - eslint-plugin-es "^2.0.0" - eslint-utils "^1.4.2" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - eslint-plugin-react@^7.20.0: version "7.27.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.27.1.tgz#469202442506616f77a854d91babaae1ec174b45" @@ -12828,7 +12608,7 @@ eslint-plugin-react@^7.20.0: semver "^6.3.0" string.prototype.matchall "^4.0.6" -eslint-scope@5.1.1, eslint-scope@^5.1.1: +eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -12836,144 +12616,17 @@ eslint-scope@5.1.1, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^1.4.2: - version "1.4.3" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" - integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint-visitor-keys@^4.2.0, eslint-visitor-keys@^4.2.1: +eslint-visitor-keys@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== -eslint-visitor-keys@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz#9e3c9489697824d2d4ce3a8ad12628f91e9f59be" - integrity sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA== - -eslint@^7.21.0: - version "7.32.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" - integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.0.1" - doctrine "^3.0.0" - enquirer "^2.3.5" - escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^3.13.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.0.4" - natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.9" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -eslint@^8.57.1: - version "8.57.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" - integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.1" - "@humanwhocodes/config-array" "^0.13.0" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -espree@^10.3.0: +espree@^10.4.0: version "10.4.0" resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837" integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ== @@ -12982,36 +12635,11 @@ espree@^10.3.0: acorn-jsx "^5.3.2" eslint-visitor-keys "^4.2.1" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== - dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" - -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0, esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -13024,7 +12652,7 @@ estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: +estraverse@^5.2.0, estraverse@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -13335,11 +12963,6 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-sta resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - fast-string-truncated-width@3.0.3, fast-string-truncated-width@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz#23afe0da67d752ca0727538f1e6967759728ce49" @@ -13473,13 +13096,6 @@ figures@3.2.0, figures@^3.0.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - file-type@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-9.0.0.tgz#a68d5ad07f486414dfb2c8866f73161946714a18" @@ -13535,13 +13151,6 @@ find-java-home@^2.0.0: which "~1.0.5" winreg "~1.2.2" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -13550,14 +13159,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - find-up@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" @@ -13584,14 +13185,6 @@ firebolt-sdk@1.10.0: json-bigint "^1.0.0" node-fetch "^2.6.6" -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - flat@5.0.2, flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" @@ -13602,11 +13195,6 @@ flatbuffers@25.9.23: resolved "https://registry.yarnpkg.com/flatbuffers/-/flatbuffers-25.9.23.tgz#346811557fe9312ab5647535e793c761e9c81eb1" integrity sha512-MI1qs7Lo4Syw0EOzUl0xjs2lsoeqFku44KpngfIduHBYvzm8h2+7K8YMQh1JtVVVrUvhLpNwqVi4DERegUJhPQ== -flatted@^3.1.0: - version "3.4.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.4.2.tgz#f5c23c107f0f37de8dbdf24f13722b3b98d52726" - integrity sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA== - flexsearch@^0.7.21: version "0.7.21" resolved "https://registry.yarnpkg.com/flexsearch/-/flexsearch-0.7.21.tgz#0f5ede3f2aae67ddc351efbe3b24b69d29e9d48b" @@ -13789,11 +13377,6 @@ function.prototype.name@^1.1.6: es-abstract "^1.22.1" functions-have-names "^1.2.3" -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -13998,7 +13581,7 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.1, glob-parent@^6.0.2: +glob-parent@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== @@ -14081,18 +13664,6 @@ global@~4.4.0: min-document "^2.19.0" process "^0.11.10" -globals@^11.12.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0, globals@^13.6.0, globals@^13.9.0: - version "13.23.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" - integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== - dependencies: - type-fest "^0.20.2" - globalthis@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" @@ -14183,11 +13754,6 @@ graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - graphiql@^1.8.6: version "1.8.6" resolved "https://registry.yarnpkg.com/graphiql/-/graphiql-1.8.6.tgz#45c1e68cf988b884c1db6db9ff8bafe4e70dcb54" @@ -14726,16 +14292,11 @@ ignore-walk@^8.0.0: dependencies: minimatch "^10.0.3" -ignore@7.0.5, ignore@^7.0.3, ignore@^7.0.5: +ignore@7.0.5, ignore@^7.0.3: version "7.0.5" resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - ignore@^5.1.1, ignore@^5.1.9, ignore@^5.2.0: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" @@ -14771,7 +14332,7 @@ immutable@~3.7.4: resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" integrity sha1-E7TTyxK++hVIKib+Gy665kAHHks= -import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: +import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -15019,7 +14580,7 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.13.0, is-core-module@^2.16.1, is-core-module@^2.5.0, is-core-module@^2.8.0: +is-core-module@^2.13.0, is-core-module@^2.16.1, is-core-module@^2.5.0: version "2.16.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== @@ -15092,7 +14653,7 @@ is-generator-function@^1.0.7: has-tostringtag "^1.0.2" safe-regex-test "^1.1.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: +is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -15156,7 +14717,7 @@ is-path-cwd@^2.2.0: resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== -is-path-inside@^3.0.2, is-path-inside@^3.0.3: +is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -16096,11 +15657,6 @@ json-schema@0.4.0: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - json-stringify-nice@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz#2c937962b80181d3f317dd39aa323e14f5a60a67" @@ -16123,13 +15679,6 @@ json5@2.2.3, json5@^2.1.2, json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -json5@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" - integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== - dependencies: - minimist "^1.2.0" - jsonc-parser@3.3.1, jsonc-parser@^3.0.0, jsonc-parser@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" @@ -16384,14 +15933,6 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - libnpmaccess@10.0.3: version "10.0.3" resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-10.0.3.tgz#856dc29fd35050159dff0039337aab503367586b" @@ -16597,14 +16138,6 @@ loader-utils@^2.0.0: emojis-list "^3.0.0" json5 "^2.1.2" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -16612,13 +16145,6 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - locate-path@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" @@ -16681,21 +16207,11 @@ lodash.memoize@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - lodash.once@^4.0.0, lodash.once@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= - lodash.upperfirst@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" @@ -17172,7 +16688,7 @@ minimatch@10.2.5: dependencies: brace-expansion "^5.0.5" -minimatch@3.1.4, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.2: +minimatch@3.1.4, minimatch@^3.0.4, minimatch@^3.0.5: version "3.1.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.4.tgz#89d910ea3970a77ac8edfd30340ccd038b758079" integrity sha512-twmL+S8+7yIsE9wsqgzU3E8/LumN3M3QELrBZ20OdmQ9jB2JvW5oZtBEmft84k/Gs5CG9mqtWc6Y9vW+JEzGxw== @@ -17186,7 +16702,7 @@ minimatch@9.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^10.0.3, minimatch@^10.1.1, minimatch@^10.2.2: +minimatch@^10.0.3, minimatch@^10.1.1: version "10.2.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.6.tgz#fd956bbe0b77241e9f15ac5dccb1c638060968ef" integrity sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A== @@ -18300,7 +17816,7 @@ object-treeify@^1.1.4: resolved "https://registry.yarnpkg.com/object-treeify/-/object-treeify-1.1.33.tgz#f06fece986830a3cba78ddd32d4c11d1f76cdf40" integrity sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A== -object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.5: +object.assign@^4.1.2, object.assign@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== @@ -18310,7 +17826,7 @@ object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.0, object.entries@^1.1.2, object.entries@^1.1.5: +object.entries@^1.1.2, object.entries@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== @@ -18435,18 +17951,6 @@ optimism@^0.18.0: "@wry/trie" "^0.4.3" tslib "^2.3.0" -optionator@^0.9.1, optionator@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== - dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - ora@5.4.1, ora@^5.1.0: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -18482,18 +17986,36 @@ ospath@^1.2.2: resolved "https://registry.yarnpkg.com/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" integrity sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs= +oxlint@^1.82.0: + version "1.82.0" + resolved "https://registry.yarnpkg.com/oxlint/-/oxlint-1.82.0.tgz#21c8362538cfffa93c7515174097381918b2d7e0" + integrity sha512-+iFM1BGw1ntYJt3QngbJmjbrGxPaKMUADOXOijpWGnYcBPq8YZnQftSS1C+pVcDYy9YxqDVJKQqQkTazTQMboQ== + optionalDependencies: + "@oxlint/binding-android-arm-eabi" "1.82.0" + "@oxlint/binding-android-arm64" "1.82.0" + "@oxlint/binding-darwin-arm64" "1.82.0" + "@oxlint/binding-darwin-x64" "1.82.0" + "@oxlint/binding-freebsd-x64" "1.82.0" + "@oxlint/binding-linux-arm-gnueabihf" "1.82.0" + "@oxlint/binding-linux-arm-musleabihf" "1.82.0" + "@oxlint/binding-linux-arm64-gnu" "1.82.0" + "@oxlint/binding-linux-arm64-musl" "1.82.0" + "@oxlint/binding-linux-ppc64-gnu" "1.82.0" + "@oxlint/binding-linux-riscv64-gnu" "1.82.0" + "@oxlint/binding-linux-riscv64-musl" "1.82.0" + "@oxlint/binding-linux-s390x-gnu" "1.82.0" + "@oxlint/binding-linux-x64-gnu" "1.82.0" + "@oxlint/binding-linux-x64-musl" "1.82.0" + "@oxlint/binding-openharmony-arm64" "1.82.0" + "@oxlint/binding-win32-arm64-msvc" "1.82.0" + "@oxlint/binding-win32-ia32-msvc" "1.82.0" + "@oxlint/binding-win32-x64-msvc" "1.82.0" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -18501,7 +18023,7 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.1, p-limit@^3.0.2, p-limit@^3.1.0: +p-limit@^3.0.1, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -18515,13 +18037,6 @@ p-limit@^4.0.0: dependencies: yocto-queue "^1.0.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -18529,13 +18044,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - p-locate@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" @@ -18579,11 +18087,6 @@ p-timeout@^3.2.0: dependencies: p-finally "^1.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -18830,11 +18333,6 @@ password-prompt@^1.1.2: ansi-escapes "^3.1.0" cross-spawn "^6.0.5" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -19087,13 +18585,6 @@ pixelmatch@^5.1.0: dependencies: pngjs "^4.0.1" -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -19257,11 +18748,6 @@ prebuild-install@^7.1.1: tar-fs "^2.0.0" tunnel-agent "^0.6.0" -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - presto-client@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/presto-client/-/presto-client-1.2.0.tgz#7f6c4d78092298fa4b107775f8a2fabe008772e9" @@ -19333,11 +18819,6 @@ proggy@^3.0.0: resolved "https://registry.yarnpkg.com/proggy/-/proggy-3.0.0.tgz#874e91fed27fe00a511758e83216a6b65148bd6c" integrity sha512-QE8RApCM3IaRRxVzxrjbgNMpQEX6Wu0p0KBeoSiSEw5/bsGwZHsshF4LCxH2jp/r6BU+bqA3LrMDEYNfJnpD8Q== -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise-all-reject-late@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" @@ -20467,11 +19948,6 @@ regexp.prototype.flags@^1.3.1, regexp.prototype.flags@^1.5.2: es-errors "^1.3.0" set-function-name "^2.0.1" -regexpp@^3.0.0, regexpp@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - regexpu-core@^6.3.1: version "6.4.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-6.4.0.tgz#3580ce0c4faedef599eccb146612436b62a176e5" @@ -20575,7 +20051,7 @@ resolve@1.22.8: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.11: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.11: version "1.22.12" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.12.tgz#f5b2a680897c69c238a13cd16b15671f8b73549f" integrity sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA== @@ -20973,7 +20449,7 @@ semver@7.6.3: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -semver@7.7.2, semver@^7.0.0, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3, semver@^7.7.2: +semver@7.7.2, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3, semver@^7.7.2: version "7.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== @@ -20983,12 +20459,12 @@ semver@7.8.4: resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.4.tgz#c73eceebae0616934be8dff28a7fd70757c8e696" integrity sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA== -semver@^6.0.0, semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: +semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.5.2, semver@^7.7.3, semver@^7.8.5: +semver@^7.5.2, semver@^7.8.5: version "7.8.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.5.tgz#39b646037dd50c14fb451e7e4cac58ed8b863f69" integrity sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA== @@ -21311,15 +20787,6 @@ slash@^5.1.0: resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce" integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg== -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - slice-ansi@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" @@ -21966,7 +21433,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -22096,17 +21563,6 @@ systeminformation@^5.31.1: resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-5.33.8.tgz#9fa0092e71adf50a7b8d5209c0767eb16dfe727a" integrity sha512-v4F6OGYGh7wDvV68YmjOmZwGixV9A/GQ7d2b84t0UF4CaOy9jipNWIJDkHqYDYiTPuiojqlwVQd0hfUKOUN7tQ== -table@^6.0.9: - version "6.7.5" - resolved "https://registry.yarnpkg.com/table/-/table-6.7.5.tgz#f04478c351ef3d8c7904f0e8be90a1b62417d238" - integrity sha512-LFNeryOqiQHqCVKzhkymKwt6ozeRhlm8IL1mE8rNUurkir4heF6PzMyRgaTa4tlyPTGGgXuvVOF/OLWiH09Lqw== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -22297,11 +21753,6 @@ text-hex@1.0.x: resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - textextensions@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.6.0.tgz#d7e4ab13fe54e32e08873be40d51b74229b00fc4" @@ -22545,11 +21996,6 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" -ts-api-utils@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.5.0.tgz#4acd4a155e22734990a5ed1fe9e97f113bcb37c1" - integrity sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA== - ts-invariant@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.10.3.tgz#3e048ff96e91459ffca01304dbc7f61c1f642f6c" @@ -22586,16 +22032,6 @@ tsconfig-paths@4.2.0: minimist "^1.2.6" strip-bom "^3.0.0" -tsconfig-paths@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b" - integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" - tslib@2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" @@ -22651,13 +22087,6 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -22673,11 +22102,6 @@ type-fest@^0.16.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg== -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -23097,11 +22521,6 @@ v-protocol@1.1.1: resolved "https://registry.npmjs.org/v-protocol/-/v-protocol-1.1.1.tgz#03a817757326c16ae5f54dcab14b196d01d594f3" integrity sha512-HkIPshuFEK0awxmLN2ECTzBqncxDSBjzJ2U89u3BhykNSJ8uumYj9g74l59i2K/2lRO5t0gm40iUHuJkpEnvGw== -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - v8-to-istanbul@^9.0.1: version "9.3.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" From 0934166116d93ce641329903e0cf6748c5df9588 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Mon, 7 Sep 2026 19:51:30 +0200 Subject: [PATCH 05/11] refactor(linter): enable oxlint for cubejs-playground `cubejs-playground` declared `eslint-config-airbnb`, `eslint-plugin-jsx-a11y` and `eslint-plugin-react` but had no `lint` script and no eslintrc, so nothing ever ran them; 1c1111099f then put the package in oxlint's ignore list and dropped `eslint` itself, leaving a config and two plugins with no runner. Take the package off the ignore list, delete the three dead devDependencies, and give it a real config. The React rule set moves out of `cubejs-client-react/.oxlintrc.json` (928 lines) into `@cubejs-backend/linter/airbnb-react.json`, so both React packages extend one set instead of a copy. Equivalence was checked empirically, not by reading: `--print-config` does not fully resolve `extends` (it reports 138 rules instead of 204 and loses `jsPlugins` entirely), so a probe .tsx with option-dependent violations -- max-len 120, jsx-wrap-multilines, anchor-is-valid with `components: ["Link"]` -- was linted under both configs. Ten findings, identical. | | | | --- | --- | | oxlint on the package | 1372 -> 279 errors | | `yarn unit` | 1 passed | | `npx tsc` | 160 errors, byte-identical to the same run on HEAD | The 160 type errors are pre-existing: the clean reinstall wiped `@cubejs-client/react`'s `dist`, so its declarations do not resolve. No new one appeared, which is what makes the ~1000 autofixed findings reviewable at all. Three deliberate rule departures, all in the package's own config: - `prefer-const` moves to airbnb's `destructuring: "all"`. With `"any"` the rule fires on a `let { ... } = props` pattern when any single binding is never reassigned, and this package follows the @cube-dev/ui-kit idiom of reassigning some props-derived locals (`titleStyles = useMemo(...)`), so the pattern needs `let` and no autofix could ever touch the 44 reports. - `no-use-before-define` gets `functions: false`. Files here are laid out top-down -- exported component first, local helpers below -- which hoisted function declarations make legal. 43 -> 12. - `@stylistic/jsx-one-expression-per-line` is off. Its autofix splits `{cubeName} {name}` across lines and has to inject a bare `{' '}` line to preserve the space, which it did 61 times. Cosmetic rule, anti-cosmetic fix. Note for whoever touches this config next: the last two had to go in an `overrides` entry, not top-level `rules`. airbnb-react.json declares 102 rules inside an `overrides` block for `**/*.ts,**/*.tsx`, and an extended `overrides` entry outranks the extending config's own top-level `rules` -- tuning `no-use-before-define` there had no effect at all, with either setting. Do not run `oxlint --fix-suggestions` on this package. Its `no-void` fixer rewrites `void expr;` to `undefined;`, deleting the call: - void runQuery(); + undefined; It also collapsed a 20-line `void parseAndPrepareQuery(...).then(...)` chain to `undefined;`. Those edits were reverted; only plain `--fix` was applied. INCOMPLETE: `yarn lint` is red, 279 errors left. What is fixed by hand is the mechanically safe set -- 22 unused `catch` bindings to `catch {`, all 15 `no-unused-vars` including the dead `getJSONValidator` and the `Meta` and `CHART_HEIGHT` it orphaned. What is left needs judgment in a 262-file package with one test file: | rule | count | | --- | --- | | `no-shadow` | 146 | | `no-nested-ternary` | 30 | | `react/no-array-index-key` | 13 | | `no-use-before-define` | 12 | | jsx-a11y | 9 | | `no-throw-literal` | 5 | | assorted mechanical, not yet reached | ~64 | `no-throw-literal` is last on the list on purpose: the thrown strings are load-bearing for the form validators' displayed messages, `throw ''; // do not show any error message` among them. --- .oxlintrc.json | 1 - packages/cubejs-client-react/.oxlintrc.json | 925 +----------------- packages/cubejs-linter/airbnb-react.json | 920 +++++++++++++++++ packages/cubejs-playground/.oxlintrc.json | 53 + packages/cubejs-playground/package.json | 3 - packages/cubejs-playground/postbuild.js | 2 +- .../cubejs-playground/src/ChartContainer.tsx | 70 +- .../src/QueryBuilder/FilterGroup.tsx | 29 +- .../src/QueryBuilder/MemberDropdown.tsx | 19 +- .../src/QueryBuilder/TimeGroup.tsx | 16 +- .../src/QueryBuilder/TimeRangeSelector.tsx | 6 +- .../QueryBuilderV2/Pivot/DroppableArea.tsx | 6 +- .../src/QueryBuilderV2/Pivot/Options.tsx | 8 +- .../src/QueryBuilderV2/QueryBuilder.tsx | 18 +- .../src/QueryBuilderV2/QueryBuilderChart.tsx | 47 +- .../src/QueryBuilderV2/QueryBuilderExtras.tsx | 35 +- .../QueryBuilderGeneratedSQL.tsx | 7 +- .../QueryBuilderV2/QueryBuilderGraphQL.tsx | 29 +- .../QueryBuilderV2/QueryBuilderInternals.tsx | 98 +- .../src/QueryBuilderV2/QueryBuilderRest.tsx | 4 +- .../QueryBuilderV2/QueryBuilderResults.tsx | 386 ++++---- .../src/QueryBuilderV2/QueryBuilderSQL.tsx | 7 +- .../QueryBuilderV2/QueryBuilderSidePanel.tsx | 253 +++-- .../QueryBuilderV2/QueryBuilderToolBar.tsx | 4 +- .../components/Accordion/AccordionDetails.tsx | 4 +- .../Accordion/AccordionItemTitle.tsx | 6 +- .../components/AddFilterInput.tsx | 27 +- .../src/QueryBuilderV2/components/Arrow.tsx | 2 +- .../src/QueryBuilderV2/components/Badge.tsx | 23 +- .../components/ChartRenderer.tsx | 144 ++- .../QueryBuilderV2/components/CopyIcon.tsx | 2 +- .../components/DateRangeFilter.tsx | 41 +- .../components/EditQueryDialogForm.tsx | 65 +- .../QueryBuilderV2/components/FilterLabel.tsx | 1 - .../components/FilterMember.tsx | 51 +- .../components/InfoIconButton.tsx | 4 +- .../components/InstanceTooltipProvider.tsx | 4 +- .../QueryBuilderV2/components/ListCube.tsx | 4 +- .../QueryBuilderV2/components/ListMember.tsx | 78 +- .../QueryBuilderV2/components/LocalError.tsx | 5 +- .../components/OutdatedLabel.tsx | 5 +- .../components/ReorderableList.tsx | 56 +- .../components/SegmentFilter.tsx | 1 - .../components/SidePanelCubeItem.tsx | 588 ++++++----- .../QueryBuilderV2/components/Tabs/Tabs.tsx | 38 +- .../components/TimeDateRangeSelector.tsx | 6 +- .../components/TimeListMember.tsx | 76 +- .../QueryBuilderV2/components/ValuesInput.tsx | 197 ++-- .../src/QueryBuilderV2/hooks/auto-size.ts | 18 +- .../hooks/debounced-callback.ts | 2 +- .../QueryBuilderV2/hooks/filtered-cubes.ts | 44 +- .../QueryBuilderV2/hooks/filtered-members.ts | 20 +- .../src/QueryBuilderV2/hooks/local-storage.ts | 8 +- .../src/QueryBuilderV2/hooks/query-builder.ts | 238 ++--- .../src/QueryBuilderV2/hooks/raw-filter.ts | 13 +- .../hooks/server-core-version-gte.ts | 9 +- .../src/QueryBuilderV2/hooks/uniq-id.ts | 3 +- .../src/QueryBuilderV2/icons/ChevronIcon.tsx | 2 +- .../src/QueryBuilderV2/icons/ItemInfoIcon.tsx | 4 +- .../QueryBuilderV2/icons/NonPublicIcon.tsx | 24 +- .../QueryBuilderV2/icons/PrimaryKeyIcon.tsx | 40 +- .../src/QueryBuilderV2/types.ts | 2 +- .../src/QueryBuilderV2/utils/contains.ts | 2 +- .../utils/cube-sql-converter.ts | 45 +- .../utils/format-date-by-granularity.tsx | 4 +- .../src/QueryBuilderV2/utils/formatters.ts | 26 +- .../utils/get-used-cubes-and-members.ts | 5 +- .../utils/graphql-converters.ts | 34 +- .../QueryBuilderV2/utils/move-pivot-config.ts | 4 +- .../src/QueryBuilderV2/utils/titleize.ts | 2 +- .../QueryBuilderV2/utils/validate-query.ts | 62 +- .../src/atoms/CodeSnippet.tsx | 2 +- .../src/atoms/CubeLoader.tsx | 5 +- packages/cubejs-playground/src/cloud/index.ts | 2 +- .../src/components/CachePane.tsx | 52 +- .../ChartRenderer/ChartRenderer.tsx | 36 +- .../DrilldownModal/DrilldownModal.tsx | 4 +- .../DrilldownModal/TableQueryRenderer.tsx | 10 +- .../src/components/Error/FatalError.tsx | 13 +- .../src/components/Error/utils.ts | 2 +- .../src/components/GlobalStyles.tsx | 4 +- .../GraphQL/CubeGraphQLConverter.ts | 45 +- .../components/GraphQL/GraphiQLSandbox.tsx | 26 +- .../src/components/Header/Header.tsx | 4 +- .../src/components/Header/RunOnCubeCloud.tsx | 4 +- .../LivePreviewContextProvider.tsx | 71 +- .../src/components/Order/DraggableItem.tsx | 22 +- .../src/components/Pivot/Options.tsx | 8 +- .../QueryBuilderContainer.tsx | 12 +- .../components/PlaygroundQueryBuilder.tsx | 53 +- .../components/PreAggregationStatus.tsx | 4 +- .../src/components/QueryTabs/QueryTabs.tsx | 40 +- .../SecurityContext/SecurityContext.tsx | 4 +- .../SecurityContextProvider.tsx | 12 +- .../src/components/Settings/Settings.tsx | 8 +- .../src/components/Vizard/Vizard.tsx | 25 +- packages/cubejs-playground/src/events.ts | 2 +- packages/cubejs-playground/src/grid/Box.tsx | 4 +- packages/cubejs-playground/src/grid/index.ts | 4 +- .../src/hooks/app-context.ts | 2 +- .../src/hooks/local-storage.ts | 6 +- .../src/hooks/server-core-version.ts | 12 +- .../src/hooks/window-size.tsx | 8 +- packages/cubejs-playground/src/index.tsx | 20 +- .../ConnectionWizard/ConnectionWizardPage.tsx | 18 +- .../components/Base64Upload.tsx | 4 +- .../components/DatabaseForm.tsx | 74 +- .../components/LocalhostTipBox.tsx | 4 +- .../src/pages/CubeBI/CubeBiPage.tsx | 1 - .../src/pages/Explore/ExplorePage.tsx | 10 +- .../FrontendIntegrationsPage.tsx | 286 +++--- .../src/pages/Index/IndexPage.tsx | 4 +- .../src/pages/Schema/SchemaPage.tsx | 124 ++- .../components/PlaygroundWrapper.tsx | 6 +- .../playground/components/QueryBuilder.tsx | 39 +- .../src/rollup-designer/Context.tsx | 3 +- .../src/rollup-designer/RollupDesigner.tsx | 47 +- .../src/rollup-designer/components/Cubes.tsx | 110 +-- .../components/RollupDesignerModal.tsx | 7 +- .../rollup-designer/components/Settings.tsx | 4 +- .../src/rollup-designer/utils.ts | 20 +- .../cubejs-playground/src/shared/helpers.ts | 17 +- .../src/shared/icons/GraphQLIcon.tsx | 186 ++-- .../cubejs-playground/src/shared/members.ts | 10 +- .../cubejs-playground/src/shared/request.ts | 2 +- packages/cubejs-playground/src/types.ts | 2 +- packages/cubejs-playground/src/utils.ts | 12 +- yarn.lock | 636 +----------- 128 files changed, 3139 insertions(+), 3998 deletions(-) create mode 100644 packages/cubejs-linter/airbnb-react.json create mode 100644 packages/cubejs-playground/.oxlintrc.json diff --git a/.oxlintrc.json b/.oxlintrc.json index 3e1cc653322f9..55fa70545a17e 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -26,7 +26,6 @@ "examples/", "rust/cubesql/", // never covered by the ESLint setup this replaced - "packages/cubejs-playground/", "packages/cubejs-testing/cypress/", "packages/cubejs-testing/birdbox-fixtures/", // a mongosh script, not Node: `db` is a shell global diff --git a/packages/cubejs-client-react/.oxlintrc.json b/packages/cubejs-client-react/.oxlintrc.json index 88722c03423d7..f25f48fab792b 100644 --- a/packages/cubejs-client-react/.oxlintrc.json +++ b/packages/cubejs-client-react/.oxlintrc.json @@ -1,928 +1,17 @@ -// eslint-config-airbnb (the React flavour) ported to oxlint, expressed as the delta -// from the repo-root config. Rules with no oxlint equivalent and not carried over: -// react/sort-comp, react/no-deprecated, react/no-typos, react/no-unused-state, -// react/no-access-state-in-setstate, and the PropTypes family (no-unused-prop-types, -// require-default-props, forbid-foreign-prop-types, default-props-match-prop-types) -// -- all legacy class-component rules, and this package is TS + hooks. +// cubejs-client-react's lint config: the shared React rule set plus this package's own +// environment. The rules themselves live in @cubejs-backend/linter/airbnb-react.json so +// cubejs-playground can extend the same set. { "$schema": "../../node_modules/oxlint/configuration_schema.json", "extends": [ - "../../.oxlintrc.json" - ], - "plugins": [ - "eslint", - "import", - "jsx-a11y", - "node", - "react", - "typescript", - "unicorn" - ], - "jsPlugins": [ - "@stylistic/eslint-plugin" + "../../.oxlintrc.json", + "../cubejs-linter/airbnb-react.json" ], + // env and ignorePatterns are not inherited through `extends` "env": { "node": true, "browser": true, "es6": true }, - "ignorePatterns": [ - "dist/", - "lib/", - "coverage/", - "**/*.d.ts" - ], - "rules": { - "@stylistic/jsx-closing-bracket-location": [ - "error", - "line-aligned" - ], - "@stylistic/jsx-closing-tag-location": "error", - "@stylistic/jsx-curly-newline": [ - "error", - { - "multiline": "consistent", - "singleline": "consistent" - } - ], - "@stylistic/jsx-curly-spacing": [ - "error", - "never", - { - "allowMultiline": true - } - ], - "@stylistic/jsx-equals-spacing": [ - "error", - "never" - ], - "@stylistic/jsx-max-props-per-line": [ - "error", - { - "maximum": 1, - "when": "multiline" - } - ], - "@stylistic/jsx-one-expression-per-line": [ - "error", - { - "allow": "single-child" - } - ], - "@stylistic/jsx-quotes": [ - "error", - "prefer-double" - ], - "@stylistic/jsx-wrap-multilines": [ - "error", - { - "declaration": "parens-new-line", - "assignment": "parens-new-line", - "return": "parens-new-line", - "arrow": "parens-new-line", - "condition": "parens-new-line", - "logical": "parens-new-line", - "prop": "parens-new-line" - } - ], - "@stylistic/max-len": [ - "error", - 120, - 2, - { - "ignoreUrls": true, - "ignoreComments": true, - "ignoreRegExpLiterals": true, - "ignoreStrings": true, - "ignoreTemplateLiterals": true - } - ], - "@stylistic/no-trailing-spaces": [ - "error", - { - "skipBlankLines": true, - "ignoreComments": false - } - ], - "@stylistic/operator-linebreak": [ - "error", - "before", - { - "overrides": { - "=": "none" - } - } - ], - "@stylistic/type-annotation-spacing": "off", - "import/no-named-as-default": "off", - "import/no-named-as-default-member": "off", - "jsx-a11y/alt-text": [ - "error", - { - "elements": [ - "img", - "object", - "area", - "input[type=\"image\"]" - ], - "img": [], - "object": [], - "area": [], - "input[type=\"image\"]": [] - } - ], - "jsx-a11y/anchor-has-content": [ - "error", - { - "components": [] - } - ], - "jsx-a11y/anchor-is-valid": [ - "error", - { - "components": [ - "Link" - ], - "specialLink": [ - "to" - ], - "aspects": [ - "noHref", - "invalidHref", - "preferButton" - ] - } - ], - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": [ - "error", - { - "ignoreNonDOM": false - } - ], - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "error", - { - "labelAttributes": [ - "label" - ], - "controlComponents": [], - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video" - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid" - ], - "depth": 5 - } - ], - "jsx-a11y/heading-has-content": [ - "error", - { - "components": [ - "" - ] - } - ], - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": "error", - "jsx-a11y/label-has-associated-control": [ - "error", - { - "labelComponents": [], - "labelAttributes": [], - "controlComponents": [], - "assert": "both", - "depth": 25 - } - ], - "jsx-a11y/lang": "error", - "jsx-a11y/media-has-caption": [ - "error", - { - "audio": [], - "video": [], - "track": [] - } - ], - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": [ - "error", - { - "ignoreNonDOM": true - } - ], - "jsx-a11y/no-distracting-elements": [ - "error", - { - "elements": [ - "marquee", - "blink" - ] - } - ], - "jsx-a11y/no-interactive-element-to-noninteractive-role": [ - "error", - { - "tr": [ - "none", - "presentation" - ] - } - ], - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp" - ] - } - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": [ - "error", - { - "ul": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid" - ], - "ol": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid" - ], - "li": [ - "menuitem", - "option", - "row", - "tab", - "treeitem" - ], - "table": [ - "grid" - ], - "td": [ - "gridcell" - ] - } - ], - "jsx-a11y/no-noninteractive-tabindex": [ - "error", - { - "tags": [], - "roles": [ - "tabpanel" - ] - } - ], - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": [ - "error", - { - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp" - ] - } - ], - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - "max-classes-per-file": [ - "error", - 1 - ], - "no-await-in-loop": "error", - "no-empty-function": [ - "error", - { - "allow": [ - "arrowFunctions", - "functions", - "methods" - ] - } - ], - "no-undef": "off", - "no-underscore-dangle": [ - "error", - { - "allow": [ - "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__" - ], - "allowAfterThis": false, - "allowAfterSuper": false, - "enforceInMethodNames": true, - "allowAfterThisConstructor": false, - "allowFunctionParams": true, - "enforceInClassFields": false, - "allowInArrayDestructuring": true, - "allowInObjectDestructuring": true - } - ], - "no-unused-vars": [ - "error", - { - "args": "none", - "ignoreRestSiblings": true - } - ], - "no-use-before-define": "error", - "no-useless-constructor": "error", - "prefer-object-spread": "error", - "prefer-promise-reject-errors": [ - "error", - { - "allowEmptyReject": true - } - ], - "react/button-has-type": [ - "error", - { - "button": true, - "submit": true, - "reset": false - } - ], - "react/jsx-boolean-value": [ - "error", - "never", - { - "always": [] - } - ], - "react/jsx-curly-brace-presence": [ - "error", - { - "props": "never", - "children": "never" - } - ], - "react/jsx-fragments": [ - "error", - "syntax" - ], - "react/jsx-no-comment-textnodes": "error", - "react/jsx-no-duplicate-props": "error", - "react/jsx-no-target-blank": [ - "error", - { - "enforceDynamicLinks": "always", - "links": true, - "forms": false - } - ], - "react/jsx-pascal-case": [ - "error", - { - "allowAllCaps": true, - "ignore": [] - } - ], - "react/no-array-index-key": "error", - "react/no-children-prop": "error", - "react/no-danger": "warn", - "react/no-danger-with-children": "error", - "react/no-did-update-set-state": "error", - "react/no-find-dom-node": "error", - "react/no-is-mounted": "error", - "react/no-redundant-should-component-update": "error", - "react/no-render-return-value": "error", - "react/no-string-refs": "error", - "react/no-this-in-sfc": "error", - "react/no-unescaped-entities": "error", - "react/no-unknown-property": "error", - "react/no-will-update-set-state": "error", - "react/prefer-es6-class": [ - "error", - "always" - ], - "react/require-render-return": "error", - "react/self-closing-comp": "error", - "react/state-in-constructor": [ - "error", - "always" - ], - "react/style-prop-object": "error", - "react/void-dom-elements-no-children": "error", - "typescript/prefer-as-const": "off", - "typescript/prefer-namespace-keyword": "off", - "typescript/triple-slash-reference": "off", - "@stylistic/indent": [ - "error", - 2, - { - "SwitchCase": 1, - "VariableDeclarator": 1, - "outerIIFEBody": 1, - "FunctionDeclaration": { - "parameters": 1, - "body": 1 - }, - "FunctionExpression": { - "parameters": 1, - "body": 1 - }, - "CallExpression": { - "arguments": 1 - }, - "ArrayExpression": 1, - "ObjectExpression": 1, - "ImportDeclaration": 1, - "flatTernaryExpressions": false, - "ignoredNodes": [], - "ignoreComments": false, - "offsetTernaryExpressions": false - } - ] - }, - "overrides": [ - { - "files": [ - "**/*.ts", - "**/*.tsx" - ], - "rules": { - "@stylistic/jsx-closing-bracket-location": [ - "error", - "line-aligned" - ], - "@stylistic/jsx-closing-tag-location": "error", - "@stylistic/jsx-curly-newline": [ - "error", - { - "multiline": "consistent", - "singleline": "consistent" - } - ], - "@stylistic/jsx-curly-spacing": [ - "error", - "never", - { - "allowMultiline": true - } - ], - "@stylistic/jsx-equals-spacing": [ - "error", - "never" - ], - "@stylistic/jsx-max-props-per-line": [ - "error", - { - "maximum": 1, - "when": "multiline" - } - ], - "@stylistic/jsx-one-expression-per-line": [ - "error", - { - "allow": "single-child" - } - ], - "@stylistic/jsx-quotes": [ - "error", - "prefer-double" - ], - "@stylistic/jsx-wrap-multilines": [ - "error", - { - "declaration": "parens-new-line", - "assignment": "parens-new-line", - "return": "parens-new-line", - "arrow": "parens-new-line", - "condition": "parens-new-line", - "logical": "parens-new-line", - "prop": "parens-new-line" - } - ], - "@stylistic/max-len": [ - "error", - 120, - 2, - { - "ignoreUrls": true, - "ignoreComments": true, - "ignoreRegExpLiterals": true, - "ignoreStrings": true, - "ignoreTemplateLiterals": true - } - ], - "@stylistic/no-trailing-spaces": [ - "error", - { - "skipBlankLines": true, - "ignoreComments": false - } - ], - "@stylistic/operator-linebreak": [ - "error", - "before", - { - "overrides": { - "=": "none" - } - } - ], - "@stylistic/type-annotation-spacing": "off", - "constructor-super": "error", - "getter-return": [ - "error", - { - "allowImplicit": true - } - ], - "import/no-named-as-default": "off", - "import/no-named-as-default-member": "off", - "jsx-a11y/alt-text": [ - "error", - { - "elements": [ - "img", - "object", - "area", - "input[type=\"image\"]" - ], - "img": [], - "object": [], - "area": [], - "input[type=\"image\"]": [] - } - ], - "jsx-a11y/anchor-has-content": [ - "error", - { - "components": [] - } - ], - "jsx-a11y/anchor-is-valid": [ - "error", - { - "components": [ - "Link" - ], - "specialLink": [ - "to" - ], - "aspects": [ - "noHref", - "invalidHref", - "preferButton" - ] - } - ], - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": [ - "error", - { - "ignoreNonDOM": false - } - ], - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/control-has-associated-label": [ - "error", - { - "labelAttributes": [ - "label" - ], - "controlComponents": [], - "ignoreElements": [ - "audio", - "canvas", - "embed", - "input", - "textarea", - "tr", - "video" - ], - "ignoreRoles": [ - "grid", - "listbox", - "menu", - "menubar", - "radiogroup", - "row", - "tablist", - "toolbar", - "tree", - "treegrid" - ], - "depth": 5 - } - ], - "jsx-a11y/heading-has-content": [ - "error", - { - "components": [ - "" - ] - } - ], - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": "error", - "jsx-a11y/label-has-associated-control": [ - "error", - { - "labelComponents": [], - "labelAttributes": [], - "controlComponents": [], - "assert": "both", - "depth": 25 - } - ], - "jsx-a11y/lang": "error", - "jsx-a11y/media-has-caption": [ - "error", - { - "audio": [], - "video": [], - "track": [] - } - ], - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": [ - "error", - { - "ignoreNonDOM": true - } - ], - "jsx-a11y/no-distracting-elements": [ - "error", - { - "elements": [ - "marquee", - "blink" - ] - } - ], - "jsx-a11y/no-interactive-element-to-noninteractive-role": [ - "error", - { - "tr": [ - "none", - "presentation" - ] - } - ], - "jsx-a11y/no-noninteractive-element-interactions": [ - "error", - { - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp" - ] - } - ], - "jsx-a11y/no-noninteractive-element-to-interactive-role": [ - "error", - { - "ul": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid" - ], - "ol": [ - "listbox", - "menu", - "menubar", - "radiogroup", - "tablist", - "tree", - "treegrid" - ], - "li": [ - "menuitem", - "option", - "row", - "tab", - "treeitem" - ], - "table": [ - "grid" - ], - "td": [ - "gridcell" - ] - } - ], - "jsx-a11y/no-noninteractive-tabindex": [ - "error", - { - "tags": [], - "roles": [ - "tabpanel" - ] - } - ], - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": [ - "error", - { - "handlers": [ - "onClick", - "onMouseDown", - "onMouseUp", - "onKeyPress", - "onKeyDown", - "onKeyUp" - ] - } - ], - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - "max-classes-per-file": [ - "error", - 1 - ], - "no-await-in-loop": "error", - "no-const-assign": "error", - "no-dupe-class-members": "error", - "no-dupe-keys": "error", - "no-empty-function": [ - "error", - { - "allow": [ - "arrowFunctions", - "functions", - "methods" - ] - } - ], - "no-func-assign": "error", - "no-new-native-nonconstructor": "error", - "no-obj-calls": "error", - "no-redeclare": "error", - "no-this-before-super": "error", - "no-undef": "off", - "no-underscore-dangle": [ - "error", - { - "allow": [ - "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__" - ], - "allowAfterThis": false, - "allowAfterSuper": false, - "enforceInMethodNames": true, - "allowAfterThisConstructor": false, - "allowFunctionParams": true, - "enforceInClassFields": false, - "allowInArrayDestructuring": true, - "allowInObjectDestructuring": true - } - ], - "no-unreachable": "error", - "no-unsafe-negation": "error", - "no-unused-vars": [ - "error", - { - "args": "none", - "ignoreRestSiblings": true - } - ], - "no-use-before-define": "error", - "no-useless-constructor": "error", - "prefer-object-spread": "error", - "prefer-promise-reject-errors": [ - "error", - { - "allowEmptyReject": true - } - ], - "react/button-has-type": [ - "error", - { - "button": true, - "submit": true, - "reset": false - } - ], - "react/jsx-boolean-value": [ - "error", - "never", - { - "always": [] - } - ], - "react/jsx-curly-brace-presence": [ - "error", - { - "props": "never", - "children": "never" - } - ], - "react/jsx-fragments": [ - "error", - "syntax" - ], - "react/jsx-no-comment-textnodes": "error", - "react/jsx-no-duplicate-props": "error", - "react/jsx-no-target-blank": [ - "error", - { - "enforceDynamicLinks": "always", - "links": true, - "forms": false - } - ], - "react/jsx-pascal-case": [ - "error", - { - "allowAllCaps": true, - "ignore": [] - } - ], - "react/no-array-index-key": "error", - "react/no-children-prop": "error", - "react/no-danger": "warn", - "react/no-danger-with-children": "error", - "react/no-did-update-set-state": "error", - "react/no-find-dom-node": "error", - "react/no-is-mounted": "error", - "react/no-redundant-should-component-update": "error", - "react/no-render-return-value": "error", - "react/no-string-refs": "error", - "react/no-this-in-sfc": "error", - "react/no-unescaped-entities": "error", - "react/no-unknown-property": "error", - "react/no-will-update-set-state": "error", - "react/prefer-es6-class": [ - "error", - "always" - ], - "react/require-render-return": "error", - "react/self-closing-comp": "error", - "react/state-in-constructor": [ - "error", - "always" - ], - "react/style-prop-object": "error", - "react/void-dom-elements-no-children": "error", - "typescript/explicit-member-accessibility": "off", - "typescript/prefer-as-const": "off", - "typescript/prefer-namespace-keyword": "off", - "typescript/triple-slash-reference": "off", - "valid-typeof": [ - "error", - { - "requireStringLiterals": true - } - ] - } - } - ] + "ignorePatterns": ["dist/", "lib/", "coverage/", "**/*.d.ts"] } diff --git a/packages/cubejs-linter/airbnb-react.json b/packages/cubejs-linter/airbnb-react.json new file mode 100644 index 0000000000000..f532ee54219d4 --- /dev/null +++ b/packages/cubejs-linter/airbnb-react.json @@ -0,0 +1,920 @@ +// eslint-config-airbnb (the React flavour) ported to oxlint, expressed as the delta from +// the repo-root config. Extended by every React package in the repo: cubejs-client-react +// and cubejs-playground. +// +// Rules with no oxlint equivalent and not carried over: react/sort-comp, +// react/no-deprecated, react/no-typos, react/no-unused-state, +// react/no-access-state-in-setstate, and the PropTypes family (no-unused-prop-types, +// require-default-props, forbid-foreign-prop-types, default-props-match-prop-types) -- +// all legacy class-component rules, and both consumers are TS + hooks. +// +// `env` and `ignorePatterns` are deliberately absent: oxlint does not inherit them through +// `extends`, so each consumer restates its own. +{ + "$schema": "../../node_modules/oxlint/configuration_schema.json", + "plugins": [ + "eslint", + "import", + "jsx-a11y", + "node", + "react", + "typescript", + "unicorn" + ], + "jsPlugins": [ + "@stylistic/eslint-plugin" + ], + "rules": { + "@stylistic/jsx-closing-bracket-location": [ + "error", + "line-aligned" + ], + "@stylistic/jsx-closing-tag-location": "error", + "@stylistic/jsx-curly-newline": [ + "error", + { + "multiline": "consistent", + "singleline": "consistent" + } + ], + "@stylistic/jsx-curly-spacing": [ + "error", + "never", + { + "allowMultiline": true + } + ], + "@stylistic/jsx-equals-spacing": [ + "error", + "never" + ], + "@stylistic/jsx-max-props-per-line": [ + "error", + { + "maximum": 1, + "when": "multiline" + } + ], + "@stylistic/jsx-one-expression-per-line": [ + "error", + { + "allow": "single-child" + } + ], + "@stylistic/jsx-quotes": [ + "error", + "prefer-double" + ], + "@stylistic/jsx-wrap-multilines": [ + "error", + { + "declaration": "parens-new-line", + "assignment": "parens-new-line", + "return": "parens-new-line", + "arrow": "parens-new-line", + "condition": "parens-new-line", + "logical": "parens-new-line", + "prop": "parens-new-line" + } + ], + "@stylistic/max-len": [ + "error", + 120, + 2, + { + "ignoreUrls": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true + } + ], + "@stylistic/no-trailing-spaces": [ + "error", + { + "skipBlankLines": true, + "ignoreComments": false + } + ], + "@stylistic/operator-linebreak": [ + "error", + "before", + { + "overrides": { + "=": "none" + } + } + ], + "@stylistic/type-annotation-spacing": "off", + "import/no-named-as-default": "off", + "import/no-named-as-default-member": "off", + "jsx-a11y/alt-text": [ + "error", + { + "elements": [ + "img", + "object", + "area", + "input[type=\"image\"]" + ], + "img": [], + "object": [], + "area": [], + "input[type=\"image\"]": [] + } + ], + "jsx-a11y/anchor-has-content": [ + "error", + { + "components": [] + } + ], + "jsx-a11y/anchor-is-valid": [ + "error", + { + "components": [ + "Link" + ], + "specialLink": [ + "to" + ], + "aspects": [ + "noHref", + "invalidHref", + "preferButton" + ] + } + ], + "jsx-a11y/aria-activedescendant-has-tabindex": "error", + "jsx-a11y/aria-props": "error", + "jsx-a11y/aria-proptypes": "error", + "jsx-a11y/aria-role": [ + "error", + { + "ignoreNonDOM": false + } + ], + "jsx-a11y/aria-unsupported-elements": "error", + "jsx-a11y/click-events-have-key-events": "error", + "jsx-a11y/control-has-associated-label": [ + "error", + { + "labelAttributes": [ + "label" + ], + "controlComponents": [], + "ignoreElements": [ + "audio", + "canvas", + "embed", + "input", + "textarea", + "tr", + "video" + ], + "ignoreRoles": [ + "grid", + "listbox", + "menu", + "menubar", + "radiogroup", + "row", + "tablist", + "toolbar", + "tree", + "treegrid" + ], + "depth": 5 + } + ], + "jsx-a11y/heading-has-content": [ + "error", + { + "components": [ + "" + ] + } + ], + "jsx-a11y/html-has-lang": "error", + "jsx-a11y/iframe-has-title": "error", + "jsx-a11y/img-redundant-alt": "error", + "jsx-a11y/interactive-supports-focus": "error", + "jsx-a11y/label-has-associated-control": [ + "error", + { + "labelComponents": [], + "labelAttributes": [], + "controlComponents": [], + "assert": "both", + "depth": 25 + } + ], + "jsx-a11y/lang": "error", + "jsx-a11y/media-has-caption": [ + "error", + { + "audio": [], + "video": [], + "track": [] + } + ], + "jsx-a11y/mouse-events-have-key-events": "error", + "jsx-a11y/no-access-key": "error", + "jsx-a11y/no-autofocus": [ + "error", + { + "ignoreNonDOM": true + } + ], + "jsx-a11y/no-distracting-elements": [ + "error", + { + "elements": [ + "marquee", + "blink" + ] + } + ], + "jsx-a11y/no-interactive-element-to-noninteractive-role": [ + "error", + { + "tr": [ + "none", + "presentation" + ] + } + ], + "jsx-a11y/no-noninteractive-element-interactions": [ + "error", + { + "handlers": [ + "onClick", + "onMouseDown", + "onMouseUp", + "onKeyPress", + "onKeyDown", + "onKeyUp" + ] + } + ], + "jsx-a11y/no-noninteractive-element-to-interactive-role": [ + "error", + { + "ul": [ + "listbox", + "menu", + "menubar", + "radiogroup", + "tablist", + "tree", + "treegrid" + ], + "ol": [ + "listbox", + "menu", + "menubar", + "radiogroup", + "tablist", + "tree", + "treegrid" + ], + "li": [ + "menuitem", + "option", + "row", + "tab", + "treeitem" + ], + "table": [ + "grid" + ], + "td": [ + "gridcell" + ] + } + ], + "jsx-a11y/no-noninteractive-tabindex": [ + "error", + { + "tags": [], + "roles": [ + "tabpanel" + ] + } + ], + "jsx-a11y/no-redundant-roles": "error", + "jsx-a11y/no-static-element-interactions": [ + "error", + { + "handlers": [ + "onClick", + "onMouseDown", + "onMouseUp", + "onKeyPress", + "onKeyDown", + "onKeyUp" + ] + } + ], + "jsx-a11y/role-has-required-aria-props": "error", + "jsx-a11y/role-supports-aria-props": "error", + "jsx-a11y/scope": "error", + "jsx-a11y/tabindex-no-positive": "error", + "max-classes-per-file": [ + "error", + 1 + ], + "no-await-in-loop": "error", + "no-empty-function": [ + "error", + { + "allow": [ + "arrowFunctions", + "functions", + "methods" + ] + } + ], + "no-undef": "off", + "no-underscore-dangle": [ + "error", + { + "allow": [ + "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__" + ], + "allowAfterThis": false, + "allowAfterSuper": false, + "enforceInMethodNames": true, + "allowAfterThisConstructor": false, + "allowFunctionParams": true, + "enforceInClassFields": false, + "allowInArrayDestructuring": true, + "allowInObjectDestructuring": true + } + ], + "no-unused-vars": [ + "error", + { + "args": "none", + "ignoreRestSiblings": true + } + ], + "no-use-before-define": "error", + "no-useless-constructor": "error", + "prefer-object-spread": "error", + "prefer-promise-reject-errors": [ + "error", + { + "allowEmptyReject": true + } + ], + "react/button-has-type": [ + "error", + { + "button": true, + "submit": true, + "reset": false + } + ], + "react/jsx-boolean-value": [ + "error", + "never", + { + "always": [] + } + ], + "react/jsx-curly-brace-presence": [ + "error", + { + "props": "never", + "children": "never" + } + ], + "react/jsx-fragments": [ + "error", + "syntax" + ], + "react/jsx-no-comment-textnodes": "error", + "react/jsx-no-duplicate-props": "error", + "react/jsx-no-target-blank": [ + "error", + { + "enforceDynamicLinks": "always", + "links": true, + "forms": false + } + ], + "react/jsx-pascal-case": [ + "error", + { + "allowAllCaps": true, + "ignore": [] + } + ], + "react/no-array-index-key": "error", + "react/no-children-prop": "error", + "react/no-danger": "warn", + "react/no-danger-with-children": "error", + "react/no-did-update-set-state": "error", + "react/no-find-dom-node": "error", + "react/no-is-mounted": "error", + "react/no-redundant-should-component-update": "error", + "react/no-render-return-value": "error", + "react/no-string-refs": "error", + "react/no-this-in-sfc": "error", + "react/no-unescaped-entities": "error", + "react/no-unknown-property": "error", + "react/no-will-update-set-state": "error", + "react/prefer-es6-class": [ + "error", + "always" + ], + "react/require-render-return": "error", + "react/self-closing-comp": "error", + "react/state-in-constructor": [ + "error", + "always" + ], + "react/style-prop-object": "error", + "react/void-dom-elements-no-children": "error", + "typescript/prefer-as-const": "off", + "typescript/prefer-namespace-keyword": "off", + "typescript/triple-slash-reference": "off", + "@stylistic/indent": [ + "error", + 2, + { + "SwitchCase": 1, + "VariableDeclarator": 1, + "outerIIFEBody": 1, + "FunctionDeclaration": { + "parameters": 1, + "body": 1 + }, + "FunctionExpression": { + "parameters": 1, + "body": 1 + }, + "CallExpression": { + "arguments": 1 + }, + "ArrayExpression": 1, + "ObjectExpression": 1, + "ImportDeclaration": 1, + "flatTernaryExpressions": false, + "ignoredNodes": [], + "ignoreComments": false, + "offsetTernaryExpressions": false + } + ] + }, + "overrides": [ + { + "files": [ + "**/*.ts", + "**/*.tsx" + ], + "rules": { + "@stylistic/jsx-closing-bracket-location": [ + "error", + "line-aligned" + ], + "@stylistic/jsx-closing-tag-location": "error", + "@stylistic/jsx-curly-newline": [ + "error", + { + "multiline": "consistent", + "singleline": "consistent" + } + ], + "@stylistic/jsx-curly-spacing": [ + "error", + "never", + { + "allowMultiline": true + } + ], + "@stylistic/jsx-equals-spacing": [ + "error", + "never" + ], + "@stylistic/jsx-max-props-per-line": [ + "error", + { + "maximum": 1, + "when": "multiline" + } + ], + "@stylistic/jsx-one-expression-per-line": [ + "error", + { + "allow": "single-child" + } + ], + "@stylistic/jsx-quotes": [ + "error", + "prefer-double" + ], + "@stylistic/jsx-wrap-multilines": [ + "error", + { + "declaration": "parens-new-line", + "assignment": "parens-new-line", + "return": "parens-new-line", + "arrow": "parens-new-line", + "condition": "parens-new-line", + "logical": "parens-new-line", + "prop": "parens-new-line" + } + ], + "@stylistic/max-len": [ + "error", + 120, + 2, + { + "ignoreUrls": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true + } + ], + "@stylistic/no-trailing-spaces": [ + "error", + { + "skipBlankLines": true, + "ignoreComments": false + } + ], + "@stylistic/operator-linebreak": [ + "error", + "before", + { + "overrides": { + "=": "none" + } + } + ], + "@stylistic/type-annotation-spacing": "off", + "constructor-super": "error", + "getter-return": [ + "error", + { + "allowImplicit": true + } + ], + "import/no-named-as-default": "off", + "import/no-named-as-default-member": "off", + "jsx-a11y/alt-text": [ + "error", + { + "elements": [ + "img", + "object", + "area", + "input[type=\"image\"]" + ], + "img": [], + "object": [], + "area": [], + "input[type=\"image\"]": [] + } + ], + "jsx-a11y/anchor-has-content": [ + "error", + { + "components": [] + } + ], + "jsx-a11y/anchor-is-valid": [ + "error", + { + "components": [ + "Link" + ], + "specialLink": [ + "to" + ], + "aspects": [ + "noHref", + "invalidHref", + "preferButton" + ] + } + ], + "jsx-a11y/aria-activedescendant-has-tabindex": "error", + "jsx-a11y/aria-props": "error", + "jsx-a11y/aria-proptypes": "error", + "jsx-a11y/aria-role": [ + "error", + { + "ignoreNonDOM": false + } + ], + "jsx-a11y/aria-unsupported-elements": "error", + "jsx-a11y/click-events-have-key-events": "error", + "jsx-a11y/control-has-associated-label": [ + "error", + { + "labelAttributes": [ + "label" + ], + "controlComponents": [], + "ignoreElements": [ + "audio", + "canvas", + "embed", + "input", + "textarea", + "tr", + "video" + ], + "ignoreRoles": [ + "grid", + "listbox", + "menu", + "menubar", + "radiogroup", + "row", + "tablist", + "toolbar", + "tree", + "treegrid" + ], + "depth": 5 + } + ], + "jsx-a11y/heading-has-content": [ + "error", + { + "components": [ + "" + ] + } + ], + "jsx-a11y/html-has-lang": "error", + "jsx-a11y/iframe-has-title": "error", + "jsx-a11y/img-redundant-alt": "error", + "jsx-a11y/interactive-supports-focus": "error", + "jsx-a11y/label-has-associated-control": [ + "error", + { + "labelComponents": [], + "labelAttributes": [], + "controlComponents": [], + "assert": "both", + "depth": 25 + } + ], + "jsx-a11y/lang": "error", + "jsx-a11y/media-has-caption": [ + "error", + { + "audio": [], + "video": [], + "track": [] + } + ], + "jsx-a11y/mouse-events-have-key-events": "error", + "jsx-a11y/no-access-key": "error", + "jsx-a11y/no-autofocus": [ + "error", + { + "ignoreNonDOM": true + } + ], + "jsx-a11y/no-distracting-elements": [ + "error", + { + "elements": [ + "marquee", + "blink" + ] + } + ], + "jsx-a11y/no-interactive-element-to-noninteractive-role": [ + "error", + { + "tr": [ + "none", + "presentation" + ] + } + ], + "jsx-a11y/no-noninteractive-element-interactions": [ + "error", + { + "handlers": [ + "onClick", + "onMouseDown", + "onMouseUp", + "onKeyPress", + "onKeyDown", + "onKeyUp" + ] + } + ], + "jsx-a11y/no-noninteractive-element-to-interactive-role": [ + "error", + { + "ul": [ + "listbox", + "menu", + "menubar", + "radiogroup", + "tablist", + "tree", + "treegrid" + ], + "ol": [ + "listbox", + "menu", + "menubar", + "radiogroup", + "tablist", + "tree", + "treegrid" + ], + "li": [ + "menuitem", + "option", + "row", + "tab", + "treeitem" + ], + "table": [ + "grid" + ], + "td": [ + "gridcell" + ] + } + ], + "jsx-a11y/no-noninteractive-tabindex": [ + "error", + { + "tags": [], + "roles": [ + "tabpanel" + ] + } + ], + "jsx-a11y/no-redundant-roles": "error", + "jsx-a11y/no-static-element-interactions": [ + "error", + { + "handlers": [ + "onClick", + "onMouseDown", + "onMouseUp", + "onKeyPress", + "onKeyDown", + "onKeyUp" + ] + } + ], + "jsx-a11y/role-has-required-aria-props": "error", + "jsx-a11y/role-supports-aria-props": "error", + "jsx-a11y/scope": "error", + "jsx-a11y/tabindex-no-positive": "error", + "max-classes-per-file": [ + "error", + 1 + ], + "no-await-in-loop": "error", + "no-const-assign": "error", + "no-dupe-class-members": "error", + "no-dupe-keys": "error", + "no-empty-function": [ + "error", + { + "allow": [ + "arrowFunctions", + "functions", + "methods" + ] + } + ], + "no-func-assign": "error", + "no-new-native-nonconstructor": "error", + "no-obj-calls": "error", + "no-redeclare": "error", + "no-this-before-super": "error", + "no-undef": "off", + "no-underscore-dangle": [ + "error", + { + "allow": [ + "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__" + ], + "allowAfterThis": false, + "allowAfterSuper": false, + "enforceInMethodNames": true, + "allowAfterThisConstructor": false, + "allowFunctionParams": true, + "enforceInClassFields": false, + "allowInArrayDestructuring": true, + "allowInObjectDestructuring": true + } + ], + "no-unreachable": "error", + "no-unsafe-negation": "error", + "no-unused-vars": [ + "error", + { + "args": "none", + "ignoreRestSiblings": true + } + ], + "no-use-before-define": "error", + "no-useless-constructor": "error", + "prefer-object-spread": "error", + "prefer-promise-reject-errors": [ + "error", + { + "allowEmptyReject": true + } + ], + "react/button-has-type": [ + "error", + { + "button": true, + "submit": true, + "reset": false + } + ], + "react/jsx-boolean-value": [ + "error", + "never", + { + "always": [] + } + ], + "react/jsx-curly-brace-presence": [ + "error", + { + "props": "never", + "children": "never" + } + ], + "react/jsx-fragments": [ + "error", + "syntax" + ], + "react/jsx-no-comment-textnodes": "error", + "react/jsx-no-duplicate-props": "error", + "react/jsx-no-target-blank": [ + "error", + { + "enforceDynamicLinks": "always", + "links": true, + "forms": false + } + ], + "react/jsx-pascal-case": [ + "error", + { + "allowAllCaps": true, + "ignore": [] + } + ], + "react/no-array-index-key": "error", + "react/no-children-prop": "error", + "react/no-danger": "warn", + "react/no-danger-with-children": "error", + "react/no-did-update-set-state": "error", + "react/no-find-dom-node": "error", + "react/no-is-mounted": "error", + "react/no-redundant-should-component-update": "error", + "react/no-render-return-value": "error", + "react/no-string-refs": "error", + "react/no-this-in-sfc": "error", + "react/no-unescaped-entities": "error", + "react/no-unknown-property": "error", + "react/no-will-update-set-state": "error", + "react/prefer-es6-class": [ + "error", + "always" + ], + "react/require-render-return": "error", + "react/self-closing-comp": "error", + "react/state-in-constructor": [ + "error", + "always" + ], + "react/style-prop-object": "error", + "react/void-dom-elements-no-children": "error", + "typescript/explicit-member-accessibility": "off", + "typescript/prefer-as-const": "off", + "typescript/prefer-namespace-keyword": "off", + "typescript/triple-slash-reference": "off", + "valid-typeof": [ + "error", + { + "requireStringLiterals": true + } + ] + } + } + ] +} diff --git a/packages/cubejs-playground/.oxlintrc.json b/packages/cubejs-playground/.oxlintrc.json new file mode 100644 index 0000000000000..0c2302b247b24 --- /dev/null +++ b/packages/cubejs-playground/.oxlintrc.json @@ -0,0 +1,53 @@ +// cubejs-playground's lint config: the shared React rule set plus this package's own +// environment. The rules themselves live in @cubejs-backend/linter/airbnb-react.json, +// which cubejs-client-react extends too. +{ + "$schema": "../../node_modules/oxlint/configuration_schema.json", + "extends": [ + "../../.oxlintrc.json", + "../cubejs-linter/airbnb-react.json" + ], + // env and ignorePatterns are not inherited through `extends` + "env": { + "node": true, + "browser": true, + "es6": true + }, + "ignorePatterns": [ + "build/", + "coverage/", + "lib/", + "public/", + "**/*.d.ts", + // a separate sub-project with its own package.json, yarn.lock and ESLint setup + "vizard/" + ], + "rules": { + // airbnb's `destructuring: "any"` reports a `let { ... } = props` pattern when any one + // binding is never reassigned, which is unfixable here: this package follows the + // @cube-dev/ui-kit idiom of reassigning some props-derived locals + // (`titleStyles = useMemo(...)`), so the pattern needs `let` and the rule reported 44 + // bindings no autofix could touch. "all" still flags declarations that are wholly const. + "prefer-const": ["error", { "destructuring": "all", "ignoreReadBeforeAssign": true }] + }, + "overrides": [ + { + // airbnb-react.json declares these in an `overrides` block, and an extended + // `overrides` entry outranks the extending config's top-level `rules` -- so + // re-tuning them has to happen in an `overrides` entry here too. + "files": ["**/*.ts", "**/*.tsx"], + "rules": { + // this package lays files out top-down -- exported component first, its local + // helpers below -- and hoisted function declarations make that legal + "no-use-before-define": [ + "error", + { "functions": false, "classes": true, "variables": true } + ], + // purely cosmetic, and its autofix makes JSX harder to read rather than easier: + // splitting `{cubeName} {name}` onto separate lines forces a literal + // `{' '}` line in to preserve the space, 61 times across this package + "@stylistic/jsx-one-expression-per-line": "off" + } + } + ] +} diff --git a/packages/cubejs-playground/package.json b/packages/cubejs-playground/package.json index 8188ae25bcba0..bbdcf5044c3b2 100644 --- a/packages/cubejs-playground/package.json +++ b/packages/cubejs-playground/package.json @@ -79,9 +79,6 @@ "@types/styled-components": "^5.1.34", "@vitejs/plugin-react": "^6", "antd": "4.16.13", - "eslint-config-airbnb": "^18.1.0", - "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-react": "^7.20.0", "fs-extra": "^11.1.1", "graphql": "^15.8.0", "jsdom": "^26", diff --git a/packages/cubejs-playground/postbuild.js b/packages/cubejs-playground/postbuild.js index 5a4978052aff6..ba77363e29d3d 100644 --- a/packages/cubejs-playground/postbuild.js +++ b/packages/cubejs-playground/postbuild.js @@ -17,4 +17,4 @@ const distFolder = path.resolve(__dirname, 'lib'); 2 ) ); -}); \ No newline at end of file +}); diff --git a/packages/cubejs-playground/src/ChartContainer.tsx b/packages/cubejs-playground/src/ChartContainer.tsx index 05cf50ba1590f..3171763d76b89 100644 --- a/packages/cubejs-playground/src/ChartContainer.tsx +++ b/packages/cubejs-playground/src/ChartContainer.tsx @@ -73,9 +73,7 @@ const UnsupportedFrameworkPlaceholder: UnsupportedPlaceholder = ({ href="https://cube.dev/reference/javascript-sdk/reference/cubejs-client-core" target="_blank" rel="noopener noreferrer" - onClick={() => - playgroundAction('Unsupported Framework Docs', { framework }) - } + onClick={() => playgroundAction('Unsupported Framework Docs', { framework })} > Vanilla JavaScript  docs @@ -160,12 +158,11 @@ class ChartContainer extends Component< static getDerivedStateFromProps(props, state) { if ( - props.isChartRendererReady && - props.iframeRef.current != null && - props.chartingLibrary + props.isChartRendererReady + && props.iframeRef.current != null + && props.chartingLibrary ) { - const { __cubejsPlayground } = - props.iframeRef.current.contentWindow || {}; + const { __cubejsPlayground } = props.iframeRef.current.contentWindow || {}; if (!__cubejsPlayground) { return { @@ -189,10 +186,9 @@ class ChartContainer extends Component< if (props.framework === 'react') { codeExample = codesandboxFiles['index.js']; } else if (props.framework === 'angular') { - codeExample = - codesandboxFiles[ - 'src/app/query-renderer/query-renderer.component.ts' - ]; + codeExample = codesandboxFiles[ + 'src/app/query-renderer/query-renderer.component.ts' + ]; } else if (props.framework === 'vue') { codeExample = codesandboxFiles['src/components/ChartRenderer.vue']; } @@ -226,7 +222,6 @@ class ChartContainer extends Component< dependencies, redirectToDashboard, activeTab, - addingToDashboard, chartRendererError, sql, } = this.state; @@ -257,28 +252,27 @@ class ChartContainer extends Component< const parameters = isChartRendererReady ? getParameters( - codeSandboxDefinition( - frameworkToTemplate[framework], - codesandboxFiles, - dependencies - ) + codeSandboxDefinition( + frameworkToTemplate[framework], + codesandboxFiles, + dependencies ) + ) : null; - const chartLibrariesMenu = - (chartLibraries[framework] || []).length > 0 ? ( - { - playgroundAction('Set Chart Library', { chartingLibrary: e.key }); - setChartLibrary(e.key); - }} - > - {(chartLibraries[framework] || []).map((library) => ( - {library.title} - ))} - - ) : null; + const chartLibrariesMenu = (chartLibraries[framework] || []).length > 0 ? ( + { + playgroundAction('Set Chart Library', { chartingLibrary: e.key }); + setChartLibrary(e.key); + }} + > + {(chartLibraries[framework] || []).map((library) => ( + {library.title} + ))} + + ) : null; const frameworkMenu = ( - } + )} > - } + )} > @@ -488,11 +482,11 @@ class ChartContainer extends Component< return ( - } + )} > { - const operatorsByMemberName = useDeepMemo(() => { - return members.reduce( - (memo, item) => ({ - ...memo, - [item.member]: [...(memo[item.member] || []), item.operator], - }), - {} - ); - }, [members]); + const operatorsByMemberName = useDeepMemo(() => members.reduce( + (memo, item) => ({ + ...memo, + [item.member]: [...(memo[item.member] || []), item.operator], + }), + {} + ), + [members]); return ( @@ -53,9 +52,7 @@ const FilterGroup = ({ style={{ minWidth: 150, }} - onClick={(updateWith) => - updateMethods.update(m, { ...m, dimension: updateWith }) - } + onClick={(updateWith) => updateMethods.update(m, { ...m, dimension: updateWith })} > {m.dimension.title} @@ -74,9 +71,7 @@ const FilterGroup = ({ disabled={disabled} value={m.operator} style={{ width: 200 }} - onChange={(operator) => - updateMethods.update(m, { ...m, operator }) - } + onChange={(operator) => updateMethods.update(m, { ...m, operator })} > {m.operators.map((operator) => { const isOperatorDisabled = operatorsByMemberName[ @@ -90,8 +85,8 @@ const FilterGroup = ({ title={ isOperatorDisabled ? `There is already a filter applied with this operator for ${ - m.dimension?.title || m.name - }` + m.dimension?.title || m.name + }` : operator.name } disabled={isOperatorDisabled} diff --git a/packages/cubejs-playground/src/QueryBuilder/MemberDropdown.tsx b/packages/cubejs-playground/src/QueryBuilder/MemberDropdown.tsx index c5011f976d034..5839f6e74c4b6 100644 --- a/packages/cubejs-playground/src/QueryBuilder/MemberDropdown.tsx +++ b/packages/cubejs-playground/src/QueryBuilder/MemberDropdown.tsx @@ -57,12 +57,12 @@ function filterMembersByKeys( return members .filter(({ cubeName }) => cubeNames.includes(cubeName)) - .map((cube) => { - return { + .map((cube) => ( + { ...cube, members: cube.members.filter(({ name }) => keys.includes(name)), - }; - }); + } + )); } type MemberDropdownProps = { @@ -85,9 +85,7 @@ export default function MemberMenu({ const hasMembers = availableCubes.some((cube) => cube.members.length > 0); const indexedMembers = useDeepMemo(() => { - getNameMemberPairs(availableCubes).forEach(([name, { title }]) => - index.add(name as any, title) - ); + getNameMemberPairs(availableCubes).forEach(([name, { title }]) => index.add(name as any, title)); return Object.fromEntries(getNameMemberPairs(availableCubes)); }, [availableCubes]); @@ -136,7 +134,7 @@ export default function MemberMenu({ searchInputRef.current?.focus({ preventScroll: true }); }); }} - overlay={ + overlay={(
- } + )} /> ); } diff --git a/packages/cubejs-playground/src/QueryBuilder/TimeGroup.tsx b/packages/cubejs-playground/src/QueryBuilder/TimeGroup.tsx index d758b27d5ba8e..8adb69100f887 100644 --- a/packages/cubejs-playground/src/QueryBuilder/TimeGroup.tsx +++ b/packages/cubejs-playground/src/QueryBuilder/TimeGroup.tsx @@ -107,9 +107,7 @@ const TimeGroup = ({ data-testid="TimeDimension" disabled={disabled} availableCubes={availableMembers} - onClick={(updateWith) => - updateMethods.update(m, { ...m, dimension: updateWith }) - } + onClick={(updateWith) => updateMethods.update(m, { ...m, dimension: updateWith })} > {m.dimension.title} @@ -162,17 +160,15 @@ const TimeGroup = ({ - updateMethods.update(m, { ...m, granularity: granularity.name }) - )} + overlay={granularityMenu(m.dimension, (granularity) => updateMethods.update(m, { ...m, granularity: granularity.name }))} onOverlayOpen={() => setGranularityShown(true)} onOverlayClose={() => setGranularityShown(false)} onItemClick={() => setGranularityShown(false)} > {m.dimension.granularities.find( (g) => g.name === m.granularity - ) && - m.dimension.granularities.find((g) => g.name === m.granularity) + ) + && m.dimension.granularities.find((g) => g.name === m.granularity) .title} @@ -186,9 +182,7 @@ const TimeGroup = ({ availableCubes={availableMembers} type="dashed" icon={} - onClick={(member) => - updateMethods.add({ dimension: member, granularity: 'day' }) - } + onClick={(member) => updateMethods.add({ dimension: member, granularity: 'day' })} > {addMemberName} diff --git a/packages/cubejs-playground/src/QueryBuilder/TimeRangeSelector.tsx b/packages/cubejs-playground/src/QueryBuilder/TimeRangeSelector.tsx index d25846d3796e1..6320763ff8688 100644 --- a/packages/cubejs-playground/src/QueryBuilder/TimeRangeSelector.tsx +++ b/packages/cubejs-playground/src/QueryBuilder/TimeRangeSelector.tsx @@ -26,9 +26,9 @@ export function TimeDateRangeSelector(props: TimeDateRangeSelectorProps) { return startDate && endDate ? { - start: startDate, - end: endDate, - } + start: startDate, + end: endDate, + } : null; }, [value[0], value[1]]); diff --git a/packages/cubejs-playground/src/QueryBuilderV2/Pivot/DroppableArea.tsx b/packages/cubejs-playground/src/QueryBuilderV2/Pivot/DroppableArea.tsx index 117b136874431..8ee782652cbb1 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/Pivot/DroppableArea.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/Pivot/DroppableArea.tsx @@ -18,9 +18,7 @@ const HeaderElement = tasty({ }, }); -const Header = memo(({ axis }: { axis: string }) => { - return {axis.toUpperCase()} axis; -}); +const Header = memo(({ axis }: { axis: string }) => {axis.toUpperCase()} axis); export function PivotDroppableArea({ pivotConfig, @@ -44,7 +42,7 @@ export function PivotDroppableArea({ {/* @ts-ignore */} {pivotConfig[axis].map((id, index) => { - let type: 'timeDimension' | 'dimension' | 'measure' = id.includes('.') + const type: 'timeDimension' | 'dimension' | 'measure' = id.includes('.') ? id.split('.').length === 3 ? 'timeDimension' : 'dimension' diff --git a/packages/cubejs-playground/src/QueryBuilderV2/Pivot/Options.tsx b/packages/cubejs-playground/src/QueryBuilderV2/Pivot/Options.tsx index 58647f710f364..33d1b150ea9da 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/Pivot/Options.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/Pivot/Options.tsx @@ -12,11 +12,9 @@ export function PivotOptions({ return pivotConfig ? ( - onUpdate({ - fillMissingDates: !pivotConfig.fillMissingDates, - }) - } + onChange={() => onUpdate({ + fillMissingDates: !pivotConfig.fillMissingDates, + })} > Fill Missing Dates diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilder.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilder.tsx index 65417c039765d..1b0d70d16a177 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilder.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilder.tsx @@ -36,13 +36,12 @@ export function QueryBuilder( disableSidebarResizing, } = props; - const cubeApi = useMemo(() => { - return apiUrl && apiToken && apiToken !== 'undefined' - ? cube(apiToken, { - apiUrl, - }) - : undefined; - }, [apiUrl, apiToken]); + const cubeApi = useMemo(() => (apiUrl && apiToken && apiToken !== 'undefined' + ? cube(apiToken, { + apiUrl, + }) + : undefined), + [apiUrl, apiToken]); const [storedTimezones] = useLocalStorage('QueryBuilder:timezones', []); @@ -89,9 +88,8 @@ export function QueryBuilder( } }, [shouldRunDefaultQuery, meta]); - useCommitPress(() => { - return runQuery(); - }, true); + useCommitPress(() => runQuery(), + true); if (!apiToken || !cubeApi || !apiUrl) { return null; diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderChart.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderChart.tsx index dc4fcca35c7a3..7fc8a0f514eb3 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderChart.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderChart.tsx @@ -28,8 +28,6 @@ import { AccordionCard } from './components/AccordionCard'; import { OutdatedLabel } from './components/OutdatedLabel'; import { QueryBuilderChartResults } from './QueryBuilderChartResults'; -const CHART_HEIGHT = 400; -const MAX_SERIES_LIMIT = 25; interface QueryBuilderChartProps { maxHeight?: number; @@ -41,7 +39,7 @@ const ALLOWED_CHART_TYPES = ['table', 'line', 'bar', 'area']; export function QueryBuilderChart(props: QueryBuilderChartProps) { const [isVizardLoaded, setIsVizardLoaded] = useState(false); const [isExpanded, setIsExpanded] = useLocalStorage('QueryBuilder:Chart:expanded', false); - const { maxHeight = CHART_HEIGHT, onToggle } = props; + const { onToggle } = props; let { query, isLoading, @@ -101,35 +99,30 @@ export function QueryBuilderChart(props: QueryBuilderChartProps) { ); const onMove = useCallback( - (arg) => { - return updatePivotConfig.moveItem(arg); - }, + (arg) => updatePivotConfig.moveItem(arg), [updatePivotConfig] ); const onUpdate = useCallback( - (arg) => { - return updatePivotConfig.update(arg); - }, + (arg) => updatePivotConfig.update(arg), [updatePivotConfig] ); - const pivotConfigurator = useMemo(() => { - return pivotConfig ? ( - - - - - -
- -
-
-
- ) : undefined; - }, [pivotConfig, onMove, onUpdate]); + const pivotConfigurator = useMemo(() => (pivotConfig ? ( + + + + + +
+ +
+
+
+ ) : undefined), + [pivotConfig, onMove, onUpdate]); return ( Code - {/**/} - {/**/} + {/* */} + {/* */}
Chart Prototyping diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderExtras.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderExtras.tsx index e8ccc650abfb1..eaf26a17768eb 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderExtras.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderExtras.tsx @@ -9,7 +9,6 @@ import { DownIcon, Flow, Grid, - InfoCircleIcon, Link, NumberInput, Radio, @@ -19,7 +18,6 @@ import { tasty, Text, Title, - TooltipProvider, } from '@cube-dev/ui-kit'; import { forwardRef, Key, useEffect, useMemo, useState } from 'react'; import { DragDropContext, Draggable, Droppable, OnDragEndResponder } from 'react-beautiful-dnd'; @@ -64,7 +62,7 @@ function timezoneByName(name: string) { return { tzCode: name, label: name, - name: name, + name, utc: '', }; } @@ -176,7 +174,7 @@ type OrderListItemProps = { onSortChange: (name: string, sorting: SortDirection) => void; }; -export const OrderListItem = forwardRef(function OrderListItem(props: OrderListItemProps, ref) { +export const OrderListItem = forwardRef((props: OrderListItemProps, ref) => { const { name, memberType, @@ -221,8 +219,7 @@ export function QueryBuilderExtras() { const [showOrder, setShowOrder] = useState(true); const fields = [...(query?.dimensions ?? []), ...(query?.measures ?? [])]; const storedTimezones = useStoredTimezones(query.timezone); - const timeDimensions = - query?.timeDimensions?.filter((time) => time.granularity).map((time) => time.dimension) ?? []; + const timeDimensions = query?.timeDimensions?.filter((time) => time.granularity).map((time) => time.dimension) ?? []; timeDimensions.forEach((name) => { if (name && !fields.includes(name)) { @@ -317,18 +314,16 @@ export function QueryBuilderExtras() { const optionsPopover = useMemo(() => { // ungrouped - const isSelected = - query.ungrouped || - query.total || - query.timezone || - query.offset || - (query.limit && query.limit !== DEFAULT_LIMIT); - const selectedCount = - (query.ungrouped ? 1 : 0) + - (query.total ? 1 : 0) + - (query.timezone ? 1 : 0) + - (query.limit && query.limit !== DEFAULT_LIMIT ? 1 : 0) + - (query.offset ? 1 : 0); + const isSelected = query.ungrouped + || query.total + || query.timezone + || query.offset + || (query.limit && query.limit !== DEFAULT_LIMIT); + const selectedCount = (query.ungrouped ? 1 : 0) + + (query.total ? 1 : 0) + + (query.timezone ? 1 : 0) + + (query.limit && query.limit !== DEFAULT_LIMIT ? 1 : 0) + + (query.offset ? 1 : 0); // timezone const timezone = query?.timezone || ''; @@ -596,13 +591,13 @@ export function QueryBuilderLimitSelect() { ) : null } - labelSuffix={ + labelSuffix={( - } + )} selectedKey={query.limit == null ? '0' : String(query.limit)} onSelectionChange={(val: Key) => { updateQuery(() => ({ limit: val === '0' ? undefined : Number(val as string) })); diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderGeneratedSQL.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderGeneratedSQL.tsx index 4aca4cf6e5735..8920af0431822 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderGeneratedSQL.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderGeneratedSQL.tsx @@ -16,8 +16,7 @@ const EditSQLQueryButton = tasty(Button, { }); export function QueryBuilderGeneratedSQL() { - let { query, queryHash, cubeApi, isQueryEmpty, verificationError, openSqlRunner } = - useQueryBuilderContext(); + const { query, queryHash, cubeApi, isQueryEmpty, verificationError, openSqlRunner } = useQueryBuilderContext(); return useDeepMemo(() => { if (!isQueryEmpty) { @@ -49,7 +48,7 @@ export function QueryBuilderGeneratedSQL() { return ( Copy @@ -58,7 +57,7 @@ export function QueryBuilderGeneratedSQL() { openSqlRunner?.(value)} /> ) : undefined} - } + )} > diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderGraphQL.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderGraphQL.tsx index b0d1a458e9b25..cbb16139ace2d 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderGraphQL.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderGraphQL.tsx @@ -104,18 +104,17 @@ export function QueryBuilderGraphQL() { }, [queryHash]); return useMemo(() => { - let fetchButton = - !rawData && !queryError ? ( - - ) : null; + let fetchButton = !rawData && !queryError ? ( + + ) : null; if (hasPrivateMembers && fetchButton) { fetchButton = ( @@ -135,11 +134,11 @@ export function QueryBuilderGraphQL() { ) : ( Copy - } + )} extraActions={fetchButton} > diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderInternals.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderInternals.tsx index 670e2cb53cc49..32a651285c1b4 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderInternals.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderInternals.tsx @@ -41,7 +41,7 @@ const QueryBuilderPanel = tasty(Panel, { }, }); -const QueryBuilderInternals = memo(function QueryBuilderInternals() { +const QueryBuilderInternals = memo(() => { const { error, resultSet, queryHash, dateRanges } = useQueryBuilderContext(); const [isChartExpanded, setIsChartExpanded] = useLocalStorage( 'QueryBuilder:Chart:expanded', @@ -53,36 +53,35 @@ const QueryBuilderInternals = memo(function QueryBuilderInternals() { const [isFiltersExpanded, setIsFiltersExpanded] = useState(true); const [chartSize, updateChartSize] = useAutoSize(chartRef, 0); - const ResultsAndSQL = useMemo(() => { - return ( - <> - - - } - styles={{ padding: '0 1x' }} - onChange={(tab: string) => setTab(tab as Tab)} - > - - - - - - - - - - - - - - - - - - ); - }, [tab, isChartExpanded]); + const ResultsAndSQL = useMemo(() => ( + <> + + + } + styles={{ padding: '0 1x' }} + onChange={(tab: string) => setTab(tab as Tab)} + > + + + + + + + + + + + + + + + + + + ), + [tab, isChartExpanded]); const onToggle = useEvent((isExpanded: boolean) => { setIsFiltersExpanded(isExpanded); @@ -123,25 +122,24 @@ const QueryBuilderInternals = memo(function QueryBuilderInternals() { [] )} - {useMemo(() => { - return ( - <> -
- -
- {!isChartExpanded || chartSize > CHART_THRESHOLD ? ( - ResultsAndSQL - ) : ( - - - - - - - )} - - ); - }, [isChartExpanded, chartSize, ResultsAndSQL])} + {useMemo(() => ( + <> +
+ +
+ {!isChartExpanded || chartSize > CHART_THRESHOLD ? ( + ResultsAndSQL + ) : ( + + + + + + + )} + + ), + [isChartExpanded, chartSize, ResultsAndSQL])} diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderRest.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderRest.tsx index 92e5866cbb97d..a2cd0f0fec40f 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderRest.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderRest.tsx @@ -18,11 +18,11 @@ export function QueryBuilderRest() { ) : ( Copy - } + )} > diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderResults.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderResults.tsx index 7132118232ec2..21b94f22322c8 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderResults.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderResults.tsx @@ -205,13 +205,11 @@ function Pagination(props: PaginationProps) { width="min 15x" onSelectionChange={onSelectionChange} > - {[...Array(numberOfPages)].map((a, i) => { - return ( - - {getPaginationOptionLabel({ page: i + 1, perPage, total })} - - ); - })} + {[...Array(numberOfPages)].map((a, i) => ( + + {getPaginationOptionLabel({ page: i + 1, perPage, total })} + + ))} - - )} - {isVerifying || isMetaLoading ? : null} - - - + const topBar = useMemo(() => ( + + + {showEditQueryButton ? editQueryButton : null} + {!usedCubes.length ? ( + All members + ) : ( + - + )} + {isVerifying || isMetaLoading ? : null} - ); - }, [viewMode, isQueryEmpty, isMetaLoading, usedMembers.length, appliedFilterString, isVerifying]); + + + + + + + ), + [viewMode, isQueryEmpty, isMetaLoading, usedMembers.length, appliedFilterString, isVerifying]); const content = ( <> setIsPasteDialogOpen(false)}> diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderToolBar.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderToolBar.tsx index ed4f0e80a15d3..cf39dc884e899 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderToolBar.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderToolBar.tsx @@ -68,12 +68,12 @@ export function QueryBuilderToolBar() { + Enter OR{' '} Ctrl + Enter - } + )} >