diff --git a/oxlint.json b/oxlint.json new file mode 100644 index 0000000..47ff4ee --- /dev/null +++ b/oxlint.json @@ -0,0 +1,14 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["import", "unicorn", "jsdoc", "react", "typescript", "oxc"], + "categories": { + "correctness": "deny", + "perf": "deny", + "suspicious": "deny" + }, + "rules": { + "eslint/no-await-in-loop": "allow", + "jsdoc/check-tag-names": "allow", + "oxc/no-accumulating-spread": "allow" + } +} diff --git a/package.json b/package.json index 8f9b5bd..f770a5f 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "jsdom": "catalog:", "markdown-link-extractor": "catalog:", "nx": "catalog:", + "oxlint": "catalog:", "prettier": "catalog:", "publint": "catalog:", "sherif": "catalog:", diff --git a/packages/config/package.json b/packages/config/package.json index b028a67..66d5c7e 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -16,7 +16,7 @@ }, "scripts": { "test:types": "tsc", - "test:eslint": "eslint --concurrency=auto ./src", + "test:eslint": "oxlint -c ../../oxlint.json && eslint ./src", "test:build": "publint --strict", "build": "vite build" }, diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index b1d4cf8..92dc456 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -16,7 +16,7 @@ }, "scripts": { "test:types": "tsc", - "test:eslint": "eslint --concurrency=auto ./src", + "test:eslint": "oxlint -c ../../oxlint.json && eslint ./src", "test:build": "publint --strict" }, "type": "module", @@ -41,6 +41,7 @@ "@stylistic/eslint-plugin": "catalog:", "eslint-plugin-import-x": "catalog:", "eslint-plugin-n": "catalog:", + "eslint-plugin-oxlint": "catalog:", "globals": "catalog:", "typescript-eslint": "catalog:", "vue-eslint-parser": "catalog:" diff --git a/packages/eslint-config/src/index.js b/packages/eslint-config/src/index.js index 3c95f0a..5735c66 100644 --- a/packages/eslint-config/src/index.js +++ b/packages/eslint-config/src/index.js @@ -1,8 +1,11 @@ +// @ts-check + import tseslint from 'typescript-eslint' import vueParser from 'vue-eslint-parser' import stylisticPlugin from '@stylistic/eslint-plugin' import importPlugin from 'eslint-plugin-import-x' import nodePlugin from 'eslint-plugin-n' +import oxlintPlugin from 'eslint-plugin-oxlint' import globals from 'globals' import { javascriptRules } from './javascript.js' import { importRules } from './import.js' @@ -26,6 +29,8 @@ const jsRules = { ...importRules, ...nodeRules, ...stylisticRules, + // @ts-ignore Invalid type + ...oxlintPlugin.configs['flat/recommended'].rules, } const jsPlugins = { diff --git a/packages/publish-config/package.json b/packages/publish-config/package.json index 57d742c..fb0944d 100644 --- a/packages/publish-config/package.json +++ b/packages/publish-config/package.json @@ -16,7 +16,7 @@ }, "scripts": { "test:types": "tsc", - "test:eslint": "eslint --concurrency=auto ./src", + "test:eslint": "oxlint -c ../../oxlint.json && eslint ./src", "test:build": "publint --strict" }, "type": "module", diff --git a/packages/typedoc-config/package.json b/packages/typedoc-config/package.json index e5b0616..8e6126f 100644 --- a/packages/typedoc-config/package.json +++ b/packages/typedoc-config/package.json @@ -16,7 +16,7 @@ }, "scripts": { "test:types": "tsc", - "test:eslint": "eslint --concurrency=auto ./src", + "test:eslint": "oxlint -c ../../oxlint.json && eslint ./src", "test:build": "publint --strict" }, "type": "module", diff --git a/packages/vite-config/package.json b/packages/vite-config/package.json index 881689d..3a547b5 100644 --- a/packages/vite-config/package.json +++ b/packages/vite-config/package.json @@ -16,7 +16,7 @@ }, "scripts": { "test:types": "tsc", - "test:eslint": "eslint --concurrency=auto ./src", + "test:eslint": "oxlint -c ../../oxlint.json && eslint ./src", "test:build": "publint --strict" }, "type": "module", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cd6b374..6cc7366 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,6 +57,9 @@ catalogs: eslint-plugin-n: specifier: ^17.23.1 version: 17.23.1 + eslint-plugin-oxlint: + specifier: ^1.25.0 + version: 1.25.0 globals: specifier: ^16.4.0 version: 16.4.0 @@ -72,6 +75,9 @@ catalogs: nx: specifier: ^21.6.4 version: 21.6.4 + oxlint: + specifier: ^1.25.0 + version: 1.25.0 prettier: specifier: ^3.6.2 version: 3.6.2 @@ -164,6 +170,9 @@ importers: nx: specifier: 'catalog:' version: 21.6.4 + oxlint: + specifier: 'catalog:' + version: 1.25.0 prettier: specifier: 'catalog:' version: 3.6.2 @@ -278,6 +287,9 @@ importers: eslint-plugin-n: specifier: 'catalog:' version: 17.23.1(eslint@9.37.0)(typescript@5.9.3) + eslint-plugin-oxlint: + specifier: 'catalog:' + version: 1.25.0 globals: specifier: 'catalog:' version: 16.4.0 @@ -909,6 +921,46 @@ packages: cpu: [x64] os: [win32] + '@oxlint/darwin-arm64@1.25.0': + resolution: {integrity: sha512-OLx4XyUv5SO7k8y5FzJIoTKan+iKK53T1Ws8fBIl4zblUIWI66ZIqSVG2A2rxOBA7XfINqCz8UipGzOW9yzKcg==} + cpu: [arm64] + os: [darwin] + + '@oxlint/darwin-x64@1.25.0': + resolution: {integrity: sha512-srndNPiliA0rchYKqYfOdqA9kqyVQ6YChK3XJe9Lxo/YG8tTJ5K65g2A5SHTT2s1Nm5DnQa5AKZH7w+7KI/m8A==} + cpu: [x64] + os: [darwin] + + '@oxlint/linux-arm64-gnu@1.25.0': + resolution: {integrity: sha512-W9+DnHDbygprpGV586BolwWES+o2raOcSJv404nOFPQjWZ09efG24nuXrg/fpyoMQb4YoW2W1fvlnyMVU+ADcw==} + cpu: [arm64] + os: [linux] + + '@oxlint/linux-arm64-musl@1.25.0': + resolution: {integrity: sha512-1tIMpQhKlItm7uKzs3lluG7KorZR5ItoNKd1iFYF/IPmZ+i0/iuZ7MVWXRjBcgQMhMYSdfZpSVEdFKcFz2HDxA==} + cpu: [arm64] + os: [linux] + + '@oxlint/linux-x64-gnu@1.25.0': + resolution: {integrity: sha512-xVkmk/zkIulc5o0OUWY04DyBfKotnq9+60O9I5c0DpdKAELVLhZkLmct0apx3jAX6Z/3yYPzhc6Lw1Ia3jU3VQ==} + cpu: [x64] + os: [linux] + + '@oxlint/linux-x64-musl@1.25.0': + resolution: {integrity: sha512-IeO10dZosJV58YzN0gckhRYac+FM9s5VCKUx2ghgbKR91z/bpSRcRl8Sy5cWTkcVwu3ZTikhK8aXC6j7XIqKNw==} + cpu: [x64] + os: [linux] + + '@oxlint/win32-arm64@1.25.0': + resolution: {integrity: sha512-mpdiXZm2oNuSQAbTEPRDuSeR6v1DCD7Cl/xouR2ggHZu3AKZ4XYmm29hyrzIxrYVoQ/5j+182TGdOpGYn9xQJg==} + cpu: [arm64] + os: [win32] + + '@oxlint/win32-x64@1.25.0': + resolution: {integrity: sha512-opoIACOkcFloWQO6dubBLbcWwW52ML8+3deFdr0WE0PeM9UXdLB0jRMuLsEnplmBoy9TRvmxDJ+Pw8xc2PsOfQ==} + cpu: [x64] + os: [win32] + '@publint/pack@0.1.2': resolution: {integrity: sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw==} engines: {node: '>=18'} @@ -1849,6 +1901,9 @@ packages: peerDependencies: eslint: '>=8.23.0' + eslint-plugin-oxlint@1.25.0: + resolution: {integrity: sha512-grS4KdR9FAxoQC+wMkepeQHL4osMhoYfUI11Pot6Gitqr4wWi+JZrX0Shr8Bs9fjdWhEjtaZIV6cr4mbfytmyw==} + eslint-scope@8.4.0: resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2246,6 +2301,9 @@ packages: jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -2467,6 +2525,16 @@ packages: outdent@0.5.0: resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + oxlint@1.25.0: + resolution: {integrity: sha512-O6iJ9xeuy9eQCi8/EghvsNO6lzSaUPs0FR1uLy51Exp3RkVpjvJKyPPhd9qv65KLnfG/BNd2HE/rH0NbEfVVzA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=0.4.0' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + p-filter@2.1.0: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} @@ -3857,6 +3925,30 @@ snapshots: '@nx/nx-win32-x64-msvc@21.6.4': optional: true + '@oxlint/darwin-arm64@1.25.0': + optional: true + + '@oxlint/darwin-x64@1.25.0': + optional: true + + '@oxlint/linux-arm64-gnu@1.25.0': + optional: true + + '@oxlint/linux-arm64-musl@1.25.0': + optional: true + + '@oxlint/linux-x64-gnu@1.25.0': + optional: true + + '@oxlint/linux-x64-musl@1.25.0': + optional: true + + '@oxlint/win32-arm64@1.25.0': + optional: true + + '@oxlint/win32-x64@1.25.0': + optional: true + '@publint/pack@0.1.2': {} '@rolldown/pluginutils@1.0.0-beta.29': {} @@ -4859,6 +4951,10 @@ snapshots: transitivePeerDependencies: - typescript + eslint-plugin-oxlint@1.25.0: + dependencies: + jsonc-parser: 3.3.1 + eslint-scope@8.4.0: dependencies: esrecurse: 4.3.0 @@ -5255,6 +5351,8 @@ snapshots: jsonc-parser@3.2.0: {} + jsonc-parser@3.3.1: {} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -5509,6 +5607,17 @@ snapshots: outdent@0.5.0: {} + oxlint@1.25.0: + optionalDependencies: + '@oxlint/darwin-arm64': 1.25.0 + '@oxlint/darwin-x64': 1.25.0 + '@oxlint/linux-arm64-gnu': 1.25.0 + '@oxlint/linux-arm64-musl': 1.25.0 + '@oxlint/linux-x64-gnu': 1.25.0 + '@oxlint/linux-x64-musl': 1.25.0 + '@oxlint/win32-arm64': 1.25.0 + '@oxlint/win32-x64': 1.25.0 + p-filter@2.1.0: dependencies: p-map: 2.1.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 02177ae..f0155ce 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -24,11 +24,13 @@ catalog: eslint: ^9.37.0 eslint-plugin-import-x: ^4.16.1 eslint-plugin-n: ^17.23.1 + eslint-plugin-oxlint: ^1.25.0 globals: ^16.4.0 jsdom: ^27.0.0 jsonfile: ^6.2.0 markdown-link-extractor: ^4.0.2 nx: ^21.6.4 + oxlint: ^1.25.0 prettier: ^3.6.2 publint: ^0.3.14 react: ^19.2.0