diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 013752bb3d8b..2dee6f918a93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,14 +172,9 @@ jobs: - name: Pnpm Cache uses: ./.github/actions/pnpm-cache - - name: Oxlint + - name: lint_js if: steps.changes.outputs.src == 'true' run: pnpm run lint:js - - - name: Biome Sort Imports Order - if: steps.changes.outputs.src == 'true' - run: pnpm run lint-ci:js-sort-imports-order - - name: Prettier if: steps.changes.outputs.src == 'true' run: pnpm run format-ci:js diff --git a/biome.json b/biome.json index ab34ab6c3934..909b48b8fa37 100644 --- a/biome.json +++ b/biome.json @@ -3,6 +3,12 @@ "formatter": { "enabled": false }, + "json": { + "parser": { + "allowComments": true, + "allowTrailingCommas": true + } + }, "organizeImports": { "enabled": true, "ignore": [ @@ -22,7 +28,11 @@ ] }, "linter": { - "enabled": false + "enabled": true, + "rules": { + "recommended": false + }, + "ignore": ["tests/**/*", "crates/**/*", "diff.bundle.js"] }, "vcs": { "enabled": true, diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index 0b29c20eb7bb..3a3d0af3dacc 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -2,9 +2,5 @@ export default { "*.rs": "rustfmt --edition 2021", "*.{ts,tsx,js}": "pnpm run format:js", "*.toml": "npx @taplo/cli format", - "*.{ts,tsx,js,cts,cjs,mts,mjs}": () => [ - "pnpm run lint:js", - "pnpm run lint:js-sort-imports-order", - "node ./x ae ci" - ] + "*.{ts,tsx,js,cts,cjs,mts,mjs}": () => ["pnpm run lint:js", "node ./x ae ci"] }; diff --git a/package.json b/package.json index 66ca3d39a97b..8090ee01f698 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,8 @@ "format-ci:js": "node ./node_modules/prettier/bin/prettier.cjs \"packages/**/src/**/*.{ts,tsx,js}\" \"crates/rspack_plugin_runtime/**/*.{ts,js}\" \"x.mjs\" --check", "format-ci:toml": "npx @taplo/cli format --check '.cargo/*.toml' './crates/**/Cargo.toml' './Cargo.toml'", "format:toml": "npx @taplo/cli format '.cargo/*.toml' './crates/**/Cargo.toml' './Cargo.toml'", - "lint:js": "oxlint --deny-warnings -c .eslintrc.json", - "lint:js-sort-imports-order": "pnpm run lint-ci:js-sort-imports-order --write", - "lint-ci:js-sort-imports-order": "biome check", + "lint:js": "pnpm run lint-ci:js --write", + "lint-ci:js": "biome check", "lint:rs": "node ./scripts/check_rust_dependency.cjs", "build:binding:debug": "pnpm --filter @rspack/binding run build:debug", "build:binding:release": "pnpm --filter @rspack/binding run build:release", @@ -67,7 +66,6 @@ "jest": "29.7.0", "jest-environment-node": "29.7.0", "lint-staged": "^15.0.0", - "oxlint": "0.3.4", "prettier": "3.2.5", "prettier-2": "npm:prettier@2.8.8", "rimraf": "3.0.2", diff --git a/packages/create-rspack/template-vue-ts/src/shims-vue.d.ts b/packages/create-rspack/template-vue-ts/src/shims-vue.d.ts index 201809da0917..46f44c0294a2 100644 --- a/packages/create-rspack/template-vue-ts/src/shims-vue.d.ts +++ b/packages/create-rspack/template-vue-ts/src/shims-vue.d.ts @@ -1,6 +1,5 @@ declare module "*.vue" { import { DefineComponent } from "vue"; - // biome-ignore lint/complexity/noBannedTypes: reason const component: DefineComponent<{}, {}, any>; export default component; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 730d56d87272..c9017254e898 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,9 +53,6 @@ importers: lint-staged: specifier: ^15.0.0 version: 15.2.2 - oxlint: - specifier: 0.3.4 - version: 0.3.4 prettier: specifier: 3.2.5 version: 3.2.5 @@ -1228,18 +1225,18 @@ packages: resolution: {integrity: sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0 + '@babel/core': 7.22.5 '@babel/helper-create-regexp-features-plugin@7.24.7': resolution: {integrity: sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0 + '@babel/core': 7.22.5 '@babel/helper-define-polyfill-provider@0.6.2': resolution: {integrity: sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==} peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + '@babel/core': 7.22.5 '@babel/helper-environment-visitor@7.22.20': resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} @@ -1287,7 +1284,7 @@ packages: resolution: {integrity: sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0 + '@babel/core': 7.22.5 '@babel/helper-optimise-call-expression@7.24.7': resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} @@ -1305,13 +1302,13 @@ packages: resolution: {integrity: sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0 + '@babel/core': 7.22.5 '@babel/helper-replace-supers@7.24.7': resolution: {integrity: sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0 + '@babel/core': 7.22.5 '@babel/helper-simple-access@7.22.5': resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} @@ -1919,6 +1916,10 @@ packages: resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.22.5': + resolution: {integrity: sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==} + engines: {node: '>=6.9.0'} + '@babel/traverse@7.23.2': resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} engines: {node: '>=6.9.0'} @@ -1931,6 +1932,10 @@ packages: resolution: {integrity: sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==} engines: {node: '>=6.9.0'} + '@babel/types@7.22.5': + resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} + engines: {node: '>=6.9.0'} + '@babel/types@7.23.0': resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} engines: {node: '>=6.9.0'} @@ -2619,46 +2624,6 @@ packages: '@octokit/types@13.2.0': resolution: {integrity: sha512-K4rpfbIQLe4UimS/PWZAcImhZUC80lhe2f1NpAaaTulPJXv54QIAFFCQEEbdQdqTV/745QDmdvp8NI49LaI00A==} - '@oxlint/darwin-arm64@0.3.4': - resolution: {integrity: sha512-MRoL9iN981B0gXRSHYlXu4NRqgObtl6JaHzOJemmOTnj3H7T9zO7V47+bQk7bWARKClRN7Fzy9IuDFPDqNneTQ==} - cpu: [arm64] - os: [darwin] - - '@oxlint/darwin-x64@0.3.4': - resolution: {integrity: sha512-G+GZhDRgrKPRlccIsaXTLlJsdcI+VRgeqMY9kQsWP0GKs3kMkE+oMXIP1/W7rrCLFKEvPDhTEVzWrlnO1sdh1g==} - cpu: [x64] - os: [darwin] - - '@oxlint/linux-arm64-gnu@0.3.4': - resolution: {integrity: sha512-zWrWLxK1itpFxZBffpT+wskBVmKotaYLmtBvIgr/TrPCsxXQE5Ofvh8/siTds8Q5rhgCAEEdwPijJoNotK8lQQ==} - cpu: [arm64] - os: [linux] - - '@oxlint/linux-arm64-musl@0.3.4': - resolution: {integrity: sha512-aDKg7Q/YYmhA7p29FaOUGkCd6jAZppEdsAM4N+p6+fnL/ZUV/HBQ2GIqGYIH2yCc1oWk7N5CdtrGvMLeR21E6w==} - cpu: [arm64] - os: [linux] - - '@oxlint/linux-x64-gnu@0.3.4': - resolution: {integrity: sha512-AVh/ddjdu+kQyeSvhOo1F/qU62StDNliBv2C43k/tspZmRej8oo8Te1wfD95jG9dOwD04/rZiCZw+eOOzxWpHw==} - cpu: [x64] - os: [linux] - - '@oxlint/linux-x64-musl@0.3.4': - resolution: {integrity: sha512-CEktyu/jrszF8hhwB2lyHvMoXYkW2OXvNJ+t+xndpX1FCcK5Oo1rxQuvYhNJv8u6d+aR32aNAyT7GgNhi1LPoQ==} - cpu: [x64] - os: [linux] - - '@oxlint/win32-arm64@0.3.4': - resolution: {integrity: sha512-BLhBnI09n+s14TKRA4w6OrUx5GTtVde2lGjdIvnb4uNL7XaD5N9HqRlLKQdRgJo7dbK9PWCoqHovRORSznOgrg==} - cpu: [arm64] - os: [win32] - - '@oxlint/win32-x64@0.3.4': - resolution: {integrity: sha512-MRLiStH88hIKHJ4+VzsD8eEmcJuNsfpzwCu7ndnBzdI7q7ujkSecNPdjxtSiNxoFTRDTJT5F48+vesXCHehwXg==} - cpu: [x64] - os: [win32] - '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -7173,11 +7138,6 @@ packages: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} - oxlint@0.3.4: - resolution: {integrity: sha512-xvBvleMnsQUI33YRJT09UudNI96cvIM/QQ/LjH0a1+YyXg10PkZJt/36cwErBeHqjSXG0ErE4d0htW7zVUFnkA==} - engines: {node: '>=14.*'} - hasBin: true - p-cancelable@1.1.0: resolution: {integrity: sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==} engines: {node: '>=6'} @@ -9859,7 +9819,7 @@ snapshots: '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.22.5 '@babel/helper-function-name@7.23.0': dependencies: @@ -9869,7 +9829,7 @@ snapshots: '@babel/helper-function-name@7.24.7': dependencies: '@babel/template': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.22.5 '@babel/helper-hoist-variables@7.22.5': dependencies: @@ -9892,8 +9852,8 @@ snapshots: '@babel/helper-module-imports@7.24.7': dependencies: - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/traverse': 7.22.5 + '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color @@ -9919,7 +9879,7 @@ snapshots: '@babel/helper-optimise-call-expression@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.22.5 '@babel/helper-plugin-utils@7.24.0': {} @@ -9956,8 +9916,8 @@ snapshots: '@babel/helper-skip-transparent-expression-wrappers@7.24.7': dependencies: - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/traverse': 7.22.5 + '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color @@ -10692,6 +10652,21 @@ snapshots: '@babel/parser': 7.24.7 '@babel/types': 7.24.7 + '@babel/traverse@7.22.5': + dependencies: + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.23.0 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-function-name': 7.24.7 + '@babel/helper-hoist-variables': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + '@babel/traverse@7.23.2': dependencies: '@babel/code-frame': 7.24.2 @@ -10737,6 +10712,12 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/types@7.22.5': + dependencies: + '@babel/helper-string-parser': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 + to-fast-properties: 2.0.0 + '@babel/types@7.23.0': dependencies: '@babel/helper-string-parser': 7.24.1 @@ -11425,30 +11406,6 @@ snapshots: dependencies: '@octokit/openapi-types': 22.0.0 - '@oxlint/darwin-arm64@0.3.4': - optional: true - - '@oxlint/darwin-x64@0.3.4': - optional: true - - '@oxlint/linux-arm64-gnu@0.3.4': - optional: true - - '@oxlint/linux-arm64-musl@0.3.4': - optional: true - - '@oxlint/linux-x64-gnu@0.3.4': - optional: true - - '@oxlint/linux-x64-musl@0.3.4': - optional: true - - '@oxlint/win32-arm64@0.3.4': - optional: true - - '@oxlint/win32-x64@0.3.4': - optional: true - '@pkgjs/parseargs@0.11.0': optional: true @@ -17446,17 +17403,6 @@ snapshots: os-tmpdir@1.0.2: {} - oxlint@0.3.4: - optionalDependencies: - '@oxlint/darwin-arm64': 0.3.4 - '@oxlint/darwin-x64': 0.3.4 - '@oxlint/linux-arm64-gnu': 0.3.4 - '@oxlint/linux-arm64-musl': 0.3.4 - '@oxlint/linux-x64-gnu': 0.3.4 - '@oxlint/linux-x64-musl': 0.3.4 - '@oxlint/win32-arm64': 0.3.4 - '@oxlint/win32-x64': 0.3.4 - p-cancelable@1.1.0: {} p-defer@1.0.0: {}