@perfective/eslint-config 0.28.0 → 0.29.1
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/README.adoc +29 -31
- package/README.md +24 -4
- package/config/plugin.d.ts +0 -3
- package/config/plugin.js +0 -24
- package/config.d.ts +1 -1
- package/config.js +1 -4
- package/cypress.d.ts +1 -0
- package/cypress.js +58 -0
- package/index.d.ts +1734 -0
- package/index.js +2 -35
- package/jest-dom.d.ts +1 -0
- package/jest-dom.js +11 -0
- package/jest.d.ts +1 -0
- package/jest.js +24 -0
- package/package.json +49 -17
- package/rules/array-func/index.d.ts +14 -0
- package/rules/cypress/index.d.ts +21 -0
- package/rules/cypress/index.js +4 -1
- package/rules/eslint/index.d.ts +339 -0
- package/rules/eslint/layout-formatting.d.ts +64 -0
- package/rules/eslint/possible-problems.d.ts +96 -0
- package/rules/eslint/possible-problems.js +10 -2
- package/rules/eslint/suggestions.d.ts +181 -0
- package/rules/eslint/suggestions.js +3 -1
- package/rules/eslint-comments/best-practices.d.ts +8 -0
- package/rules/eslint-comments/index.d.ts +21 -0
- package/rules/eslint-comments/stylistic-issues.d.ts +9 -0
- package/rules/import/helpful-warnings.d.ts +10 -0
- package/rules/import/index.d.ts +78 -0
- package/rules/import/module-systems.d.ts +10 -0
- package/rules/import/static-analysis.d.ts +26 -0
- package/rules/import/style-guide.d.ts +33 -0
- package/rules/jest/index.d.ts +124 -0
- package/rules/jest/typescript-eslint.d.ts +5 -0
- package/rules/jest-dom/index.d.ts +32 -0
- package/rules/jsdoc/index.d.ts +134 -0
- package/rules/n/index.d.ts +66 -0
- package/rules/prefer-arrow/index.d.ts +14 -0
- package/rules/promise/index.d.ts +35 -0
- package/rules/rxjs/index.d.ts +60 -0
- package/rules/rxjs/index.js +41 -42
- package/rules/security/index.d.ts +22 -0
- package/rules/simple-import-sort/index.d.ts +10 -0
- package/rules/stylistic/js/index.d.ts +197 -0
- package/rules/stylistic/jsx/index.d.ts +81 -0
- package/rules/stylistic/plus/index.d.ts +14 -0
- package/rules/stylistic/ts/index.d.ts +135 -0
- package/rules/testing-library/index.d.ts +62 -0
- package/rules/typescript-eslint/extension-rules.d.ts +113 -0
- package/rules/typescript-eslint/index.d.ts +369 -0
- package/rules/typescript-eslint/supported-rules.d.ts +253 -0
- package/rules/unicorn/index.d.ts +178 -0
- package/rxjs.d.ts +1 -0
- package/rxjs.js +58 -0
- package/testing-library.d.ts +1 -0
- package/testing-library.js +11 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
export declare const unicornConfig: {
|
|
2
|
+
plugins: {
|
|
3
|
+
unicorn: import("eslint").ESLint.Plugin & {
|
|
4
|
+
configs: {
|
|
5
|
+
recommended: import("eslint").Linter.Config;
|
|
6
|
+
all: import("eslint").Linter.Config;
|
|
7
|
+
"flat/all": import("eslint").Linter.FlatConfig;
|
|
8
|
+
"flat/recommended": import("eslint").Linter.FlatConfig;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
rules: {
|
|
13
|
+
'unicorn/better-regex': string;
|
|
14
|
+
'unicorn/catch-error-name': string;
|
|
15
|
+
'unicorn/consistent-destructuring': string;
|
|
16
|
+
'unicorn/consistent-empty-array-spread': string;
|
|
17
|
+
'unicorn/consistent-existence-index-check': string;
|
|
18
|
+
'unicorn/consistent-function-scoping': (string | {
|
|
19
|
+
checkArrowFunctions: boolean;
|
|
20
|
+
})[];
|
|
21
|
+
'unicorn/custom-error-definition': string;
|
|
22
|
+
'unicorn/empty-brace-spaces': string;
|
|
23
|
+
'unicorn/error-message': string;
|
|
24
|
+
'unicorn/escape-case': string;
|
|
25
|
+
'unicorn/expiring-todo-comments': string;
|
|
26
|
+
'unicorn/explicit-length-check': string;
|
|
27
|
+
'unicorn/filename-case': (string | {
|
|
28
|
+
case: string;
|
|
29
|
+
})[];
|
|
30
|
+
'unicorn/import-index': string;
|
|
31
|
+
'unicorn/import-style': string;
|
|
32
|
+
'unicorn/new-for-builtins': string;
|
|
33
|
+
'unicorn/no-abusive-eslint-disable': string;
|
|
34
|
+
'unicorn/no-anonymous-default-export': string;
|
|
35
|
+
'unicorn/no-array-callback-reference': string;
|
|
36
|
+
'unicorn/no-array-for-each': string;
|
|
37
|
+
'unicorn/no-array-method-this-argument': string;
|
|
38
|
+
'unicorn/no-array-push-push': (string | {
|
|
39
|
+
ignore: string[];
|
|
40
|
+
})[];
|
|
41
|
+
'unicorn/no-array-reduce': string;
|
|
42
|
+
'unicorn/no-await-expression-member': string;
|
|
43
|
+
'unicorn/no-await-in-promise-methods': string;
|
|
44
|
+
'unicorn/no-console-spaces': string;
|
|
45
|
+
'unicorn/no-document-cookie': string;
|
|
46
|
+
'unicorn/no-empty-file': string;
|
|
47
|
+
'unicorn/no-for-loop': string;
|
|
48
|
+
'unicorn/no-hex-escape': string;
|
|
49
|
+
'unicorn/no-instanceof-array': string;
|
|
50
|
+
'unicorn/no-invalid-fetch-options': string;
|
|
51
|
+
'unicorn/no-invalid-remove-event-listener': string;
|
|
52
|
+
'unicorn/no-keyword-prefix': (string | {
|
|
53
|
+
disallowedPrefixes: string[];
|
|
54
|
+
checkProperties: boolean;
|
|
55
|
+
onlyCamelCase: boolean;
|
|
56
|
+
})[];
|
|
57
|
+
'unicorn/no-length-as-slice-end': string;
|
|
58
|
+
'unicorn/no-lonely-if': string;
|
|
59
|
+
'unicorn/no-magic-array-flat-depth': string;
|
|
60
|
+
'unicorn/no-negated-condition': string;
|
|
61
|
+
'unicorn/no-negation-in-equality-check': string;
|
|
62
|
+
'unicorn/no-nested-ternary': string;
|
|
63
|
+
'unicorn/no-new-array': string;
|
|
64
|
+
'unicorn/no-new-buffer': string;
|
|
65
|
+
'unicorn/no-null': string;
|
|
66
|
+
'unicorn/no-object-as-default-parameter': string;
|
|
67
|
+
'unicorn/no-process-exit': string;
|
|
68
|
+
'unicorn/no-single-promise-in-promise-methods': string;
|
|
69
|
+
'unicorn/no-static-only-class': string;
|
|
70
|
+
'unicorn/no-thenable': string;
|
|
71
|
+
'unicorn/no-this-assignment': string;
|
|
72
|
+
'unicorn/no-typeof-undefined': (string | {
|
|
73
|
+
checkGlobalVariables: boolean;
|
|
74
|
+
})[];
|
|
75
|
+
'unicorn/no-unnecessary-await': string;
|
|
76
|
+
'unicorn/no-unnecessary-polyfills': string;
|
|
77
|
+
'unicorn/no-unreadable-array-destructuring': string;
|
|
78
|
+
'unicorn/no-unreadable-iife': string;
|
|
79
|
+
'unicorn/no-unsafe-regex': string;
|
|
80
|
+
'unicorn/no-unused-properties': string;
|
|
81
|
+
'unicorn/no-useless-fallback-in-spread': string;
|
|
82
|
+
'unicorn/no-useless-length-check': string;
|
|
83
|
+
'unicorn/no-useless-promise-resolve-reject': string;
|
|
84
|
+
'unicorn/no-useless-spread': string;
|
|
85
|
+
'unicorn/no-useless-switch-case': string;
|
|
86
|
+
'unicorn/no-useless-undefined': string;
|
|
87
|
+
'unicorn/no-zero-fractions': string;
|
|
88
|
+
'unicorn/number-literal-case': string;
|
|
89
|
+
'unicorn/numeric-separators-style': (string | {
|
|
90
|
+
hexadecimal: {
|
|
91
|
+
minimumDigits: number;
|
|
92
|
+
groupLength: number;
|
|
93
|
+
};
|
|
94
|
+
binary: {
|
|
95
|
+
minimumDigits: number;
|
|
96
|
+
groupLength: number;
|
|
97
|
+
};
|
|
98
|
+
octal: {
|
|
99
|
+
minimumDigits: number;
|
|
100
|
+
groupLength: number;
|
|
101
|
+
};
|
|
102
|
+
number: {
|
|
103
|
+
minimumDigits: number;
|
|
104
|
+
groupLength: number;
|
|
105
|
+
};
|
|
106
|
+
})[];
|
|
107
|
+
'unicorn/prefer-add-event-listener': string;
|
|
108
|
+
'unicorn/prefer-array-find': (string | {
|
|
109
|
+
checkFromLast: boolean;
|
|
110
|
+
})[];
|
|
111
|
+
'unicorn/prefer-array-flat': string;
|
|
112
|
+
'unicorn/prefer-array-flat-map': string;
|
|
113
|
+
'unicorn/prefer-array-index-of': string;
|
|
114
|
+
'unicorn/prefer-array-some': string;
|
|
115
|
+
'unicorn/prefer-at': string;
|
|
116
|
+
'unicorn/prefer-blob-reading-methods': string;
|
|
117
|
+
'unicorn/prefer-code-point': string;
|
|
118
|
+
'unicorn/prefer-date-now': string;
|
|
119
|
+
'unicorn/prefer-default-parameters': string;
|
|
120
|
+
'unicorn/prefer-dom-node-append': string;
|
|
121
|
+
'unicorn/prefer-dom-node-dataset': string;
|
|
122
|
+
'unicorn/prefer-dom-node-remove': string;
|
|
123
|
+
'unicorn/prefer-dom-node-text-content': string;
|
|
124
|
+
'unicorn/prefer-event-target': string;
|
|
125
|
+
'unicorn/prefer-export-from': string;
|
|
126
|
+
'unicorn/prefer-global-this': string;
|
|
127
|
+
'unicorn/prefer-includes': string;
|
|
128
|
+
'unicorn/prefer-json-parse-buffer': string;
|
|
129
|
+
'unicorn/prefer-keyboard-event-key': string;
|
|
130
|
+
'unicorn/prefer-logical-operator-over-ternary': string;
|
|
131
|
+
'unicorn/prefer-math-min-max': string;
|
|
132
|
+
'unicorn/prefer-math-trunc': string;
|
|
133
|
+
'unicorn/prefer-modern-dom-apis': string;
|
|
134
|
+
'unicorn/prefer-modern-math-apis': string;
|
|
135
|
+
'unicorn/prefer-module': string;
|
|
136
|
+
'unicorn/prefer-native-coercion-functions': string;
|
|
137
|
+
'unicorn/prefer-negative-index': string;
|
|
138
|
+
'unicorn/prefer-node-protocol': string;
|
|
139
|
+
'unicorn/prefer-number-properties': (string | {
|
|
140
|
+
checkInfinity: boolean;
|
|
141
|
+
checkNaN: boolean;
|
|
142
|
+
})[];
|
|
143
|
+
'unicorn/prefer-object-from-entries': (string | {
|
|
144
|
+
functions: never[];
|
|
145
|
+
})[];
|
|
146
|
+
'unicorn/prefer-optional-catch-binding': string;
|
|
147
|
+
'unicorn/prefer-prototype-methods': string;
|
|
148
|
+
'unicorn/prefer-query-selector': string;
|
|
149
|
+
'unicorn/prefer-reflect-apply': string;
|
|
150
|
+
'unicorn/prefer-regexp-test': string;
|
|
151
|
+
'unicorn/prefer-set-has': string;
|
|
152
|
+
'unicorn/prefer-set-size': string;
|
|
153
|
+
'unicorn/prefer-spread': string;
|
|
154
|
+
'unicorn/prefer-string-raw': string;
|
|
155
|
+
'unicorn/prefer-string-replace-all': string;
|
|
156
|
+
'unicorn/prefer-string-slice': string;
|
|
157
|
+
'unicorn/prefer-string-starts-ends-with': string;
|
|
158
|
+
'unicorn/prefer-string-trim-start-end': string;
|
|
159
|
+
'unicorn/prefer-structured-clone': string;
|
|
160
|
+
'unicorn/prefer-switch': (string | {
|
|
161
|
+
minimumCases: number;
|
|
162
|
+
emptyDefaultCase: string;
|
|
163
|
+
})[];
|
|
164
|
+
'unicorn/prefer-ternary': string;
|
|
165
|
+
'unicorn/prefer-top-level-await': string;
|
|
166
|
+
'unicorn/prefer-type-error': string;
|
|
167
|
+
'unicorn/prevent-abbreviations': (string | import("./rules/prevent-abbreviations").UnicornPreventAbbreviations)[];
|
|
168
|
+
'unicorn/relative-url-style': string[];
|
|
169
|
+
'unicorn/require-array-join-separator': string;
|
|
170
|
+
'unicorn/require-number-to-fixed-digits-argument': string;
|
|
171
|
+
'unicorn/require-post-message-target-origin': string;
|
|
172
|
+
'unicorn/string-content': string;
|
|
173
|
+
'unicorn/switch-case-braces': string;
|
|
174
|
+
'unicorn/template-indent': string;
|
|
175
|
+
'unicorn/text-encoding-identifier-case': string;
|
|
176
|
+
'unicorn/throw-new-error': string;
|
|
177
|
+
};
|
|
178
|
+
};
|
package/rxjs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function rxjsConfig(files?: string[]): Record<string, unknown>;
|
package/rxjs.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
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.rxjsConfig = rxjsConfig;
|
|
37
|
+
const tsEslint = __importStar(require("typescript-eslint"));
|
|
38
|
+
const rxjs_1 = require("./rules/rxjs");
|
|
39
|
+
function rxjsConfig(files = ['**/*.ts?(x)']) {
|
|
40
|
+
return {
|
|
41
|
+
files,
|
|
42
|
+
languageOptions: {
|
|
43
|
+
parser: tsEslint.parser,
|
|
44
|
+
parserOptions: {
|
|
45
|
+
ecmaVersion: 6,
|
|
46
|
+
ecmaFeatures: {
|
|
47
|
+
globalReturn: false,
|
|
48
|
+
impliedStrict: true,
|
|
49
|
+
},
|
|
50
|
+
sourceType: 'module',
|
|
51
|
+
project: './tsconfig.json',
|
|
52
|
+
warnOnUnsupportedTypeScriptVersion: true,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
plugins: Object.assign({}, rxjs_1.rxjsConfig.plugins),
|
|
56
|
+
rules: Object.assign({}, rxjs_1.rxjsConfig.rules),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function testingLibraryConfig(files?: string[]): Record<string, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.testingLibraryConfig = testingLibraryConfig;
|
|
4
|
+
const testing_library_1 = require("./rules/testing-library");
|
|
5
|
+
function testingLibraryConfig(files = ['**/*.@(spec|test).[jt]s?(x)']) {
|
|
6
|
+
return {
|
|
7
|
+
files,
|
|
8
|
+
plugins: testing_library_1.testingLibraryConfig.plugins,
|
|
9
|
+
rules: testing_library_1.testingLibraryConfig.rules,
|
|
10
|
+
};
|
|
11
|
+
}
|