@perfective/eslint-config 0.29.1 → 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.
Files changed (77) hide show
  1. package/LICENSE +1 -1
  2. package/README.adoc +24 -19
  3. package/README.md +20 -17
  4. package/config/node.d.ts +7 -0
  5. package/config/node.js +7 -11
  6. package/config/plugin.d.ts +9 -0
  7. package/config/plugin.js +22 -26
  8. package/config.js +1 -6
  9. package/cypress.d.ts +5 -0
  10. package/cypress.js +31 -58
  11. package/index.d.ts +58 -26
  12. package/index.js +100 -145
  13. package/jest-dom.js +8 -11
  14. package/jest.d.ts +6 -0
  15. package/jest.js +29 -24
  16. package/package.json +18 -18
  17. package/rules/array-func/index.d.ts +1 -2
  18. package/rules/array-func/index.js +14 -50
  19. package/rules/cypress/index.d.ts +11 -3
  20. package/rules/cypress/index.js +23 -57
  21. package/rules/eslint/index.js +6 -9
  22. package/rules/eslint/layout-formatting.js +64 -67
  23. package/rules/eslint/possible-problems.js +96 -99
  24. package/rules/eslint/suggestions.js +181 -182
  25. package/rules/eslint-comments/best-practices.js +8 -11
  26. package/rules/eslint-comments/index.d.ts +1 -2
  27. package/rules/eslint-comments/index.js +9 -45
  28. package/rules/eslint-comments/stylistic-issues.js +9 -18
  29. package/rules/import/helpful-warnings.js +11 -14
  30. package/rules/import/index.js +11 -14
  31. package/rules/import/module-systems.js +10 -13
  32. package/rules/import/rules/no-extraneous-dependencies.d.ts +3 -0
  33. package/rules/import/rules/no-extraneous-dependencies.js +20 -21
  34. package/rules/import/static-analysis.js +26 -29
  35. package/rules/import/style-guide.js +33 -36
  36. package/rules/jest/index.js +98 -72
  37. package/rules/jest/typescript-eslint.js +5 -8
  38. package/rules/jest-dom/index.js +19 -55
  39. package/rules/jsdoc/index.d.ts +1 -1
  40. package/rules/jsdoc/index.js +158 -344
  41. package/rules/n/index.d.ts +1 -1
  42. package/rules/n/index.js +64 -98
  43. package/rules/prefer-arrow/index.d.ts +1 -2
  44. package/rules/prefer-arrow/index.js +14 -50
  45. package/rules/promise/index.d.ts +1 -2
  46. package/rules/promise/index.js +35 -73
  47. package/rules/rxjs/index.d.ts +1 -1
  48. package/rules/rxjs/index.js +60 -96
  49. package/rules/security/index.d.ts +1 -2
  50. package/rules/security/index.js +22 -58
  51. package/rules/simple-import-sort/index.js +12 -48
  52. package/rules/simple-import-sort/rules/imports.d.ts +11 -0
  53. package/rules/simple-import-sort/rules/imports.js +18 -32
  54. package/rules/stylistic/js/index.d.ts +9 -2
  55. package/rules/stylistic/js/index.js +198 -236
  56. package/rules/stylistic/jsx/index.d.ts +8 -2
  57. package/rules/stylistic/jsx/index.js +81 -117
  58. package/rules/stylistic/plus/index.d.ts +6 -2
  59. package/rules/stylistic/plus/index.js +14 -50
  60. package/rules/stylistic/ts/index.d.ts +8 -2
  61. package/rules/stylistic/ts/index.js +135 -169
  62. package/rules/testing-library/index.js +41 -77
  63. package/rules/typescript-eslint/extension-rules.js +113 -116
  64. package/rules/typescript-eslint/index.d.ts +2 -0
  65. package/rules/typescript-eslint/index.js +9 -45
  66. package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +5 -0
  67. package/rules/typescript-eslint/rules/typescript-eslint-naming-convention.js +24 -30
  68. package/rules/typescript-eslint/supported-rules.d.ts +2 -0
  69. package/rules/typescript-eslint/supported-rules.js +256 -319
  70. package/rules/unicorn/index.d.ts +7 -2
  71. package/rules/unicorn/index.js +178 -209
  72. package/rules/unicorn/rules/prevent-abbreviations.d.ts +8 -0
  73. package/rules/unicorn/rules/prevent-abbreviations.js +30 -8
  74. package/rules.js +4 -14
  75. package/rxjs.d.ts +5 -0
  76. package/rxjs.js +21 -57
  77. package/testing-library.js +8 -11
