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

Commit 0a35618

Browse files
committed
Add rule id-denylist
1 parent d426963 commit 0a35618

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ module.exports = defineConfig({
9292
'browserify',
9393
'cjs',
9494
'commonjs',
95+
'denylist',
9596
'dom',
9697
'ecma',
9798
'embertest',

src/rules/eslint/id-denylist.d.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Disallow specified identifiers.
5+
*
6+
* @see [id-denylist](https://eslint.org/docs/rules/id-denylist)
7+
*/
8+
export type IdDenylistRuleConfig = RuleConfig<string[]>;
9+
10+
/**
11+
* Disallow specified identifiers.
12+
*
13+
* @see [id-denylist](https://eslint.org/docs/rules/id-denylist)
14+
*/
15+
export interface IdDenylistRule {
16+
/**
17+
* Disallow specified identifiers.
18+
*
19+
* @see [id-denylist](https://eslint.org/docs/rules/id-denylist)
20+
*/
21+
'id-denylist': IdDenylistRuleConfig;
22+
/**
23+
* @deprecated Use `id-denylist` instead.
24+
*/
25+
'id-blacklist'?: IdDenylistRuleConfig;
26+
}

src/rules/eslint/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { CommaDangleRule } from './comma-dangle';
22
import type { CurlyRule } from './curly';
33
import type { GroupedAccessorPairsRule } from './grouped-accessor-pairs';
4+
import type { IdDenylistRule } from './id-denylist';
45
import type { LinebreakStyleRule } from './linebreak-style';
56
import type { MaxClassesPerFileRule } from './max-classes-per-file';
67
import type { MaxLenRule } from './max-len';
@@ -21,6 +22,7 @@ import type { SemiRule } from './semi';
2122
export type EslintRules = CommaDangleRule &
2223
CurlyRule &
2324
GroupedAccessorPairsRule &
25+
IdDenylistRule &
2426
LinebreakStyleRule &
2527
MaxClassesPerFileRule &
2628
MaxLenRule &

0 commit comments

Comments
 (0)