@perfective/eslint-config 0.30.0 → 0.31.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 +185 -60
- package/README.md +53 -40
- package/config/array-func/array-func-config.d.ts +2 -0
- package/config/array-func/array-func-config.js +16 -0
- package/config/cypress/cypress-config.d.ts +10 -0
- package/config/cypress/cypress-config.js +38 -0
- package/config/cypress/index.d.ts +1 -0
- package/config/cypress/index.js +1 -0
- package/config/eslint/eslint-config.d.ts +2 -0
- package/config/eslint/eslint-config.js +8 -0
- package/config/eslint/layout-formatting-rules.d.ts +2 -0
- package/config/eslint/possible-problems-rules.d.ts +2 -0
- package/config/eslint/suggestions-rules.d.ts +2 -0
- package/config/eslint-comments/best-practices-rules.d.ts +2 -0
- package/config/eslint-comments/eslint-comments-config.d.ts +2 -0
- package/config/eslint-comments/eslint-comments-config.js +11 -0
- package/config/eslint-comments/stylistic-issues-rules.d.ts +2 -0
- package/config/import/helpful-warnings-rules.d.ts +2 -0
- package/config/import/import-config.d.ts +4 -0
- package/config/import/import-config.js +46 -0
- package/config/import/index.d.ts +1 -0
- package/config/import/index.js +1 -0
- package/config/import/module-systems-rules.d.ts +2 -0
- package/config/import/rules/no-extraneous-dependencies.d.ts +15 -0
- package/config/import/rules/no-extraneous-dependencies.js +8 -0
- package/config/import/static-analysis-rules.d.ts +2 -0
- package/config/import/style-guide-rules.d.ts +2 -0
- package/config/jest/index.d.ts +1 -0
- package/config/jest/index.js +1 -0
- package/config/jest/jest-config.d.ts +8 -0
- package/config/jest/jest-config.js +128 -0
- package/config/jest/typescript-eslint-jest-rules.d.ts +2 -0
- package/config/jest-dom/index.d.ts +1 -0
- package/config/jest-dom/index.js +1 -0
- package/config/jest-dom/jest-dom-config.d.ts +8 -0
- package/config/jest-dom/jest-dom-config.js +23 -0
- package/config/jsdoc/jsdoc-config.d.ts +3 -0
- package/config/jsdoc/jsdoc-config.js +179 -0
- package/config/node/node-config.d.ts +2 -0
- package/config/node/node-config.js +66 -0
- package/config/perfective-eslint-config.d.ts +6 -0
- package/config/perfective-eslint-config.js +45 -0
- package/config/prefer-arrow/prefer-arrow-config.d.ts +2 -0
- package/config/prefer-arrow/prefer-arrow-config.js +16 -0
- package/config/promise/promise-config.d.ts +2 -0
- package/config/promise/promise-config.js +37 -0
- package/config/rxjs/index.d.ts +1 -0
- package/config/rxjs/index.js +1 -0
- package/config/rxjs/rxjs-config.d.ts +8 -0
- package/config/rxjs/rxjs-config.js +67 -0
- package/config/security/security-config.d.ts +2 -0
- package/config/security/security-config.js +24 -0
- package/config/simple-import-sort/index.d.ts +1 -0
- package/config/simple-import-sort/index.js +1 -0
- package/{rules → config}/simple-import-sort/rules/imports.d.ts +11 -2
- package/config/simple-import-sort/simple-import-sort-config.d.ts +2 -0
- package/config/simple-import-sort/simple-import-sort-config.js +13 -0
- package/config/stylistic/js/stylistic-js-config.d.ts +2 -0
- package/config/stylistic/js/stylistic-js-config.js +200 -0
- package/config/stylistic/jsx/stylistic-jsx-config.d.ts +2 -0
- package/config/stylistic/jsx/stylistic-jsx-config.js +87 -0
- package/config/stylistic/plus/stylistic-plus-config.d.ts +2 -0
- package/config/stylistic/plus/stylistic-plus-config.js +16 -0
- package/config/stylistic/ts/stylistic-ts-config.d.ts +2 -0
- package/config/stylistic/ts/stylistic-ts-config.js +141 -0
- package/config/testing-library/index.d.ts +1 -0
- package/config/testing-library/index.js +1 -0
- package/config/testing-library/testing-library-config.d.ts +8 -0
- package/config/testing-library/testing-library-config.js +45 -0
- package/config/typescript-eslint/extension-rules.d.ts +2 -0
- package/config/typescript-eslint/index.d.ts +1 -0
- package/config/typescript-eslint/index.js +1 -0
- package/{rules → config}/typescript-eslint/rules/typescript-eslint-naming-convention.d.ts +35 -1
- package/config/typescript-eslint/supported-rules.d.ts +2 -0
- package/{rules → config}/typescript-eslint/supported-rules.js +7 -3
- package/config/typescript-eslint/typescript-eslint-config.d.ts +2 -0
- package/config/typescript-eslint/typescript-eslint-config.js +15 -0
- package/config/unicorn/index.d.ts +1 -0
- package/config/unicorn/index.js +1 -0
- package/{rules → config}/unicorn/rules/prevent-abbreviations.d.ts +14 -2
- package/config/unicorn/unicorn-config.d.ts +2 -0
- package/config/unicorn/unicorn-config.js +185 -0
- package/index.d.ts +5 -1766
- package/index.js +5 -102
- package/linter/glob.d.ts +59 -0
- package/linter/glob.js +8 -0
- package/linter/language-options.d.ts +25 -0
- package/linter/language-options.js +45 -0
- package/linter/linter-config.d.ts +13 -0
- package/linter/linter-config.js +6 -0
- package/{config → linter}/node.d.ts +3 -1
- package/{config → linter}/plugin.d.ts +6 -2
- package/package.json +38 -40
- package/config.d.ts +0 -1
- package/config.js +0 -1
- package/cypress.d.ts +0 -6
- package/cypress.js +0 -31
- package/jest-dom.d.ts +0 -1
- package/jest-dom.js +0 -8
- package/jest.d.ts +0 -7
- package/jest.js +0 -29
- package/rules/array-func/index.d.ts +0 -13
- package/rules/array-func/index.js +0 -14
- package/rules/cypress/index.d.ts +0 -29
- package/rules/cypress/index.js +0 -23
- package/rules/eslint/index.d.ts +0 -339
- package/rules/eslint/index.js +0 -6
- package/rules/eslint/layout-formatting.d.ts +0 -64
- package/rules/eslint/possible-problems.d.ts +0 -96
- package/rules/eslint/suggestions.d.ts +0 -181
- package/rules/eslint-comments/best-practices.d.ts +0 -8
- package/rules/eslint-comments/index.d.ts +0 -20
- package/rules/eslint-comments/index.js +0 -9
- package/rules/eslint-comments/stylistic-issues.d.ts +0 -9
- package/rules/import/helpful-warnings.d.ts +0 -10
- package/rules/import/index.d.ts +0 -78
- package/rules/import/index.js +0 -11
- package/rules/import/module-systems.d.ts +0 -10
- package/rules/import/rules/no-extraneous-dependencies.d.ts +0 -14
- package/rules/import/rules/no-extraneous-dependencies.js +0 -23
- package/rules/import/static-analysis.d.ts +0 -26
- package/rules/import/style-guide.d.ts +0 -33
- package/rules/jest/index.d.ts +0 -124
- package/rules/jest/index.js +0 -98
- package/rules/jest/typescript-eslint.d.ts +0 -5
- package/rules/jest-dom/index.d.ts +0 -32
- package/rules/jest-dom/index.js +0 -19
- package/rules/jsdoc/index.d.ts +0 -134
- package/rules/jsdoc/index.js +0 -161
- package/rules/n/index.d.ts +0 -66
- package/rules/n/index.js +0 -64
- package/rules/prefer-arrow/index.d.ts +0 -13
- package/rules/prefer-arrow/index.js +0 -14
- package/rules/promise/index.d.ts +0 -34
- package/rules/promise/index.js +0 -35
- package/rules/rxjs/index.d.ts +0 -60
- package/rules/rxjs/index.js +0 -60
- package/rules/security/index.d.ts +0 -21
- package/rules/security/index.js +0 -22
- package/rules/simple-import-sort/index.d.ts +0 -10
- package/rules/simple-import-sort/index.js +0 -12
- package/rules/stylistic/js/index.d.ts +0 -204
- package/rules/stylistic/js/index.js +0 -198
- package/rules/stylistic/jsx/index.d.ts +0 -87
- package/rules/stylistic/jsx/index.js +0 -81
- package/rules/stylistic/plus/index.d.ts +0 -18
- package/rules/stylistic/plus/index.js +0 -14
- package/rules/stylistic/ts/index.d.ts +0 -141
- package/rules/stylistic/ts/index.js +0 -135
- package/rules/testing-library/index.d.ts +0 -62
- package/rules/testing-library/index.js +0 -41
- package/rules/typescript-eslint/extension-rules.d.ts +0 -113
- package/rules/typescript-eslint/index.d.ts +0 -371
- package/rules/typescript-eslint/index.js +0 -9
- package/rules/typescript-eslint/supported-rules.d.ts +0 -255
- package/rules/unicorn/index.d.ts +0 -183
- package/rules/unicorn/index.js +0 -178
- package/rules.d.ts +0 -4
- package/rules.js +0 -4
- package/rxjs.d.ts +0 -6
- package/rxjs.js +0 -22
- package/testing-library.d.ts +0 -1
- package/testing-library.js +0 -8
- /package/{rules/eslint/layout-formatting.js → config/eslint/layout-formatting-rules.js} +0 -0
- /package/{rules/eslint/possible-problems.js → config/eslint/possible-problems-rules.js} +0 -0
- /package/{rules/eslint/suggestions.js → config/eslint/suggestions-rules.js} +0 -0
- /package/{rules/eslint-comments/best-practices.js → config/eslint-comments/best-practices-rules.js} +0 -0
- /package/{rules/eslint-comments/stylistic-issues.js → config/eslint-comments/stylistic-issues-rules.js} +0 -0
- /package/{rules/import/helpful-warnings.js → config/import/helpful-warnings-rules.js} +0 -0
- /package/{rules/import/module-systems.js → config/import/module-systems-rules.js} +0 -0
- /package/{rules/import/static-analysis.js → config/import/static-analysis-rules.js} +0 -0
- /package/{rules/import/style-guide.js → config/import/style-guide-rules.js} +0 -0
- /package/{rules/jest/typescript-eslint.js → config/jest/typescript-eslint-jest-rules.js} +0 -0
- /package/{rules → config}/simple-import-sort/rules/imports.js +0 -0
- /package/{rules → config}/typescript-eslint/extension-rules.js +0 -0
- /package/{rules → config}/typescript-eslint/rules/typescript-eslint-naming-convention.js +0 -0
- /package/{rules → config}/unicorn/rules/prevent-abbreviations.js +0 -0
- /package/{config → linter}/node.js +0 -0
- /package/{config → linter}/plugin.js +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import eslintPluginTestingLibrary from 'eslint-plugin-testing-library';
|
|
2
|
+
import { jestFiles } from "../../linter/glob.js";
|
|
3
|
+
export function testingLibraryConfig(files = jestFiles) {
|
|
4
|
+
return {
|
|
5
|
+
files,
|
|
6
|
+
plugins: {
|
|
7
|
+
'testing-library': eslintPluginTestingLibrary
|
|
8
|
+
},
|
|
9
|
+
rules: {
|
|
10
|
+
'testing-library/await-async-events': 'off',
|
|
11
|
+
'testing-library/await-async-queries': 'error',
|
|
12
|
+
'testing-library/await-async-utils': 'error',
|
|
13
|
+
'testing-library/consistent-data-testid': ['error', {
|
|
14
|
+
testIdPattern: '^[a-z0-9]+(-[a-z0-9]+)*$',
|
|
15
|
+
testIdAttribute: 'data-testId'
|
|
16
|
+
}],
|
|
17
|
+
'testing-library/no-await-sync-events': 'error',
|
|
18
|
+
'testing-library/no-await-sync-queries': 'error',
|
|
19
|
+
'testing-library/no-container': 'error',
|
|
20
|
+
'testing-library/no-debugging-utils': 'error',
|
|
21
|
+
'testing-library/no-dom-import': 'warn',
|
|
22
|
+
'testing-library/no-global-regexp-flag-in-query': 'warn',
|
|
23
|
+
'testing-library/no-manual-cleanup': 'error',
|
|
24
|
+
'testing-library/no-node-access': 'error',
|
|
25
|
+
'testing-library/no-promise-in-fire-event': 'error',
|
|
26
|
+
'testing-library/no-render-in-lifecycle': 'error',
|
|
27
|
+
'testing-library/no-unnecessary-act': 'off',
|
|
28
|
+
'testing-library/no-wait-for-multiple-assertions': 'error',
|
|
29
|
+
'testing-library/no-wait-for-side-effects': 'error',
|
|
30
|
+
'testing-library/no-wait-for-snapshot': 'error',
|
|
31
|
+
'testing-library/prefer-explicit-assert': 'off',
|
|
32
|
+
'testing-library/prefer-find-by': 'warn',
|
|
33
|
+
'testing-library/prefer-implicit-assert': 'error',
|
|
34
|
+
'testing-library/prefer-presence-queries': ['error', {
|
|
35
|
+
presence: true,
|
|
36
|
+
absence: true
|
|
37
|
+
}],
|
|
38
|
+
'testing-library/prefer-query-by-disappearance': 'error',
|
|
39
|
+
'testing-library/prefer-query-matchers': 'off',
|
|
40
|
+
'testing-library/prefer-screen-queries': 'error',
|
|
41
|
+
'testing-library/prefer-user-event': 'error',
|
|
42
|
+
'testing-library/render-result-naming-convention': 'error'
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TypescriptEslintNamingConvention, typescriptEslintNamingConvention, TypescriptEslintNamingConventionFormat, TypescriptEslintNamingConventionGroupSelector, TypescriptEslintNamingConventionIndividualSelector, TypescriptEslintNamingConventionSelector, TypescriptEslintNamingConventionUnderscore, } from './rules/typescript-eslint-naming-convention';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { typescriptEslintNamingConvention } from "./rules/typescript-eslint-naming-convention.js";
|
|
@@ -1,8 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Values for the `@typescript-eslint/naming-convention` rule `format` option.
|
|
3
|
+
*
|
|
4
|
+
* @since v0.11.0
|
|
5
|
+
*/
|
|
1
6
|
export type TypescriptEslintNamingConventionFormat = 'camelCase' | 'strictCamelCase' | 'PascalCase' | 'StrictPascalCase' | 'snake_case' | 'UPPER_CASE';
|
|
7
|
+
/**
|
|
8
|
+
* Values for individual selectors for the `@typescript-eslint/naming-convention` rule `selector` option.
|
|
9
|
+
*
|
|
10
|
+
* @since v0.11.0
|
|
11
|
+
*/
|
|
2
12
|
export type TypescriptEslintNamingConventionIndividualSelector = 'variable' | 'function' | 'parameter' | 'classProperty' | 'objectLiteralProperty' | 'typeProperty' | 'parameterProperty' | 'classMethod' | 'objectLiteralMethod' | 'typeMethod' | 'accessor' | 'enumMember' | 'class' | 'interface' | 'typeAlias' | 'enum' | 'typeParameter';
|
|
13
|
+
/**
|
|
14
|
+
* Values for grouped of individual selectors for the `@typescript-eslint/naming-convention` rule `selector` option.
|
|
15
|
+
*
|
|
16
|
+
* @since v0.11.0
|
|
17
|
+
*/
|
|
3
18
|
export type TypescriptEslintNamingConventionGroupSelector = 'default' | 'variableLike' | 'memberLike' | 'typeLike' | 'property' | 'method';
|
|
19
|
+
/**
|
|
20
|
+
* Values for the `@typescript-eslint/naming-convention` rule `selector` option.
|
|
21
|
+
*
|
|
22
|
+
* @since v0.11.0
|
|
23
|
+
*/
|
|
4
24
|
export type TypescriptEslintNamingConventionSelector = TypescriptEslintNamingConventionIndividualSelector | TypescriptEslintNamingConventionGroupSelector;
|
|
25
|
+
/**
|
|
26
|
+
* Values for the `@typescript-eslint/naming-convention` rule `leadingUnderscore` and `trailingUnderscore` options.
|
|
27
|
+
*
|
|
28
|
+
* @since v0.11.0
|
|
29
|
+
*/
|
|
5
30
|
export type TypescriptEslintNamingConventionUnderscore = 'forbid' | 'require' | 'requireDouble' | 'allow' | 'allowDouble' | 'allowSingleOrDouble';
|
|
31
|
+
/**
|
|
32
|
+
* Configuration options for the `@typescript-eslint/naming-convention` rule.
|
|
33
|
+
*
|
|
34
|
+
* @see https://typescript-eslint.io/rules/naming-convention/
|
|
35
|
+
*
|
|
36
|
+
* @since v0.11.0
|
|
37
|
+
*/
|
|
6
38
|
export interface TypescriptEslintNamingConvention {
|
|
7
39
|
selector: TypescriptEslintNamingConventionSelector | TypescriptEslintNamingConventionSelector[];
|
|
8
40
|
format: TypescriptEslintNamingConventionFormat[] | null;
|
|
@@ -17,8 +49,10 @@ export interface TypescriptEslintNamingConvention {
|
|
|
17
49
|
};
|
|
18
50
|
}
|
|
19
51
|
/**
|
|
20
|
-
*
|
|
52
|
+
* Creates configuration with the given extensions for the `@typescript-eslint/naming-convention` rule.
|
|
21
53
|
*
|
|
22
54
|
* @see https://typescript-eslint.io/rules/naming-convention/
|
|
55
|
+
*
|
|
56
|
+
* @since v0.11.0
|
|
23
57
|
*/
|
|
24
58
|
export declare function typescriptEslintNamingConvention(extensions?: TypescriptEslintNamingConvention[]): TypescriptEslintNamingConvention[];
|
|
@@ -121,16 +121,19 @@ export const supportedRules = {
|
|
|
121
121
|
allowComparingNullableBooleansToTrue: true,
|
|
122
122
|
allowComparingNullableBooleansToFalse: true
|
|
123
123
|
}],
|
|
124
|
-
'@typescript-eslint/no-unnecessary-condition': ['
|
|
124
|
+
'@typescript-eslint/no-unnecessary-condition': ['error', {
|
|
125
125
|
allowConstantLoopConditions: false,
|
|
126
126
|
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
127
|
-
checkTypePredicates:
|
|
127
|
+
checkTypePredicates: false
|
|
128
128
|
}],
|
|
129
129
|
'@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',
|
|
130
130
|
'@typescript-eslint/no-unnecessary-qualifier': 'warn',
|
|
131
131
|
'@typescript-eslint/no-unnecessary-template-expression': 'error',
|
|
132
132
|
'@typescript-eslint/no-unnecessary-type-arguments': 'warn',
|
|
133
|
-
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
133
|
+
'@typescript-eslint/no-unnecessary-type-assertion': ['warn', {
|
|
134
|
+
checkLiteralConstAssertions: true,
|
|
135
|
+
typesToIgnore: []
|
|
136
|
+
}],
|
|
134
137
|
'@typescript-eslint/no-unnecessary-type-constraint': 'warn',
|
|
135
138
|
'@typescript-eslint/no-unsafe-argument': 'error',
|
|
136
139
|
'@typescript-eslint/no-unsafe-assignment': 'error',
|
|
@@ -164,6 +167,7 @@ export const supportedRules = {
|
|
|
164
167
|
'@typescript-eslint/prefer-namespace-keyword': 'warn',
|
|
165
168
|
'@typescript-eslint/prefer-nullish-coalescing': ['error', {
|
|
166
169
|
ignoreBooleanCoercion: false,
|
|
170
|
+
ignoreIfStatements: false,
|
|
167
171
|
ignoreTernaryTests: false,
|
|
168
172
|
ignoreConditionalTests: true,
|
|
169
173
|
ignoreMixedLogicalExpressions: true,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { plugin } from 'typescript-eslint';
|
|
2
|
+
import { typescriptFiles } from "../../linter/glob.js";
|
|
3
|
+
import { typescriptLanguageOptions } from "../../linter/language-options.js";
|
|
4
|
+
import { extensionRules } from "./extension-rules.js";
|
|
5
|
+
import { supportedRules } from "./supported-rules.js";
|
|
6
|
+
export function typescriptEslintConfig() {
|
|
7
|
+
return {
|
|
8
|
+
files: typescriptFiles,
|
|
9
|
+
languageOptions: typescriptLanguageOptions(),
|
|
10
|
+
plugins: {
|
|
11
|
+
'@typescript-eslint': plugin
|
|
12
|
+
},
|
|
13
|
+
rules: Object.assign(Object.assign({}, supportedRules), extensionRules)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UnicornPreventAbbreviationReplacements, UnicornPreventAbbreviations, unicornPreventAbbreviations, } from './rules/prevent-abbreviations';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { unicornPreventAbbreviations } from "./rules/prevent-abbreviations.js";
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nominal type for the `replacements` option of the `unicorn/prevent-abbreviation` rule.
|
|
3
|
+
*/
|
|
1
4
|
export type UnicornPreventAbbreviationReplacements = Record<string, boolean | Record<string, boolean>>;
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for the `unicorn/prevent-abbreviation` rule.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md
|
|
9
|
+
*
|
|
10
|
+
* @since v0.11.0
|
|
11
|
+
*/
|
|
2
12
|
export interface UnicornPreventAbbreviations {
|
|
3
13
|
replacements: UnicornPreventAbbreviationReplacements;
|
|
4
14
|
extendDefaultReplacements: boolean;
|
|
@@ -13,11 +23,13 @@ export interface UnicornPreventAbbreviations {
|
|
|
13
23
|
ignore: RegExp[];
|
|
14
24
|
}
|
|
15
25
|
/**
|
|
16
|
-
*
|
|
26
|
+
* Creates configuration for the `unicorn/prevent-abbreviation` rule with the given replacements and options.
|
|
17
27
|
*
|
|
18
28
|
* @param replacements - List of additional replacements.
|
|
19
29
|
* @param options - Additional properties to override.
|
|
20
30
|
*
|
|
21
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
31
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md
|
|
32
|
+
*
|
|
33
|
+
* @since v0.11.0
|
|
22
34
|
*/
|
|
23
35
|
export declare function unicornPreventAbbreviations(replacements?: UnicornPreventAbbreviationReplacements, options?: Partial<Pick<UnicornPreventAbbreviations, 'checkProperties'>>): UnicornPreventAbbreviations;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
|
2
|
+
import { unicornPreventAbbreviations } from "./rules/prevent-abbreviations.js";
|
|
3
|
+
export function unicornConfig() {
|
|
4
|
+
return {
|
|
5
|
+
plugins: {
|
|
6
|
+
unicorn: eslintPluginUnicorn
|
|
7
|
+
},
|
|
8
|
+
rules: {
|
|
9
|
+
'unicorn/better-regex': 'warn',
|
|
10
|
+
'unicorn/catch-error-name': 'warn',
|
|
11
|
+
'unicorn/consistent-assert': 'warn',
|
|
12
|
+
'unicorn/consistent-date-clone': 'warn',
|
|
13
|
+
'unicorn/consistent-destructuring': 'warn',
|
|
14
|
+
'unicorn/consistent-empty-array-spread': 'warn',
|
|
15
|
+
'unicorn/consistent-existence-index-check': 'warn',
|
|
16
|
+
'unicorn/consistent-function-scoping': ['error', {
|
|
17
|
+
checkArrowFunctions: true
|
|
18
|
+
}],
|
|
19
|
+
'unicorn/custom-error-definition': 'warn',
|
|
20
|
+
'unicorn/empty-brace-spaces': 'warn',
|
|
21
|
+
'unicorn/error-message': 'error',
|
|
22
|
+
'unicorn/escape-case': ['warn', 'uppercase'],
|
|
23
|
+
'unicorn/expiring-todo-comments': 'error',
|
|
24
|
+
'unicorn/explicit-length-check': 'warn',
|
|
25
|
+
'unicorn/filename-case': ['error', {
|
|
26
|
+
case: 'kebabCase'
|
|
27
|
+
}],
|
|
28
|
+
'unicorn/import-index': 'off',
|
|
29
|
+
'unicorn/import-style': 'off',
|
|
30
|
+
'unicorn/new-for-builtins': 'warn',
|
|
31
|
+
'unicorn/no-abusive-eslint-disable': 'error',
|
|
32
|
+
'unicorn/no-accessor-recursion': 'error',
|
|
33
|
+
'unicorn/no-anonymous-default-export': 'error',
|
|
34
|
+
'unicorn/no-array-callback-reference': 'off',
|
|
35
|
+
'unicorn/no-array-for-each': 'off',
|
|
36
|
+
'unicorn/no-array-method-this-argument': 'warn',
|
|
37
|
+
'unicorn/no-array-reduce': 'off',
|
|
38
|
+
'unicorn/no-await-expression-member': 'error',
|
|
39
|
+
'unicorn/no-await-in-promise-methods': 'error',
|
|
40
|
+
'unicorn/no-console-spaces': 'warn',
|
|
41
|
+
'unicorn/no-document-cookie': 'error',
|
|
42
|
+
'unicorn/no-empty-file': 'error',
|
|
43
|
+
'unicorn/no-for-loop': 'warn',
|
|
44
|
+
'unicorn/no-hex-escape': 'warn',
|
|
45
|
+
'unicorn/no-instanceof-array': 'off',
|
|
46
|
+
'unicorn/no-instanceof-builtins': 'warn',
|
|
47
|
+
'unicorn/no-invalid-fetch-options': 'error',
|
|
48
|
+
'unicorn/no-invalid-remove-event-listener': 'error',
|
|
49
|
+
'unicorn/no-keyword-prefix': ['off', {
|
|
50
|
+
disallowedPrefixes: ['new', 'class'],
|
|
51
|
+
checkProperties: true,
|
|
52
|
+
onlyCamelCase: false
|
|
53
|
+
}],
|
|
54
|
+
'unicorn/no-lonely-if': 'warn',
|
|
55
|
+
'unicorn/no-magic-array-flat-depth': 'error',
|
|
56
|
+
'unicorn/no-named-default': 'warn',
|
|
57
|
+
'unicorn/no-negated-condition': 'warn',
|
|
58
|
+
'unicorn/no-negation-in-equality-check': 'error',
|
|
59
|
+
'unicorn/no-nested-ternary': 'off',
|
|
60
|
+
'unicorn/no-new-array': 'warn',
|
|
61
|
+
'unicorn/no-new-buffer': 'warn',
|
|
62
|
+
'unicorn/no-null': 'off',
|
|
63
|
+
'unicorn/no-object-as-default-parameter': 'error',
|
|
64
|
+
'unicorn/no-process-exit': 'error',
|
|
65
|
+
'unicorn/no-single-promise-in-promise-methods': 'warn',
|
|
66
|
+
'unicorn/no-static-only-class': 'error',
|
|
67
|
+
'unicorn/no-thenable': 'error',
|
|
68
|
+
'unicorn/no-this-assignment': 'error',
|
|
69
|
+
'unicorn/no-typeof-undefined': ['warn', {
|
|
70
|
+
checkGlobalVariables: true
|
|
71
|
+
}],
|
|
72
|
+
'unicorn/no-unnecessary-array-flat-depth': 'warn',
|
|
73
|
+
'unicorn/no-unnecessary-array-splice-count': 'warn',
|
|
74
|
+
'unicorn/no-unnecessary-await': 'warn',
|
|
75
|
+
'unicorn/no-unnecessary-polyfills': 'error',
|
|
76
|
+
'unicorn/no-unnecessary-slice-end': 'warn',
|
|
77
|
+
'unicorn/no-unreadable-array-destructuring': 'error',
|
|
78
|
+
'unicorn/no-unreadable-iife': 'error',
|
|
79
|
+
'unicorn/no-unsafe-regex': 'off',
|
|
80
|
+
'unicorn/no-unused-properties': 'off',
|
|
81
|
+
'unicorn/no-useless-fallback-in-spread': 'warn',
|
|
82
|
+
'unicorn/no-useless-length-check': 'warn',
|
|
83
|
+
'unicorn/no-useless-promise-resolve-reject': 'warn',
|
|
84
|
+
'unicorn/no-useless-spread': 'warn',
|
|
85
|
+
'unicorn/no-useless-switch-case': 'error',
|
|
86
|
+
'unicorn/no-useless-undefined': 'off',
|
|
87
|
+
'unicorn/no-zero-fractions': 'off',
|
|
88
|
+
'unicorn/number-literal-case': ['warn', {
|
|
89
|
+
hexadecimalValue: 'uppercase'
|
|
90
|
+
}],
|
|
91
|
+
'unicorn/numeric-separators-style': ['warn', {
|
|
92
|
+
hexadecimal: {
|
|
93
|
+
minimumDigits: 6,
|
|
94
|
+
groupLength: 2
|
|
95
|
+
},
|
|
96
|
+
binary: {
|
|
97
|
+
minimumDigits: 0,
|
|
98
|
+
groupLength: 4
|
|
99
|
+
},
|
|
100
|
+
octal: {
|
|
101
|
+
minimumDigits: 0,
|
|
102
|
+
groupLength: 4
|
|
103
|
+
},
|
|
104
|
+
number: {
|
|
105
|
+
minimumDigits: 6,
|
|
106
|
+
groupLength: 3
|
|
107
|
+
}
|
|
108
|
+
}],
|
|
109
|
+
'unicorn/prefer-add-event-listener': 'warn',
|
|
110
|
+
'unicorn/prefer-array-find': ['warn', {
|
|
111
|
+
checkFromLast: true
|
|
112
|
+
}],
|
|
113
|
+
'unicorn/prefer-array-flat': 'off',
|
|
114
|
+
'unicorn/prefer-array-flat-map': 'off',
|
|
115
|
+
'unicorn/prefer-array-index-of': 'warn',
|
|
116
|
+
'unicorn/prefer-array-some': 'error',
|
|
117
|
+
'unicorn/prefer-at': 'off',
|
|
118
|
+
'unicorn/prefer-blob-reading-methods': 'error',
|
|
119
|
+
'unicorn/prefer-code-point': 'error',
|
|
120
|
+
'unicorn/prefer-date-now': 'warn',
|
|
121
|
+
'unicorn/prefer-default-parameters': 'warn',
|
|
122
|
+
'unicorn/prefer-dom-node-append': 'warn',
|
|
123
|
+
'unicorn/prefer-dom-node-dataset': 'warn',
|
|
124
|
+
'unicorn/prefer-dom-node-remove': 'warn',
|
|
125
|
+
'unicorn/prefer-dom-node-text-content': 'warn',
|
|
126
|
+
'unicorn/prefer-event-target': 'error',
|
|
127
|
+
'unicorn/prefer-export-from': 'warn',
|
|
128
|
+
'unicorn/prefer-global-this': 'warn',
|
|
129
|
+
'unicorn/prefer-includes': 'warn',
|
|
130
|
+
'unicorn/prefer-import-meta-properties': 'warn',
|
|
131
|
+
'unicorn/prefer-json-parse-buffer': 'warn',
|
|
132
|
+
'unicorn/prefer-keyboard-event-key': 'warn',
|
|
133
|
+
'unicorn/prefer-logical-operator-over-ternary': 'error',
|
|
134
|
+
'unicorn/prefer-math-min-max': 'warn',
|
|
135
|
+
'unicorn/prefer-math-trunc': 'warn',
|
|
136
|
+
'unicorn/prefer-modern-dom-apis': 'warn',
|
|
137
|
+
'unicorn/prefer-modern-math-apis': 'warn',
|
|
138
|
+
'unicorn/prefer-module': 'off',
|
|
139
|
+
'unicorn/prefer-native-coercion-functions': 'warn',
|
|
140
|
+
'unicorn/prefer-negative-index': 'warn',
|
|
141
|
+
'unicorn/prefer-node-protocol': 'warn',
|
|
142
|
+
'unicorn/prefer-number-properties': ['warn', {
|
|
143
|
+
checkInfinity: true,
|
|
144
|
+
checkNaN: true
|
|
145
|
+
}],
|
|
146
|
+
'unicorn/prefer-object-from-entries': ['off', {
|
|
147
|
+
functions: []
|
|
148
|
+
}],
|
|
149
|
+
'unicorn/prefer-optional-catch-binding': 'warn',
|
|
150
|
+
'unicorn/prefer-prototype-methods': 'warn',
|
|
151
|
+
'unicorn/prefer-query-selector': 'warn',
|
|
152
|
+
'unicorn/prefer-reflect-apply': 'warn',
|
|
153
|
+
'unicorn/prefer-regexp-test': 'off',
|
|
154
|
+
'unicorn/prefer-set-has': 'warn',
|
|
155
|
+
'unicorn/prefer-set-size': 'warn',
|
|
156
|
+
'unicorn/prefer-single-call': ['warn', {
|
|
157
|
+
ignore: ['readable', 'this', 'this.stream']
|
|
158
|
+
}],
|
|
159
|
+
'unicorn/prefer-spread': 'off',
|
|
160
|
+
'unicorn/prefer-string-raw': 'off',
|
|
161
|
+
'unicorn/prefer-string-replace-all': 'off',
|
|
162
|
+
'unicorn/prefer-string-slice': 'warn',
|
|
163
|
+
'unicorn/prefer-string-starts-ends-with': 'warn',
|
|
164
|
+
'unicorn/prefer-string-trim-start-end': 'warn',
|
|
165
|
+
'unicorn/prefer-structured-clone': 'off',
|
|
166
|
+
'unicorn/prefer-switch': ['error', {
|
|
167
|
+
minimumCases: 3,
|
|
168
|
+
emptyDefaultCase: 'do-nothing-comment'
|
|
169
|
+
}],
|
|
170
|
+
'unicorn/prefer-ternary': 'off',
|
|
171
|
+
'unicorn/prefer-top-level-await': 'off',
|
|
172
|
+
'unicorn/prefer-type-error': 'warn',
|
|
173
|
+
'unicorn/prevent-abbreviations': ['warn', unicornPreventAbbreviations()],
|
|
174
|
+
'unicorn/relative-url-style': ['warn', 'always'],
|
|
175
|
+
'unicorn/require-array-join-separator': 'warn',
|
|
176
|
+
'unicorn/require-number-to-fixed-digits-argument': 'warn',
|
|
177
|
+
'unicorn/require-post-message-target-origin': 'error',
|
|
178
|
+
'unicorn/string-content': 'off',
|
|
179
|
+
'unicorn/switch-case-braces': 'off',
|
|
180
|
+
'unicorn/template-indent': 'warn',
|
|
181
|
+
'unicorn/text-encoding-identifier-case': 'error',
|
|
182
|
+
'unicorn/throw-new-error': 'warn'
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|