@@ -1,77 +1,41 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
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.testingLibraryConfig = void 0;
37
- const eslintPluginTestingLibrary = __importStar(require("eslint-plugin-testing-library"));
38
- exports.testingLibraryConfig = {
39
- plugins: {
40
- 'testing-library': eslintPluginTestingLibrary,
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extensionRules = void 0;
4
- exports.extensionRules = {
5
- 'block-spacing': 'off',
6
- '@typescript-eslint/block-spacing': 'off',
7
- 'brace-style': 'off',
8
- '@typescript-eslint/brace-style': 'off',
9
- 'class-methods-use-this': 'off',
10
- '@typescript-eslint/class-methods-use-this': 'off',
11
- 'comma-dangle': 'off',
12
- '@typescript-eslint/comma-dangle': 'off',
13
- 'comma-spacing': 'off',
14
- '@typescript-eslint/comma-spacing': 'off',
15
- 'consistent-return': 'off',
16
- '@typescript-eslint/consistent-return': 'error',
17
- 'default-param-last': 'off',
18
- '@typescript-eslint/default-param-last': 'error',
19
- 'dot-notation': 'off',
20
- '@typescript-eslint/dot-notation': ['warn', {
21
- allowKeywords: true,
22
- allowPrivateClassPropertyAccess: false,
23
- allowProtectedClassPropertyAccess: false,
24
- }],
25
- 'func-call-spacing': 'off',
26
- '@typescript-eslint/func-call-spacing': 'off',
27
- 'indent': 'off',
28
- '@typescript-eslint/indent': 'off',
29
- 'init-declarations': 'off',
30
- '@typescript-eslint/init-declarations': ['error', 'always'],
31
- 'key-spacing': 'off',
32
- '@typescript-eslint/key-spacing': 'off',
33
- 'keyword-spacing': 'off',
34
- '@typescript-eslint/keyword-spacing': 'off',
35
- 'lines-around-comment': 'off',
36
- '@typescript-eslint/lines-around-comment': 'off',
37
- 'lines-between-class-members': 'off',
38
- '@typescript-eslint/lines-between-class-members': 'off',
39
- 'no-array-constructor': 'off',
40
- '@typescript-eslint/no-array-constructor': 'warn',
41
- 'no-dupe-class-members': 'off',
42
- '@typescript-eslint/no-dupe-class-members': 'error',
43
- 'no-empty-function': 'off',
44
- '@typescript-eslint/no-empty-function': ['error', {
45
- allow: ['protected-constructors', 'private-constructors'],
46
- }],
47
- 'no-extra-parens': 'off',
48
- '@typescript-eslint/no-extra-parens': 'off',
49
- 'no-extra-semi': 'off',
50
- '@typescript-eslint/no-extra-semi': 'off',
51
- 'no-implied-eval': 'off',
52
- '@typescript-eslint/no-implied-eval': 'error',
53
- 'no-invalid-this': 'off',
54
- '@typescript-eslint/no-invalid-this': 'error',
55
- 'no-loop-func': 'off',
56
- '@typescript-eslint/no-loop-func': 'error',
57
- '@typescript-eslint/no-loss-of-precision': 'off',
58
- 'no-magic-numbers': 'off',
59
- '@typescript-eslint/no-magic-numbers': 'off',
60
- 'no-redeclare': 'off',
61
- '@typescript-eslint/no-redeclare': 'error',
62
- 'no-restricted-imports': 'off',
63
- '@typescript-eslint/no-restricted-imports': ['error', {}],
64
- 'no-shadow': 'off',
65
- '@typescript-eslint/no-shadow': 'off',
66
- 'no-throw-literal': 'off',
67
- '@typescript-eslint/only-throw-error': ['error', {
68
- allowThrowingAny: false,
69
- allowThrowingUnknown: false,
70
- }],
71
- 'no-unused-expressions': 'off',
72
- '@typescript-eslint/no-unused-expressions': 'error',
73
- 'no-unused-vars': 'off',
74
- '@typescript-eslint/no-unused-vars': ['error', {
75
- args: 'after-used',
76
- argsIgnorePattern: '^_',
77
- caughtErrors: 'all',
78
- destructuredArrayIgnorePattern: '^_',
79
- ignoreRestSiblings: false,
80
- vars: 'all',
81
- }],
82
- 'no-use-before-define': 'off',
83
- '@typescript-eslint/no-use-before-define': ['error', {
84
- functions: false,
85
- classes: false,
86
- variables: false,
87
- allowNamedExports: false,
88
- enums: false,
89
- typedefs: false,
90
- ignoreTypeReferences: false,
91
- }],
92
- 'no-useless-constructor': 'off',
93
- '@typescript-eslint/no-useless-constructor': 'error',
94
- 'object-curly-spacing': 'off',
95
- '@typescript-eslint/object-curly-spacing': 'off',
96
- 'padding-line-between-statements': 'off',
97
- '@typescript-eslint/padding-line-between-statements': 'off',
98
- 'prefer-destructuring': 'off',
99
- '@typescript-eslint/prefer-destructuring': 'off',
100
- 'prefer-promise-reject-errors': 'off',
101
- '@typescript-eslint/prefer-promise-reject-errors': 'error',
102
- 'quotes': 'off',
103
- '@typescript-eslint/quotes': 'off',
104
- 'require-await': 'off',
105
- '@typescript-eslint/require-await': 'error',
106
- 'no-return-await': 'off',
107
- '@typescript-eslint/return-await': ['warn', 'error-handling-correctness-only'],
108
- 'semi': 'off',
109
- '@typescript-eslint/semi': 'off',
110
- 'space-before-blocks': 'off',
111
- '@typescript-eslint/space-before-blocks': 'off',
112
- 'space-before-function-paren': 'off',
113
- '@typescript-eslint/space-before-function-paren': 'off',
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
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
- return [
10
- {
11
- selector: ['enumMember', 'typeLike'],
12
- format: ['StrictPascalCase'],
13
- }, {
14
- selector: ['memberLike', 'variableLike'],
15
- format: ['strictCamelCase'],
16
- }, {
17
- selector: ['objectLiteralProperty'],
18
- modifiers: ['requiresQuotes'],
19
- format: null,
20
- }, {
21
- selector: ['parameter'],
22
- modifiers: ['unused'],
23
- format: ['strictCamelCase'],
24
- leadingUnderscore: 'allow',
25
- }, {
26
- selector: ['classProperty'],
27
- modifiers: ['private'],
28
- format: ['strictCamelCase'],
29
- leadingUnderscore: 'allow',
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;