diff --git a/.eslintrc.js b/.eslintrc.js index 2d897a4b..752adb99 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,6 +14,7 @@ module.exports = defineConfig({ es6: true, node: true, }, + reportUnusedDisableDirectives: true, extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', diff --git a/package.json b/package.json index 16b91a4c..897d3dfd 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "clean": "rimraf .eslintcache dist pnpm-lock.yaml node_modules", "check": "tsc", "format": "prettier --cache --write .", - "lint": "eslint --cache --cache-strategy content .", + "lint": "eslint --cache --cache-strategy content --report-unused-disable-directives .", "typecheck": "vitest typecheck", "test": "vitest", "coverage": "vitest run --coverage", diff --git a/scripts/generate-rule-files/src/plugins-map.ts b/scripts/generate-rule-files/src/plugins-map.ts index 1e556c22..4b9b84c0 100644 --- a/scripts/generate-rule-files/src/plugins-map.ts +++ b/scripts/generate-rule-files/src/plugins-map.ts @@ -109,10 +109,9 @@ export async function loadPlugin(plugin: Plugin): Promise { const rules: PluginRules = plugin.module === 'eslint' ? Object.fromEntries( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument new mod.Linter().getRules().entries(), ) - : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - mod.rules ?? mod.default.rules; + : mod.rules ?? mod.default.rules; return { ...plugin, rules }; } diff --git a/tests/generate-rule-files.test.ts b/tests/generate-rule-files.test.ts index 17fc4339..72f34e5f 100644 --- a/tests/generate-rule-files.test.ts +++ b/tests/generate-rule-files.test.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unsafe-argument */ - import type { Rule } from 'eslint'; import { describe, expect, it } from 'vitest'; import { generateTypeFromSchema } from '../scripts/generate-rule-files/src/json-schema-to-ts';