Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit ab19ea8

Browse files
committed
Activate eslint reportUnusedDisableDirectives
1 parent ec647b2 commit ab19ea8

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = defineConfig({
1414
es6: true,
1515
node: true,
1616
},
17+
reportUnusedDisableDirectives: true,
1718
extends: [
1819
'eslint:recommended',
1920
'plugin:@typescript-eslint/recommended',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"clean": "rimraf .eslintcache dist pnpm-lock.yaml node_modules",
99
"check": "tsc",
1010
"format": "prettier --cache --write .",
11-
"lint": "eslint --cache --cache-strategy content .",
11+
"lint": "eslint --cache --cache-strategy content --report-unused-disable-directives .",
1212
"typecheck": "vitest typecheck",
1313
"test": "vitest",
1414
"coverage": "vitest run --coverage",

scripts/generate-rule-files/src/plugins-map.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,9 @@ export async function loadPlugin(plugin: Plugin): Promise<Plugin> {
109109
const rules: PluginRules =
110110
plugin.module === 'eslint'
111111
? Object.fromEntries(
112-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
112+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
113113
new mod.Linter().getRules().entries(),
114114
)
115-
: // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
116-
mod.rules ?? mod.default.rules;
115+
: mod.rules ?? mod.default.rules;
117116
return { ...plugin, rules };
118117
}

tests/generate-rule-files.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-unsafe-argument */
2-
31
import type { Rule } from 'eslint';
42
import { describe, expect, it } from 'vitest';
53
import { generateTypeFromSchema } from '../scripts/generate-rule-files/src/json-schema-to-ts';

0 commit comments

Comments
 (0)