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

Commit 1190dba

Browse files
committed
Update eslint rules
1 parent 5583f69 commit 1190dba

File tree

3 files changed

+64
-2
lines changed

3 files changed

+64
-2
lines changed

src/rules/eslint/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ import type { NoTernaryRule } from './no-ternary';
195195
import type { NoThisBeforeSuperRule } from './no-this-before-super';
196196
import type { NoThrowLiteralRule } from './no-throw-literal';
197197
import type { NoTrailingSpacesRule } from './no-trailing-spaces';
198+
import type { NoUndefRule } from './no-undef';
198199
import type { NoUndefInitRule } from './no-undef-init';
199200
import type { NoUndefinedRule } from './no-undefined';
200201
import type { NoUnderscoreDangleRule } from './no-underscore-dangle';
@@ -486,6 +487,7 @@ export type EslintRules = AccessorPairsRule &
486487
NoThisBeforeSuperRule &
487488
NoThrowLiteralRule &
488489
NoTrailingSpacesRule &
490+
NoUndefRule &
489491
NoUndefInitRule &
490492
NoUndefinedRule &
491493
NoUnderscoreDangleRule &

src/rules/eslint/max-len.d.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,38 @@ export interface MaxLenSetting {
1919
/**
2020
* Config.
2121
*/
22-
export type MaxLenConfig = MaxLenSetting | number;
22+
export type MaxLenConfig =
23+
| {
24+
code?: number;
25+
comments?: number;
26+
tabWidth?: number;
27+
ignorePattern?: string;
28+
ignoreComments?: boolean;
29+
ignoreStrings?: boolean;
30+
ignoreUrls?: boolean;
31+
ignoreTemplateLiterals?: boolean;
32+
ignoreRegExpLiterals?: boolean;
33+
ignoreTrailingComments?: boolean;
34+
}
35+
| number;
2336

2437
/**
2538
* Option.
2639
*/
27-
export type MaxLenOption = MaxLenSetting | number;
40+
export type MaxLenOption =
41+
| {
42+
code?: number;
43+
comments?: number;
44+
tabWidth?: number;
45+
ignorePattern?: string;
46+
ignoreComments?: boolean;
47+
ignoreStrings?: boolean;
48+
ignoreUrls?: boolean;
49+
ignoreTemplateLiterals?: boolean;
50+
ignoreRegExpLiterals?: boolean;
51+
ignoreTrailingComments?: boolean;
52+
}
53+
| number;
2854

2955
/**
3056
* Options.

src/rules/eslint/no-undef.d.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Option.
5+
*/
6+
export interface NoUndefOption {
7+
typeof?: boolean;
8+
}
9+
10+
/**
11+
* Options.
12+
*/
13+
export type NoUndefOptions = [NoUndefOption?];
14+
15+
/**
16+
* Disallow the use of undeclared variables unless mentioned in `/*global ` comments.
17+
*
18+
* @see [no-undef](https://eslint.org/docs/rules/no-undef)
19+
*/
20+
export type NoUndefRuleConfig = RuleConfig<NoUndefOptions>;
21+
22+
/**
23+
* Disallow the use of undeclared variables unless mentioned in `/*global ` comments.
24+
*
25+
* @see [no-undef](https://eslint.org/docs/rules/no-undef)
26+
*/
27+
export interface NoUndefRule {
28+
/**
29+
* Disallow the use of undeclared variables unless mentioned in `/*global ` comments.
30+
*
31+
* @see [no-undef](https://eslint.org/docs/rules/no-undef)
32+
*/
33+
'no-undef': NoUndefRuleConfig;
34+
}

0 commit comments

Comments
 (0)