@perfective/eslint-config 0.29.2 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.adoc +24 -18
- package/README.md +20 -16
- package/config/node.d.ts +7 -0
- package/config/node.js +7 -11
- package/config/plugin.d.ts +9 -0
- package/config/plugin.js +22 -26
- package/config.js +1 -6
- package/cypress.d.ts +5 -0
- package/cypress.js +31 -56
- package/index.d.ts +46 -12
- package/index.js +100 -144
- package/jest-dom.js +8 -11
- package/jest.d.ts +6 -0
- package/jest.js +29 -24
- package/package.json +18 -17
- package/rules/array-func/index.d.ts +1 -2
- package/rules/array-func/index.js +14 -50
- package/rules/cypress/index.d.ts +11 -3
- package/rules/cypress/index.js +23 -57
- package/rules/eslint/index.js +6 -9
- package/rules/eslint/layout-formatting.js +64 -67
- package/rules/eslint/possible-problems.js +96 -99
- package/rules/eslint/suggestions.js +181 -182
- package/rules/eslint-comments/best-practices.js +8 -11
- package/rules/eslint-comments/index.d.ts +1 -2
- package/rules/eslint-comments/index.js +9 -45
- package/rules/eslint-comments/stylistic-issues.js +9 -18
- package/rules/import/helpful-warnings.js +11 -14
- package/rules/import/index.js +11 -14
- package/rules/import/module-systems.js +10 -13
- package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
- package/rules/import/rules/no-extraneous-dependencies.js +20 -21
- package/rules/import/static-analysis.js +26 -29
- package/rules/import/style-guide.js +33 -36
- package/rules/jest/index.js +98 -72
- package/rules/jest/typescript-eslint.js +5 -8
- package/rules/jest-dom/index.js +19 -55
- package/rules/jsdoc/index.d.ts +1 -1
- package/rules/jsdoc/index.js +158 -344
- package/rules/n/index.d.ts +1 -1
- package/rules/n/index.js +64 -98
- package/rules/prefer-arrow/index.d.ts +1 -2
- package/rules/prefer-arrow/index.js +14 -50
- package/rules/promise/index.d.ts +1 -2
- package/rules/promise/index.js +35 -73
- package/rules/rxjs/index.d.ts +1 -1
- package/rules/rxjs/index.js +60 -96
- package/rules/security/index.d.ts +1 -2
- package/rules/security/index.js +22 -58
- package/rules/simple-import-sort/index.js +12 -48
- package/rules/simple-import-sort/rules/imports.d.ts +11 -0
- package/rules/simple-import-sort/rules/imports.js +18 -32
- package/rules/stylistic/js/index.d.ts +9 -2
- package/rules/stylistic/js/index.js +198 -236
- package/rules/stylistic/jsx/index.d.ts +8 -2
- package/rules/stylistic/jsx/index.js +81 -117
- package/rules/stylistic/plus/index.d.ts +6 -2
- package/rules/stylistic/plus/index.js +14 -50
- package/rules/stylistic/ts/index.d.ts +8 -2
- package/rules/stylistic/ts/index.js +135 -169
- package/rules/testing-library/index.js +41 -77
- package/rules/typescript-eslint/extension-rules.js +113 -116
- package/rules/typescript-eslint/index.d.ts +2 -0
- package/rules/typescript-eslint/index.js +9 -45
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
- package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
- package/rules/typescript-eslint/supported-rules.d.ts +2 -0
- package/rules/typescript-eslint/supported-rules.js +256 -319
- package/rules/unicorn/index.d.ts +7 -2
- package/rules/unicorn/index.js +178 -209
- package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
- package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
- package/rules.js +4 -14
- package/rxjs.d.ts +5 -0
- package/rxjs.js +21 -57
- package/testing-library.js +8 -11
|
@@ -1,77 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
rules: {
|
|
43
|
-
'testing-library/await-async-events': 'off',
|
|
44
|
-
'testing-library/await-async-queries': 'error',
|
|
45
|
-
'testing-library/await-async-utils': 'error',
|
|
46
|
-
'testing-library/consistent-data-testid': ['error', {
|
|
47
|
-
testIdPattern: '^[a-z0-9]+(-[a-z0-9]+)*$',
|
|
48
|
-
testIdAttribute: 'data-testId',
|
|
49
|
-
}],
|
|
50
|
-
'testing-library/no-await-sync-events': 'error',
|
|
51
|
-
'testing-library/no-await-sync-queries': 'error',
|
|
52
|
-
'testing-library/no-container': 'error',
|
|
53
|
-
'testing-library/no-debugging-utils': 'error',
|
|
54
|
-
'testing-library/no-dom-import': 'warn',
|
|
55
|
-
'testing-library/no-global-regexp-flag-in-query': 'warn',
|
|
56
|
-
'testing-library/no-manual-cleanup': 'error',
|
|
57
|
-
'testing-library/no-node-access': 'error',
|
|
58
|
-
'testing-library/no-promise-in-fire-event': 'error',
|
|
59
|
-
'testing-library/no-render-in-lifecycle': 'error',
|
|
60
|
-
'testing-library/no-unnecessary-act': 'off',
|
|
61
|
-
'testing-library/no-wait-for-multiple-assertions': 'error',
|
|
62
|
-
'testing-library/no-wait-for-side-effects': 'error',
|
|
63
|
-
'testing-library/no-wait-for-snapshot': 'error',
|
|
64
|
-
'testing-library/prefer-explicit-assert': 'off',
|
|
65
|
-
'testing-library/prefer-find-by': 'warn',
|
|
66
|
-
'testing-library/prefer-implicit-assert': 'error',
|
|
67
|
-
'testing-library/prefer-presence-queries': ['error', {
|
|
68
|
-
presence: true,
|
|
69
|
-
absence: true,
|
|
70
|
-
}],
|
|
71
|
-
'testing-library/prefer-query-by-disappearance': 'error',
|
|
72
|
-
'testing-library/prefer-query-matchers': 'off',
|
|
73
|
-
'testing-library/prefer-screen-queries': 'error',
|
|
74
|
-
'testing-library/prefer-user-event': 'error',
|
|
75
|
-
'testing-library/render-result-naming-convention': 'error',
|
|
76
|
-
},
|
|
77
|
-
};
|
|
1
|
+
import eslintPluginTestingLibrary from 'eslint-plugin-testing-library';
|
|
2
|
+
export const testingLibraryConfig = {
|
|
3
|
+
plugins: {
|
|
4
|
+
'testing-library': eslintPluginTestingLibrary
|
|
5
|
+
},
|
|
6
|
+
rules: {
|
|
7
|
+
'testing-library/await-async-events': 'off',
|
|
8
|
+
'testing-library/await-async-queries': 'error',
|
|
9
|
+
'testing-library/await-async-utils': 'error',
|
|
10
|
+
'testing-library/consistent-data-testid': ['error', {
|
|
11
|
+
testIdPattern: '^[a-z0-9]+(-[a-z0-9]+)*$',
|
|
12
|
+
testIdAttribute: 'data-testId'
|
|
13
|
+
}],
|
|
14
|
+
'testing-library/no-await-sync-events': 'error',
|
|
15
|
+
'testing-library/no-await-sync-queries': 'error',
|
|
16
|
+
'testing-library/no-container': 'error',
|
|
17
|
+
'testing-library/no-debugging-utils': 'error',
|
|
18
|
+
'testing-library/no-dom-import': 'warn',
|
|
19
|
+
'testing-library/no-global-regexp-flag-in-query': 'warn',
|
|
20
|
+
'testing-library/no-manual-cleanup': 'error',
|
|
21
|
+
'testing-library/no-node-access': 'error',
|
|
22
|
+
'testing-library/no-promise-in-fire-event': 'error',
|
|
23
|
+
'testing-library/no-render-in-lifecycle': 'error',
|
|
24
|
+
'testing-library/no-unnecessary-act': 'off',
|
|
25
|
+
'testing-library/no-wait-for-multiple-assertions': 'error',
|
|
26
|
+
'testing-library/no-wait-for-side-effects': 'error',
|
|
27
|
+
'testing-library/no-wait-for-snapshot': 'error',
|
|
28
|
+
'testing-library/prefer-explicit-assert': 'off',
|
|
29
|
+
'testing-library/prefer-find-by': 'warn',
|
|
30
|
+
'testing-library/prefer-implicit-assert': 'error',
|
|
31
|
+
'testing-library/prefer-presence-queries': ['error', {
|
|
32
|
+
presence: true,
|
|
33
|
+
absence: true
|
|
34
|
+
}],
|
|
35
|
+
'testing-library/prefer-query-by-disappearance': 'error',
|
|
36
|
+
'testing-library/prefer-query-matchers': 'off',
|
|
37
|
+
'testing-library/prefer-screen-queries': 'error',
|
|
38
|
+
'testing-library/prefer-user-event': 'error',
|
|
39
|
+
'testing-library/render-result-naming-convention': 'error'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
@@ -1,116 +1,113 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
'space-infix-ops': 'off',
|
|
115
|
-
'@typescript-eslint/space-infix-ops': 'off',
|
|
116
|
-
};
|
|
1
|
+
export const extensionRules = {
|
|
2
|
+
'block-spacing': 'off',
|
|
3
|
+
'@typescript-eslint/block-spacing': 'off',
|
|
4
|
+
'brace-style': 'off',
|
|
5
|
+
'@typescript-eslint/brace-style': 'off',
|
|
6
|
+
'class-methods-use-this': 'off',
|
|
7
|
+
'@typescript-eslint/class-methods-use-this': 'off',
|
|
8
|
+
'comma-dangle': 'off',
|
|
9
|
+
'@typescript-eslint/comma-dangle': 'off',
|
|
10
|
+
'comma-spacing': 'off',
|
|
11
|
+
'@typescript-eslint/comma-spacing': 'off',
|
|
12
|
+
'consistent-return': 'off',
|
|
13
|
+
'@typescript-eslint/consistent-return': 'error',
|
|
14
|
+
'default-param-last': 'off',
|
|
15
|
+
'@typescript-eslint/default-param-last': 'error',
|
|
16
|
+
'dot-notation': 'off',
|
|
17
|
+
'@typescript-eslint/dot-notation': ['warn', {
|
|
18
|
+
allowKeywords: true,
|
|
19
|
+
allowPrivateClassPropertyAccess: false,
|
|
20
|
+
allowProtectedClassPropertyAccess: false
|
|
21
|
+
}],
|
|
22
|
+
'func-call-spacing': 'off',
|
|
23
|
+
'@typescript-eslint/func-call-spacing': 'off',
|
|
24
|
+
'indent': 'off',
|
|
25
|
+
'@typescript-eslint/indent': 'off',
|
|
26
|
+
'init-declarations': 'off',
|
|
27
|
+
'@typescript-eslint/init-declarations': ['error', 'always'],
|
|
28
|
+
'key-spacing': 'off',
|
|
29
|
+
'@typescript-eslint/key-spacing': 'off',
|
|
30
|
+
'keyword-spacing': 'off',
|
|
31
|
+
'@typescript-eslint/keyword-spacing': 'off',
|
|
32
|
+
'lines-around-comment': 'off',
|
|
33
|
+
'@typescript-eslint/lines-around-comment': 'off',
|
|
34
|
+
'lines-between-class-members': 'off',
|
|
35
|
+
'@typescript-eslint/lines-between-class-members': 'off',
|
|
36
|
+
'no-array-constructor': 'off',
|
|
37
|
+
'@typescript-eslint/no-array-constructor': 'warn',
|
|
38
|
+
'no-dupe-class-members': 'off',
|
|
39
|
+
'@typescript-eslint/no-dupe-class-members': 'error',
|
|
40
|
+
'no-empty-function': 'off',
|
|
41
|
+
'@typescript-eslint/no-empty-function': ['error', {
|
|
42
|
+
allow: ['protected-constructors', 'private-constructors']
|
|
43
|
+
}],
|
|
44
|
+
'no-extra-parens': 'off',
|
|
45
|
+
'@typescript-eslint/no-extra-parens': 'off',
|
|
46
|
+
'no-extra-semi': 'off',
|
|
47
|
+
'@typescript-eslint/no-extra-semi': 'off',
|
|
48
|
+
'no-implied-eval': 'off',
|
|
49
|
+
'@typescript-eslint/no-implied-eval': 'error',
|
|
50
|
+
'no-invalid-this': 'off',
|
|
51
|
+
'@typescript-eslint/no-invalid-this': 'error',
|
|
52
|
+
'no-loop-func': 'off',
|
|
53
|
+
'@typescript-eslint/no-loop-func': 'error',
|
|
54
|
+
'@typescript-eslint/no-loss-of-precision': 'off',
|
|
55
|
+
'no-magic-numbers': 'off',
|
|
56
|
+
'@typescript-eslint/no-magic-numbers': 'off',
|
|
57
|
+
'no-redeclare': 'off',
|
|
58
|
+
'@typescript-eslint/no-redeclare': 'error',
|
|
59
|
+
'no-restricted-imports': 'off',
|
|
60
|
+
'@typescript-eslint/no-restricted-imports': ['error', {}],
|
|
61
|
+
'no-shadow': 'off',
|
|
62
|
+
'@typescript-eslint/no-shadow': 'off',
|
|
63
|
+
'no-throw-literal': 'off',
|
|
64
|
+
'@typescript-eslint/only-throw-error': ['error', {
|
|
65
|
+
allowThrowingAny: false,
|
|
66
|
+
allowThrowingUnknown: false
|
|
67
|
+
}],
|
|
68
|
+
'no-unused-expressions': 'off',
|
|
69
|
+
'@typescript-eslint/no-unused-expressions': 'error',
|
|
70
|
+
'no-unused-vars': 'off',
|
|
71
|
+
'@typescript-eslint/no-unused-vars': ['error', {
|
|
72
|
+
args: 'after-used',
|
|
73
|
+
argsIgnorePattern: '^_',
|
|
74
|
+
caughtErrors: 'all',
|
|
75
|
+
destructuredArrayIgnorePattern: '^_',
|
|
76
|
+
ignoreRestSiblings: false,
|
|
77
|
+
vars: 'all'
|
|
78
|
+
}],
|
|
79
|
+
'no-use-before-define': 'off',
|
|
80
|
+
'@typescript-eslint/no-use-before-define': ['error', {
|
|
81
|
+
functions: false,
|
|
82
|
+
classes: false,
|
|
83
|
+
variables: false,
|
|
84
|
+
allowNamedExports: false,
|
|
85
|
+
enums: false,
|
|
86
|
+
typedefs: false,
|
|
87
|
+
ignoreTypeReferences: false
|
|
88
|
+
}],
|
|
89
|
+
'no-useless-constructor': 'off',
|
|
90
|
+
'@typescript-eslint/no-useless-constructor': 'error',
|
|
91
|
+
'object-curly-spacing': 'off',
|
|
92
|
+
'@typescript-eslint/object-curly-spacing': 'off',
|
|
93
|
+
'padding-line-between-statements': 'off',
|
|
94
|
+
'@typescript-eslint/padding-line-between-statements': 'off',
|
|
95
|
+
'prefer-destructuring': 'off',
|
|
96
|
+
'@typescript-eslint/prefer-destructuring': 'off',
|
|
97
|
+
'prefer-promise-reject-errors': 'off',
|
|
98
|
+
'@typescript-eslint/prefer-promise-reject-errors': 'error',
|
|
99
|
+
'quotes': 'off',
|
|
100
|
+
'@typescript-eslint/quotes': 'off',
|
|
101
|
+
'require-await': 'off',
|
|
102
|
+
'@typescript-eslint/require-await': 'error',
|
|
103
|
+
'no-return-await': 'off',
|
|
104
|
+
'@typescript-eslint/return-await': ['warn', 'error-handling-correctness-only'],
|
|
105
|
+
'semi': 'off',
|
|
106
|
+
'@typescript-eslint/semi': 'off',
|
|
107
|
+
'space-before-blocks': 'off',
|
|
108
|
+
'@typescript-eslint/space-before-blocks': 'off',
|
|
109
|
+
'space-before-function-paren': 'off',
|
|
110
|
+
'@typescript-eslint/space-before-function-paren': 'off',
|
|
111
|
+
'space-infix-ops': 'off',
|
|
112
|
+
'@typescript-eslint/space-infix-ops': 'off'
|
|
113
|
+
};
|
|
@@ -128,6 +128,7 @@ export declare const typescriptEslintConfig: {
|
|
|
128
128
|
'@typescript-eslint/consistent-indexed-object-style': string[];
|
|
129
129
|
'@typescript-eslint/consistent-type-assertions': (string | {
|
|
130
130
|
assertionStyle: string;
|
|
131
|
+
arrayLiteralTypeAssertions: string;
|
|
131
132
|
objectLiteralTypeAssertions: string;
|
|
132
133
|
})[];
|
|
133
134
|
'@typescript-eslint/consistent-type-definitions': string[];
|
|
@@ -209,6 +210,7 @@ export declare const typescriptEslintConfig: {
|
|
|
209
210
|
checksConditionals: boolean;
|
|
210
211
|
checksVoidReturn: boolean;
|
|
211
212
|
})[];
|
|
213
|
+
'@typescript-eslint/no-misused-spread': string;
|
|
212
214
|
'@typescript-eslint/no-mixed-enums': string;
|
|
213
215
|
'@typescript-eslint/no-namespace': string;
|
|
214
216
|
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': string;
|
|
@@ -1,45 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.typescriptEslintConfig = void 0;
|
|
37
|
-
const tsEslint = __importStar(require("typescript-eslint"));
|
|
38
|
-
const extension_rules_1 = require("./extension-rules");
|
|
39
|
-
const supported_rules_1 = require("./supported-rules");
|
|
40
|
-
exports.typescriptEslintConfig = {
|
|
41
|
-
plugins: {
|
|
42
|
-
'@typescript-eslint': tsEslint.plugin,
|
|
43
|
-
},
|
|
44
|
-
rules: Object.assign(Object.assign({}, supported_rules_1.supportedRules), extension_rules_1.extensionRules),
|
|
45
|
-
};
|
|
1
|
+
import { plugin } from 'typescript-eslint';
|
|
2
|
+
import { extensionRules } from "./extension-rules.js";
|
|
3
|
+
import { supportedRules } from "./supported-rules.js";
|
|
4
|
+
export const typescriptEslintConfig = {
|
|
5
|
+
plugins: {
|
|
6
|
+
'@typescript-eslint': plugin
|
|
7
|
+
},
|
|
8
|
+
rules: Object.assign(Object.assign({}, supportedRules), extensionRules)
|
|
9
|
+
};
|
|
@@ -16,4 +16,9 @@ export interface TypescriptEslintNamingConvention {
|
|
|
16
16
|
match: boolean;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Provides configuration and extensions for the @typescript-eslint/naming-convention.
|
|
21
|
+
*
|
|
22
|
+
* @see https://typescript-eslint.io/rules/naming-convention/
|
|
23
|
+
*/
|
|
19
24
|
export declare function typescriptEslintNamingConvention(extensions?: TypescriptEslintNamingConvention[]): TypescriptEslintNamingConvention[];
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.typescriptEslintNamingConvention = typescriptEslintNamingConvention;
|
|
4
|
-
function typescriptEslintNamingConvention(extensions = []) {
|
|
5
|
-
return typescriptEslintNamingConventionDefaults()
|
|
6
|
-
.concat(extensions);
|
|
1
|
+
export function typescriptEslintNamingConvention(extensions = []) {
|
|
2
|
+
return typescriptEslintNamingConventionDefaults().concat(extensions);
|
|
7
3
|
}
|
|
8
4
|
function typescriptEslintNamingConventionDefaults() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
];
|
|
32
|
-
}
|
|
5
|
+
return [{
|
|
6
|
+
selector: ['enumMember', 'typeLike'],
|
|
7
|
+
format: ['StrictPascalCase']
|
|
8
|
+
}, {
|
|
9
|
+
selector: ['memberLike', 'variableLike'],
|
|
10
|
+
format: ['strictCamelCase']
|
|
11
|
+
}, {
|
|
12
|
+
selector: ['objectLiteralProperty'],
|
|
13
|
+
modifiers: ['requiresQuotes'],
|
|
14
|
+
format: null
|
|
15
|
+
}, {
|
|
16
|
+
selector: ['parameter'],
|
|
17
|
+
modifiers: ['unused'],
|
|
18
|
+
format: ['strictCamelCase'],
|
|
19
|
+
leadingUnderscore: 'allow'
|
|
20
|
+
}, {
|
|
21
|
+
selector: ['classProperty'],
|
|
22
|
+
modifiers: ['private'],
|
|
23
|
+
format: ['strictCamelCase'],
|
|
24
|
+
leadingUnderscore: 'allow'
|
|
25
|
+
}];
|
|
26
|
+
}
|
|
@@ -13,6 +13,7 @@ export declare const supportedRules: {
|
|
|
13
13
|
'@typescript-eslint/consistent-indexed-object-style': string[];
|
|
14
14
|
'@typescript-eslint/consistent-type-assertions': (string | {
|
|
15
15
|
assertionStyle: string;
|
|
16
|
+
arrayLiteralTypeAssertions: string;
|
|
16
17
|
objectLiteralTypeAssertions: string;
|
|
17
18
|
})[];
|
|
18
19
|
'@typescript-eslint/consistent-type-definitions': string[];
|
|
@@ -94,6 +95,7 @@ export declare const supportedRules: {
|
|
|
94
95
|
checksConditionals: boolean;
|
|
95
96
|
checksVoidReturn: boolean;
|
|
96
97
|
})[];
|
|
98
|
+
'@typescript-eslint/no-misused-spread': string;
|
|
97
99
|
'@typescript-eslint/no-mixed-enums': string;
|
|
98
100
|
'@typescript-eslint/no-namespace': string;
|
|
99
101
|
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': string;
|