This repository was archived by the owner on Mar 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +100
-1
lines changed Expand file tree Collapse file tree 4 files changed +100
-1
lines changed Original file line number Diff line number Diff line change
1
+ import type { RuleConfig } from '../rule-config' ;
2
+
3
+ /**
4
+ * Option.
5
+ */
6
+ export type DotNotationOption = {
7
+ /**
8
+ * Set to `false` to follow ECMAScript version 3 compatible style, avoiding dot notation for reserved word properties.
9
+ *
10
+ * @default true
11
+ *
12
+ * @see [allowKeywords](https://eslint.org/docs/rules/dot-notation#allowkeywords)
13
+ */
14
+ allowKeywords ?: boolean ;
15
+ /**
16
+ * Set to a regular expression string to allow bracket notation for property names that match a pattern.
17
+ *
18
+ * @default false
19
+ *
20
+ * @see [allowPattern](https://eslint.org/docs/rules/dot-notation#allowpattern)
21
+ */
22
+ allowPattern ?: boolean ;
23
+ } ;
24
+
25
+ /**
26
+ * Options.
27
+ */
28
+ export type DotNotationOptions = [ DotNotationOption ?] ;
29
+
30
+ /**
31
+ * Require Dot Notation.
32
+ *
33
+ * @see [dot-notation](https://eslint.org/docs/rules/dot-notation)
34
+ */
35
+ export type DotNotationRuleConfig = RuleConfig < DotNotationOptions > ;
36
+
37
+ /**
38
+ * Require Dot Notation.
39
+ *
40
+ * @see [dot-notation](https://eslint.org/docs/rules/dot-notation)
41
+ */
42
+ export interface DotNotationRule {
43
+ /**
44
+ * Require Dot Notation.
45
+ *
46
+ * @see [dot-notation](https://eslint.org/docs/rules/dot-notation)
47
+ */
48
+ 'dot-notation' : DotNotationRuleConfig ;
49
+ }
Original file line number Diff line number Diff line change 1
1
import type { CommaDangleRule } from './comma-dangle' ;
2
2
import type { CurlyRule } from './curly' ;
3
+ import type { DotNotationRule } from './dot-notation' ;
3
4
import type { GroupedAccessorPairsRule } from './grouped-accessor-pairs' ;
4
5
import type { IdDenylistRule } from './id-denylist' ;
5
6
import type { IndentRule } from './indent' ;
@@ -22,6 +23,7 @@ import type { SemiRule } from './semi';
22
23
*/
23
24
export type EslintRules = CommaDangleRule &
24
25
CurlyRule &
26
+ DotNotationRule &
25
27
GroupedAccessorPairsRule &
26
28
IdDenylistRule &
27
29
IndentRule &
Original file line number Diff line number Diff line change
1
+ import { DotNotationOption as BaseDotNotationOption } from '../eslint/dot-notation' ;
2
+ import type { RuleConfig } from '../rule-config' ;
3
+
4
+ /**
5
+ * Option.
6
+ */
7
+ export type DotNotationOption = BaseDotNotationOption & {
8
+ /**
9
+ * @default false
10
+ *
11
+ * @see [allowPrivateClassPropertyAccess](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md#allowprivateclasspropertyaccess)
12
+ */
13
+ allowPrivateClassPropertyAccess ?: boolean ;
14
+ /**
15
+ * @default false
16
+ *
17
+ * @see [allowProtectedClassPropertyAccess](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md#allowprotectedclasspropertyaccess)
18
+ */
19
+ allowProtectedClassPropertyAccess ?: boolean ;
20
+ } ;
21
+
22
+ /**
23
+ * Options.
24
+ */
25
+ export type DotNotationOptions = [ DotNotationOption ?] ;
26
+
27
+ /**
28
+ * Enforce dot notation whenever possible.
29
+ *
30
+ * @see [dot-notation](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md)
31
+ */
32
+ export type DotNotationRuleConfig = RuleConfig < DotNotationOptions > ;
33
+
34
+ /**
35
+ * Enforce dot notation whenever possible.
36
+ *
37
+ * @see [dot-notation](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md)
38
+ */
39
+ export interface DotNotationRule {
40
+ /**
41
+ * Enforce dot notation whenever possible.
42
+ *
43
+ * @see [dot-notation](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md)
44
+ */
45
+ '@typescript-eslint/dot-notation' : DotNotationRuleConfig ;
46
+ }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { BanTsCommentRule } from './ban-ts-comment';
5
5
import type { BanTypesRule } from './ban-types' ;
6
6
import type { ConsistentTypeAssertionsRule } from './consistent-type-assertions' ;
7
7
import type { ConsistentTypeDefinitionsRule } from './consistent-type-definitions' ;
8
+ import type { DotNotationRule } from './dot-notation' ;
8
9
import type { ExplicitFunctionReturnTypeRule } from './explicit-function-return-type' ;
9
10
import type { IndentRule } from './indent' ;
10
11
import type { InterfaceNamePrefixRule } from './interface-name-prefix' ;
@@ -30,9 +31,10 @@ export type TypeScriptEslintRules = AdjacentOverloadSignaturesRule &
30
31
BanTsCommentRule &
31
32
BanTypesRule &
32
33
ConsistentTypeAssertionsRule &
34
+ ConsistentTypeDefinitionsRule &
35
+ DotNotationRule &
33
36
ExplicitFunctionReturnTypeRule &
34
37
IndentRule &
35
- ConsistentTypeDefinitionsRule &
36
38
InterfaceNamePrefixRule &
37
39
MemberOrderingRule &
38
40
NoExplicitAnyRule &
You can’t perform that action at this time.
0 commit comments