From f911a4f4a0c2f5c9ee5bf9e76ae04d3e5a2a29fc Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 4 Nov 2024 12:31:11 +0100 Subject: [PATCH 1/2] debug --- .circleci/config.yml | 126 +++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ffe339dcda97..4b8a5293b83e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -745,73 +745,73 @@ workflows: when: equal: [normal, << pipeline.parameters.workflow >>] jobs: - - pretty-docs + # - pretty-docs - build - lint: requires: - build - - knip: - requires: - - build - - check: - requires: - - build - - unit-tests: - requires: - - build - - store-test-results: - requires: - - unit-tests - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 14 - requires: - - build - - build-sandboxes: - parallelism: 14 - requires: - - create-sandboxes - - chromatic-sandboxes: - parallelism: 11 - requires: - - build-sandboxes - - e2e-production: - parallelism: 9 - requires: - - build-sandboxes - - e2e-dev: - parallelism: 2 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 9 - requires: - - build-sandboxes - - vitest-integration: - parallelism: 5 - requires: - - create-sandboxes - - bench: - parallelism: 5 - requires: - - build-sandboxes - - test-ui-testing-module: - requires: - - build - - test-portable-stories: - requires: - - build - matrix: - parameters: - directory: ["react", "vue3", "nextjs", "svelte"] + # - knip: + # requires: + # - build + # - check: + # requires: + # - build + # - unit-tests: + # requires: + # - build + # - store-test-results: + # requires: + # - unit-tests + # - script-checks: + # requires: + # - build + # - chromatic-internal-storybook: + # requires: + # - build + # - coverage: + # requires: + # - unit-tests + # - create-sandboxes: + # parallelism: 14 + # requires: + # - build + # - build-sandboxes: + # parallelism: 14 + # requires: + # - create-sandboxes + # - chromatic-sandboxes: + # parallelism: 11 + # requires: + # - build-sandboxes + # - e2e-production: + # parallelism: 9 + # requires: + # - build-sandboxes + # - e2e-dev: + # parallelism: 2 + # requires: + # - create-sandboxes + # - test-runner-production: + # parallelism: 9 + # requires: + # - build-sandboxes + # - vitest-integration: + # parallelism: 5 + # requires: + # - create-sandboxes + # - bench: + # parallelism: 5 + # requires: + # - build-sandboxes + # - test-ui-testing-module: + # requires: + # - build + # - test-portable-stories: + # requires: + # - build + # matrix: + # parameters: + # directory: ["react", "vue3", "nextjs", "svelte"] # TODO: reenable once we find out the source of flakyness # - test-runner-dev: # requires: From 30ca58583f82f9e2c8909bffc07760d2668a2695 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 4 Nov 2024 13:09:51 +0100 Subject: [PATCH 2/2] add oxlint --- .../cli-storybook/test/default/cli.test.cjs | 2 +- code/oxlint.json | 13 +++ code/package.json | 6 +- code/yarn.lock | 110 ++++++++++++++++++ scripts/.eslintrc.cjs | 2 +- scripts/package.json | 2 + scripts/yarn.lock | 110 ++++++++++++++++++ 7 files changed, 241 insertions(+), 4 deletions(-) create mode 100644 code/oxlint.json diff --git a/code/lib/cli-storybook/test/default/cli.test.cjs b/code/lib/cli-storybook/test/default/cli.test.cjs index b569fa4dc5c6..5e7ac7594fff 100755 --- a/code/lib/cli-storybook/test/default/cli.test.cjs +++ b/code/lib/cli-storybook/test/default/cli.test.cjs @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +const { describe, it, expect } = require('vitest'); const run = require('../helpers.cjs'); diff --git a/code/oxlint.json b/code/oxlint.json new file mode 100644 index 000000000000..fa44e3675fb8 --- /dev/null +++ b/code/oxlint.json @@ -0,0 +1,13 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": [ + "import", + "unicorn", + "jsdoc" + ], + "categories": { + "correctness": "deny", + "perf": "deny", + "suspicious": "deny" + } +} \ No newline at end of file diff --git a/code/package.json b/code/package.json index 78ec34d4fafe..d2b3996bb855 100644 --- a/code/package.json +++ b/code/package.json @@ -40,7 +40,7 @@ "lint": "yarn lint:js && yarn lint:md", "lint:ejs": "ejslint **/*.ejs", "lint:js": "yarn lint:js:cmd . --quiet", - "lint:js:cmd": "cross-env NODE_ENV=production eslint --cache --cache-location=../.cache/eslint --ext .js,.jsx,.json,.html,.ts,.tsx,.mjs --report-unused-disable-directives", + "lint:js:cmd": "oxlint && cross-env NODE_ENV=production eslint --cache --cache-location=../.cache/eslint --ext .js,.jsx,.json,.html,.ts,.tsx,.mjs --report-unused-disable-directives", "lint:md": "../scripts/node_modules/.bin/remark -q .", "lint:other": "prettier --write '**/*.{css,html,json,md,yml}'", "lint:package": "sort-package-json", @@ -192,6 +192,7 @@ "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-depend": "^0.11.0", "eslint-plugin-local-rules": "portal:../scripts/eslint-plugin-local-rules", + "eslint-plugin-oxlint": "^0.11.0", "eslint-plugin-playwright": "^1.6.2", "eslint-plugin-storybook": "^0.8.0", "github-release-from-changelog": "^2.1.1", @@ -202,6 +203,7 @@ "lint-staged": "^13.2.2", "mock-require": "^3.0.3", "nx": "18.0.6", + "oxlint": "^0.11.0", "prettier": "^3.1.1", "prettier-plugin-brace-style": "^0.6.2", "prettier-plugin-css-order": "^2.1.2", @@ -294,4 +296,4 @@ ] ] } -} +} \ No newline at end of file diff --git a/code/yarn.lock b/code/yarn.lock index 272933533d60..0a8e8b268daf 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -4586,6 +4586,62 @@ __metadata: languageName: node linkType: hard +"@oxlint/darwin-arm64@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/darwin-arm64@npm:0.11.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/darwin-x64@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/darwin-x64@npm:0.11.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxlint/linux-arm64-gnu@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/linux-arm64-gnu@npm:0.11.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/linux-arm64-musl@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/linux-arm64-musl@npm:0.11.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/linux-x64-gnu@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/linux-x64-gnu@npm:0.11.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/linux-x64-musl@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/linux-x64-musl@npm:0.11.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/win32-arm64@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/win32-arm64@npm:0.11.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/win32-x64@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/win32-x64@npm:0.11.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@phenomnomnominal/tsquery@npm:~5.0.1": version: 5.0.1 resolution: "@phenomnomnominal/tsquery@npm:5.0.1" @@ -6935,6 +6991,7 @@ __metadata: eslint-import-resolver-typescript: "npm:^3.6.1" eslint-plugin-depend: "npm:^0.11.0" eslint-plugin-local-rules: "portal:../scripts/eslint-plugin-local-rules" + eslint-plugin-oxlint: "npm:^0.11.0" eslint-plugin-playwright: "npm:^1.6.2" eslint-plugin-storybook: "npm:^0.8.0" github-release-from-changelog: "npm:^2.1.1" @@ -6945,6 +7002,7 @@ __metadata: lint-staged: "npm:^13.2.2" mock-require: "npm:^3.0.3" nx: "npm:18.0.6" + oxlint: "npm:^0.11.0" prettier: "npm:^3.1.1" prettier-plugin-brace-style: "npm:^0.6.2" prettier-plugin-css-order: "npm:^2.1.2" @@ -14520,6 +14578,15 @@ __metadata: languageName: node linkType: soft +"eslint-plugin-oxlint@npm:^0.11.0": + version: 0.11.0 + resolution: "eslint-plugin-oxlint@npm:0.11.0" + dependencies: + jsonc-parser: "npm:^3.3.1" + checksum: 10c0/89050c240c569c9828237adf1031ceef0c7ccc8bc006b63aa347c8facc3189cf8774344de690b4433d382b3a7d80680941326fc9c9eaca8f8e9c24543048d3d1 + languageName: node + linkType: hard + "eslint-plugin-playwright@npm:^1.6.2": version: 1.6.2 resolution: "eslint-plugin-playwright@npm:1.6.2" @@ -18652,6 +18719,13 @@ __metadata: languageName: node linkType: hard +"jsonc-parser@npm:^3.3.1": + version: 3.3.1 + resolution: "jsonc-parser@npm:3.3.1" + checksum: 10c0/269c3ae0a0e4f907a914bf334306c384aabb9929bd8c99f909275ebd5c2d3bc70b9bcd119ad794f339dec9f24b6a4ee9cd5a8ab2e6435e730ad4075388fc2ab6 + languageName: node + linkType: hard + "jsonexport@npm:^3.0.1": version: 3.2.0 resolution: "jsonexport@npm:3.2.0" @@ -22106,6 +22180,42 @@ __metadata: languageName: node linkType: hard +"oxlint@npm:^0.11.0": + version: 0.11.0 + resolution: "oxlint@npm:0.11.0" + dependencies: + "@oxlint/darwin-arm64": "npm:0.11.0" + "@oxlint/darwin-x64": "npm:0.11.0" + "@oxlint/linux-arm64-gnu": "npm:0.11.0" + "@oxlint/linux-arm64-musl": "npm:0.11.0" + "@oxlint/linux-x64-gnu": "npm:0.11.0" + "@oxlint/linux-x64-musl": "npm:0.11.0" + "@oxlint/win32-arm64": "npm:0.11.0" + "@oxlint/win32-x64": "npm:0.11.0" + dependenciesMeta: + "@oxlint/darwin-arm64": + optional: true + "@oxlint/darwin-x64": + optional: true + "@oxlint/linux-arm64-gnu": + optional: true + "@oxlint/linux-arm64-musl": + optional: true + "@oxlint/linux-x64-gnu": + optional: true + "@oxlint/linux-x64-musl": + optional: true + "@oxlint/win32-arm64": + optional: true + "@oxlint/win32-x64": + optional: true + bin: + oxc_language_server: bin/oxc_language_server + oxlint: bin/oxlint + checksum: 10c0/7002aef24409555df2377e4d6be18dae09f918eed0820aa0e6b2af3933f76b1789507bde6d68f6a7f4a01dad01bd3112582e4440bb0874791835f72f9d34fce8 + languageName: node + linkType: hard + "p-event@npm:^4.1.0": version: 4.2.0 resolution: "p-event@npm:4.2.0" diff --git a/scripts/.eslintrc.cjs b/scripts/.eslintrc.cjs index b49fe70944d0..77dfa7a98dd6 100644 --- a/scripts/.eslintrc.cjs +++ b/scripts/.eslintrc.cjs @@ -1,7 +1,7 @@ module.exports = { root: true, extends: [ - // + "plugin:oxlint/recommended", '@storybook/eslint-config-storybook', 'plugin:storybook/recommended', 'plugin:depend/recommended' diff --git a/scripts/package.json b/scripts/package.json index 50b1a0760dcf..b7cdfdb23ebb 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -119,6 +119,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-json": "^4.0.0", "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-oxlint": "^0.11.0", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.2", "eslint-plugin-react-hooks": "^4.6.2", @@ -141,6 +142,7 @@ "node-gyp": "^9.3.1", "nx": "18.0.6", "ora": "^5.4.1", + "oxlint": "^0.11.0", "p-limit": "^3.1.0", "p-retry": "^5.1.2", "picocolors": "^1.1.0", diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 8466993950ad..d8f5b98a5994 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -1294,6 +1294,62 @@ __metadata: languageName: node linkType: hard +"@oxlint/darwin-arm64@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/darwin-arm64@npm:0.11.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/darwin-x64@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/darwin-x64@npm:0.11.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxlint/linux-arm64-gnu@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/linux-arm64-gnu@npm:0.11.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/linux-arm64-musl@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/linux-arm64-musl@npm:0.11.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/linux-x64-gnu@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/linux-x64-gnu@npm:0.11.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/linux-x64-musl@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/linux-x64-musl@npm:0.11.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/win32-arm64@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/win32-arm64@npm:0.11.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/win32-x64@npm:0.11.0": + version: 0.11.0 + resolution: "@oxlint/win32-x64@npm:0.11.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -1604,6 +1660,7 @@ __metadata: eslint-plugin-import: "npm:^2.29.1" eslint-plugin-json: "npm:^4.0.0" eslint-plugin-jsx-a11y: "npm:^6.8.0" + eslint-plugin-oxlint: "npm:^0.11.0" eslint-plugin-prettier: "npm:^5.1.3" eslint-plugin-react: "npm:^7.34.2" eslint-plugin-react-hooks: "npm:^4.6.2" @@ -1627,6 +1684,7 @@ __metadata: node-gyp: "npm:^9.3.1" nx: "npm:18.0.6" ora: "npm:^5.4.1" + oxlint: "npm:^0.11.0" p-limit: "npm:^3.1.0" p-retry: "npm:^5.1.2" picocolors: "npm:^1.1.0" @@ -5667,6 +5725,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-oxlint@npm:^0.11.0": + version: 0.11.0 + resolution: "eslint-plugin-oxlint@npm:0.11.0" + dependencies: + jsonc-parser: "npm:^3.3.1" + checksum: 10c0/89050c240c569c9828237adf1031ceef0c7ccc8bc006b63aa347c8facc3189cf8774344de690b4433d382b3a7d80680941326fc9c9eaca8f8e9c24543048d3d1 + languageName: node + linkType: hard + "eslint-plugin-prettier@npm:^5.1.3": version: 5.1.3 resolution: "eslint-plugin-prettier@npm:5.1.3" @@ -8296,6 +8363,13 @@ __metadata: languageName: node linkType: hard +"jsonc-parser@npm:^3.3.1": + version: 3.3.1 + resolution: "jsonc-parser@npm:3.3.1" + checksum: 10c0/269c3ae0a0e4f907a914bf334306c384aabb9929bd8c99f909275ebd5c2d3bc70b9bcd119ad794f339dec9f24b6a4ee9cd5a8ab2e6435e730ad4075388fc2ab6 + languageName: node + linkType: hard + "jsonfile@npm:^6.0.1": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" @@ -10512,6 +10586,42 @@ __metadata: languageName: node linkType: hard +"oxlint@npm:^0.11.0": + version: 0.11.0 + resolution: "oxlint@npm:0.11.0" + dependencies: + "@oxlint/darwin-arm64": "npm:0.11.0" + "@oxlint/darwin-x64": "npm:0.11.0" + "@oxlint/linux-arm64-gnu": "npm:0.11.0" + "@oxlint/linux-arm64-musl": "npm:0.11.0" + "@oxlint/linux-x64-gnu": "npm:0.11.0" + "@oxlint/linux-x64-musl": "npm:0.11.0" + "@oxlint/win32-arm64": "npm:0.11.0" + "@oxlint/win32-x64": "npm:0.11.0" + dependenciesMeta: + "@oxlint/darwin-arm64": + optional: true + "@oxlint/darwin-x64": + optional: true + "@oxlint/linux-arm64-gnu": + optional: true + "@oxlint/linux-arm64-musl": + optional: true + "@oxlint/linux-x64-gnu": + optional: true + "@oxlint/linux-x64-musl": + optional: true + "@oxlint/win32-arm64": + optional: true + "@oxlint/win32-x64": + optional: true + bin: + oxc_language_server: bin/oxc_language_server + oxlint: bin/oxlint + checksum: 10c0/7002aef24409555df2377e4d6be18dae09f918eed0820aa0e6b2af3933f76b1789507bde6d68f6a7f4a01dad01bd3112582e4440bb0874791835f72f9d34fce8 + languageName: node + linkType: hard + "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0"