diff --git a/configs/base.js b/configs/base.js index 9fa31de..c593da7 100644 --- a/configs/base.js +++ b/configs/base.js @@ -8,6 +8,10 @@ import eslintPluginUnicorn from 'eslint-plugin-unicorn'; const baseConfig = [ js.configs.recommended, + { + // annoys af. + 'capitalized-comments': 'off', + }, importPlugin.flatConfigs.recommended, { diff --git a/configs/jest.js b/configs/jest.js index 2619cec..2aa8d60 100644 --- a/configs/jest.js +++ b/configs/jest.js @@ -1,2 +1,4 @@ -const jestConfig = []; +import jest from 'eslint-plugin-jest'; + +const jestConfig = [jest.configs['flat/recommended']]; export default jestConfig; diff --git a/configs/vitest.js b/configs/vitest.js index 2b89b7a..f1158b0 100644 --- a/configs/vitest.js +++ b/configs/vitest.js @@ -1,2 +1,4 @@ -const vitestConfig = []; +import vitest from '@vitest/eslint-plugin'; + +const vitestConfig = [vitest.configs.flat.recommended]; export default vitestConfig; diff --git a/package.json b/package.json index 7ec7109..509af16 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@eslint/markdown": "^6.2.1", "@typescript-eslint/eslint-plugin": "^8.15.0", "@typescript-eslint/parser": "^8.15.0", + "@vitest/eslint-plugin": "^1.1.10", "eslint-config-prettier": "^9.1.0", "eslint-config-xo": "^0.46.0", "eslint-config-xo-react": "^0.27.0", diff --git a/yarn.lock b/yarn.lock index be52bd5..7bdc56a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -925,6 +925,7 @@ __metadata: "@react-hookz/eslint-formatter-gha": "npm:^2.0.1" "@typescript-eslint/eslint-plugin": "npm:^8.15.0" "@typescript-eslint/parser": "npm:^8.15.0" + "@vitest/eslint-plugin": "npm:^1.1.10" eslint: "npm:^9.15.0" eslint-config-prettier: "npm:^9.1.0" eslint-config-xo: "npm:^0.46.0" @@ -1452,6 +1453,23 @@ __metadata: languageName: node linkType: hard +"@vitest/eslint-plugin@npm:^1.1.10": + version: 1.1.10 + resolution: "@vitest/eslint-plugin@npm:1.1.10" + peerDependencies: + "@typescript-eslint/utils": ">= 8.0" + eslint: ">= 8.57.0" + typescript: ">= 5.0.0" + vitest: "*" + peerDependenciesMeta: + typescript: + optional: true + vitest: + optional: true + checksum: 10c0/f69be2a1067976e452225ff8e2189dbfc9ebd6717be8013260372e8b724775d58849afd9e1a85449ba8f454ef0f69c8a200743b413fbe0e357b984c18e79bd5f + languageName: node + linkType: hard + "JSONStream@npm:^1.3.5": version: 1.3.5 resolution: "JSONStream@npm:1.3.5"