eslint-config-airbnb-extended 2.3.3 → 3.0.0-beta-3
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.md +3 -3
- package/dist/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/_virtual/rolldown_runtime.js +1 -0
- package/dist/configs/base/config.cjs +1 -0
- package/dist/configs/base/config.js +1 -26
- package/dist/configs/base/configExtended.cjs +1 -0
- package/dist/configs/base/configExtended.js +1 -9
- package/dist/configs/base/index.cjs +1 -0
- package/dist/configs/base/index.js +1 -18
- package/dist/configs/base/recommended.cjs +1 -0
- package/dist/configs/base/recommended.js +1 -12
- package/dist/configs/base/typescript.cjs +1 -0
- package/dist/configs/base/typescript.js +1 -12
- package/dist/configs/index.cjs +1 -0
- package/dist/configs/index.js +1 -21
- package/dist/configs/next/config.cjs +1 -0
- package/dist/configs/next/config.js +1 -12
- package/dist/configs/next/index.cjs +1 -0
- package/dist/configs/next/index.js +1 -18
- package/dist/configs/next/recommended.cjs +1 -0
- package/dist/configs/next/recommended.js +1 -14
- package/dist/configs/next/typescript.cjs +1 -0
- package/dist/configs/next/typescript.js +1 -8
- package/dist/configs/node/config.cjs +1 -0
- package/dist/configs/node/config.js +1 -16
- package/dist/configs/node/index.cjs +1 -0
- package/dist/configs/node/index.js +1 -12
- package/dist/configs/node/recommended.cjs +1 -0
- package/dist/configs/node/recommended.js +1 -12
- package/dist/configs/react/config.cjs +1 -0
- package/dist/configs/react/config.js +1 -16
- package/dist/configs/react/configExtended.cjs +1 -0
- package/dist/configs/react/configExtended.js +1 -9
- package/dist/configs/react/index.cjs +1 -0
- package/dist/configs/react/index.js +1 -18
- package/dist/configs/react/recommended.cjs +1 -0
- package/dist/configs/react/recommended.js +1 -12
- package/dist/configs/react/typescript.cjs +1 -0
- package/dist/configs/react/typescript.js +1 -8
- package/dist/configs/typescript/config.cjs +1 -0
- package/dist/configs/typescript/config.js +1 -18
- package/dist/configs/typescript/configExtended.cjs +1 -0
- package/dist/configs/typescript/configExtended.js +1 -9
- package/dist/extensions/base/index.cjs +1 -0
- package/dist/extensions/base/index.js +1 -15
- package/dist/extensions/base/recommended.cjs +1 -0
- package/dist/extensions/base/recommended.js +1 -31
- package/dist/extensions/base/typescript.cjs +1 -0
- package/dist/extensions/base/typescript.js +1 -19
- package/dist/extensions/index.cjs +1 -0
- package/dist/extensions/index.js +1 -21
- package/dist/extensions/next/index.cjs +1 -0
- package/dist/extensions/next/index.js +1 -12
- package/dist/extensions/next/recommended.cjs +1 -0
- package/dist/extensions/next/recommended.js +1 -21
- package/dist/extensions/node/index.cjs +1 -0
- package/dist/extensions/node/index.js +1 -12
- package/dist/extensions/node/recommended.cjs +1 -0
- package/dist/extensions/node/recommended.js +1 -39
- package/dist/extensions/react/index.cjs +1 -0
- package/dist/extensions/react/index.js +1 -15
- package/dist/extensions/react/recommended.cjs +1 -0
- package/dist/extensions/react/recommended.js +1 -72
- package/dist/extensions/react/typescript.cjs +1 -0
- package/dist/extensions/react/typescript.js +1 -29
- package/dist/helpers/getDevDepsList.cjs +1 -0
- package/dist/helpers/getDevDepsList.js +1 -32
- package/dist/helpers/getImportSettings.cjs +1 -0
- package/dist/helpers/getImportSettings.js +1 -42
- package/dist/helpers/getStylisticLegacyConfig.cjs +1 -0
- package/dist/helpers/getStylisticLegacyConfig.js +1 -29
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +37 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +1 -18
- package/dist/legacy/configs/base/config.cjs +1 -0
- package/dist/legacy/configs/base/config.js +1 -24
- package/dist/legacy/configs/base/index.cjs +1 -0
- package/dist/legacy/configs/base/index.js +1 -18
- package/dist/legacy/configs/base/legacy.cjs +1 -0
- package/dist/legacy/configs/base/legacy.js +1 -46
- package/dist/legacy/configs/base/recommended.cjs +1 -0
- package/dist/legacy/configs/base/recommended.js +1 -21
- package/dist/legacy/configs/base/typescript.cjs +1 -0
- package/dist/legacy/configs/base/typescript.js +1 -8
- package/dist/legacy/configs/index.cjs +1 -0
- package/dist/legacy/configs/index.js +1 -15
- package/dist/legacy/configs/react/base.cjs +1 -0
- package/dist/legacy/configs/react/base.js +1 -8
- package/dist/legacy/configs/react/config.cjs +1 -0
- package/dist/legacy/configs/react/config.js +1 -14
- package/dist/legacy/configs/react/hooks.cjs +1 -0
- package/dist/legacy/configs/react/hooks.js +1 -8
- package/dist/legacy/configs/react/index.cjs +1 -0
- package/dist/legacy/configs/react/index.js +1 -24
- package/dist/legacy/configs/react/legacy.cjs +1 -0
- package/dist/legacy/configs/react/legacy.js +1 -8
- package/dist/legacy/configs/react/recommended.cjs +1 -0
- package/dist/legacy/configs/react/recommended.js +1 -13
- package/dist/legacy/configs/react/typescript.cjs +1 -0
- package/dist/legacy/configs/react/typescript.js +1 -47
- package/dist/legacy/configs/typescript/config.cjs +1 -0
- package/dist/legacy/configs/typescript/config.js +1 -14
- package/dist/legacy/rules/best-practices.cjs +1 -0
- package/dist/legacy/rules/best-practices.js +1 -433
- package/dist/legacy/rules/errors.cjs +1 -0
- package/dist/legacy/rules/errors.js +1 -167
- package/dist/legacy/rules/es6.cjs +1 -0
- package/dist/legacy/rules/es6.js +1 -206
- package/dist/legacy/rules/imports.cjs +1 -0
- package/dist/legacy/rules/imports.js +1 -258
- package/dist/legacy/rules/index.cjs +1 -0
- package/dist/legacy/rules/index.js +1 -18
- package/dist/legacy/rules/node.cjs +1 -0
- package/dist/legacy/rules/node.js +1 -35
- package/dist/legacy/rules/react/react.cjs +1 -0
- package/dist/legacy/rules/react/react.js +1 -663
- package/dist/legacy/rules/react/reactHooks.cjs +1 -0
- package/dist/legacy/rules/react/reactHooks.js +1 -30
- package/dist/legacy/rules/react/reactJsxA11y.cjs +1 -0
- package/dist/legacy/rules/react/reactJsxA11y.js +1 -276
- package/dist/legacy/rules/strict.cjs +1 -0
- package/dist/legacy/rules/strict.js +1 -12
- package/dist/legacy/rules/style.cjs +1 -0
- package/dist/legacy/rules/style.js +1 -655
- package/dist/legacy/rules/typescript/typescript.cjs +1 -0
- package/dist/legacy/rules/typescript/typescript.js +1 -231
- package/dist/legacy/rules/typescript/typescriptOverrides.cjs +1 -0
- package/dist/legacy/rules/typescript/typescriptOverrides.js +1 -36
- package/dist/legacy/rules/typescript/typescriptSettings.cjs +1 -0
- package/dist/legacy/rules/typescript/typescriptSettings.js +1 -27
- package/dist/legacy/rules/variables.cjs +1 -0
- package/dist/legacy/rules/variables.js +1 -68
- package/dist/legacy.cjs +1 -0
- package/dist/legacy.d.cts +17 -0
- package/dist/legacy.d.ts +17 -0
- package/dist/legacy.js +1 -14
- package/dist/plugins/importXPlugin.cjs +1 -0
- package/dist/plugins/importXPlugin.js +1 -15
- package/dist/plugins/index.cjs +1 -0
- package/dist/plugins/index.js +1 -33
- package/dist/plugins/nextPlugin.cjs +1 -0
- package/dist/plugins/nextPlugin.js +1 -13
- package/dist/plugins/nodePlugin.cjs +1 -0
- package/dist/plugins/nodePlugin.js +1 -15
- package/dist/plugins/reactA11yPlugin.cjs +1 -0
- package/dist/plugins/reactA11yPlugin.js +1 -15
- package/dist/plugins/reactHooksPlugin.cjs +1 -0
- package/dist/plugins/reactHooksPlugin.js +1 -15
- package/dist/plugins/reactPlugin.cjs +1 -0
- package/dist/plugins/reactPlugin.js +1 -15
- package/dist/plugins/stylisticPlugin.cjs +1 -0
- package/dist/plugins/stylisticPlugin.js +1 -15
- package/dist/plugins/typescriptEslintPlugin.cjs +1 -0
- package/dist/plugins/typescriptEslintPlugin.js +1 -15
- package/dist/rules/best-practices.cjs +1 -0
- package/dist/rules/best-practices.js +1 -396
- package/dist/rules/errors.cjs +1 -0
- package/dist/rules/errors.js +1 -145
- package/dist/rules/es6.cjs +1 -0
- package/dist/rules/es6.js +1 -157
- package/dist/rules/imports.cjs +1 -0
- package/dist/rules/imports.js +1 -202
- package/dist/rules/importsStrict.cjs +1 -0
- package/dist/rules/importsStrict.js +1 -66
- package/dist/rules/index.cjs +1 -0
- package/dist/rules/index.js +1 -24
- package/dist/rules/next/nextBase.cjs +1 -0
- package/dist/rules/next/nextBase.js +1 -73
- package/dist/rules/next/nextCoreWebVitals.cjs +1 -0
- package/dist/rules/next/nextCoreWebVitals.js +1 -16
- package/dist/rules/node/nodeBase.cjs +1 -0
- package/dist/rules/node/nodeBase.js +1 -127
- package/dist/rules/node/nodeGlobals.cjs +1 -0
- package/dist/rules/node/nodeGlobals.js +1 -31
- package/dist/rules/node/nodeNoUnsupportedFeatures.cjs +1 -0
- package/dist/rules/node/nodeNoUnsupportedFeatures.js +1 -19
- package/dist/rules/node/nodePromises.cjs +1 -0
- package/dist/rules/node/nodePromises.js +1 -16
- package/dist/rules/react/react.cjs +1 -0
- package/dist/rules/react/react.js +1 -590
- package/dist/rules/react/reactHooks.cjs +1 -0
- package/dist/rules/react/reactHooks.js +1 -23
- package/dist/rules/react/reactJsxA11y.cjs +1 -0
- package/dist/rules/react/reactJsxA11y.js +1 -262
- package/dist/rules/react/reactStrict.cjs +1 -0
- package/dist/rules/react/reactStrict.js +1 -80
- package/dist/rules/react/reactStylistic.cjs +1 -0
- package/dist/rules/react/reactStylistic.js +1 -96
- package/dist/rules/strict.cjs +1 -0
- package/dist/rules/strict.js +1 -12
- package/dist/rules/style.cjs +1 -0
- package/dist/rules/style.js +1 -205
- package/dist/rules/stylistic.cjs +1 -0
- package/dist/rules/stylistic.js +1 -524
- package/dist/rules/typescript/typescriptBase.cjs +1 -0
- package/dist/rules/typescript/typescriptBase.js +1 -32
- package/dist/rules/typescript/typescriptEslint.cjs +1 -0
- package/dist/rules/typescript/typescriptEslint.js +1 -507
- package/dist/rules/typescript/typescriptEslintStrict.cjs +1 -0
- package/dist/rules/typescript/typescriptEslintStrict.js +1 -193
- package/dist/rules/typescript/typescriptImports.cjs +1 -0
- package/dist/rules/typescript/typescriptImports.js +1 -40
- package/dist/rules/typescript/typescriptStylistic.cjs +1 -0
- package/dist/rules/typescript/typescriptStylistic.js +1 -150
- package/dist/rules/variables.cjs +1 -0
- package/dist/rules/variables.js +1 -67
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.js +1 -18
- package/package.json +17 -17
- package/dist/@types/index.d.ts +0 -32
- package/dist/@types/legacy.d.ts +0 -12
- package/dist/rules/stylisticPlus.js +0 -16
- package/dist/rules/typescript/typescriptStylisticPlus.js +0 -16
|
@@ -1,507 +1 @@
|
|
|
1
|
-
"use
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.deprecatedTypescriptEslintRules = void 0;
|
|
7
|
-
const best_practices_1 = __importDefault(require("../../rules/best-practices"));
|
|
8
|
-
const es6_1 = __importDefault(require("../../rules/es6"));
|
|
9
|
-
const style_1 = __importDefault(require("../../rules/style"));
|
|
10
|
-
const variables_1 = __importDefault(require("../../rules/variables"));
|
|
11
|
-
const utils_1 = require("../../utils");
|
|
12
|
-
const typescriptEslintRules = {
|
|
13
|
-
name: 'airbnb/config/typescript/typescript-eslint',
|
|
14
|
-
files: utils_1.tsFiles,
|
|
15
|
-
languageOptions: {
|
|
16
|
-
parserOptions: {
|
|
17
|
-
projectService: true,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
// Require that function overload signatures be consecutive.
|
|
22
|
-
// https://typescript-eslint.io/rules/adjacent-overload-signatures
|
|
23
|
-
// Recommended in stylistic by the TypeScript Eslint team
|
|
24
|
-
'@typescript-eslint/adjacent-overload-signatures': 'off',
|
|
25
|
-
// Require consistently using either T[] or Array<T> for arrays.
|
|
26
|
-
// https://typescript-eslint.io/rules/array-type
|
|
27
|
-
'@typescript-eslint/array-type': [
|
|
28
|
-
'error',
|
|
29
|
-
{
|
|
30
|
-
default: 'array',
|
|
31
|
-
readonly: 'array',
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
// Disallow awaiting a value that is not a Thenable.
|
|
35
|
-
// https://typescript-eslint.io/rules/await-thenable
|
|
36
|
-
'@typescript-eslint/await-thenable': 'off',
|
|
37
|
-
// Disallow @ts-<directive> comments or require descriptions after directives.
|
|
38
|
-
// https://typescript-eslint.io/rules/ban-ts-comment
|
|
39
|
-
// Recommended by the TypeScript Eslint team
|
|
40
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
41
|
-
// Disallow // tslint:<rule-flag> comments.
|
|
42
|
-
// https://typescript-eslint.io/rules/ban-tslint-comment
|
|
43
|
-
'@typescript-eslint/ban-tslint-comment': 'error',
|
|
44
|
-
// Enforce that literals on classes are exposed in a consistent style.
|
|
45
|
-
// https://typescript-eslint.io/rules/class-literal-property-style
|
|
46
|
-
'@typescript-eslint/class-literal-property-style': ['error', 'fields'],
|
|
47
|
-
// Enforce that class methods utilize this.
|
|
48
|
-
// https://typescript-eslint.io/rules/class-methods-use-this
|
|
49
|
-
'@typescript-eslint/class-methods-use-this': 'off',
|
|
50
|
-
// Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.
|
|
51
|
-
// https://typescript-eslint.io/rules/consistent-generic-constructors
|
|
52
|
-
// Recommended in stylistic by the TypeScript Eslint team
|
|
53
|
-
'@typescript-eslint/consistent-generic-constructors': 'off',
|
|
54
|
-
// Require or disallow the Record type.
|
|
55
|
-
// https://typescript-eslint.io/rules/consistent-indexed-object-style
|
|
56
|
-
'@typescript-eslint/consistent-indexed-object-style': 'error',
|
|
57
|
-
// Require return statements to either always or never specify values.
|
|
58
|
-
// https://typescript-eslint.io/rules/consistent-return
|
|
59
|
-
// Not recommended by the TypeScript Eslint team due to "noImplicitReturns" TypeScript rule
|
|
60
|
-
'@typescript-eslint/consistent-return': 'off',
|
|
61
|
-
// Enforce consistent usage of type assertions.
|
|
62
|
-
// https://typescript-eslint.io/rules/consistent-type-assertions
|
|
63
|
-
// Recommended in stylistic by the TypeScript Eslint team
|
|
64
|
-
'@typescript-eslint/consistent-type-assertions': 'off',
|
|
65
|
-
// Enforce type definitions to consistently use either interface or type.
|
|
66
|
-
// https://typescript-eslint.io/rules/consistent-type-definitions
|
|
67
|
-
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
68
|
-
// Enforce consistent usage of type exports.
|
|
69
|
-
// https://typescript-eslint.io/rules/consistent-type-exports
|
|
70
|
-
'@typescript-eslint/consistent-type-exports': 'off',
|
|
71
|
-
// Enforce consistent usage of type imports.
|
|
72
|
-
// https://typescript-eslint.io/rules/consistent-type-imports
|
|
73
|
-
'@typescript-eslint/consistent-type-imports': 'off',
|
|
74
|
-
// Enforce default parameters to be last.
|
|
75
|
-
// https://typescript-eslint.io/rules/default-param-last
|
|
76
|
-
'default-param-last': 'off',
|
|
77
|
-
'@typescript-eslint/default-param-last': best_practices_1.default.rules['default-param-last'],
|
|
78
|
-
// Enforce dot notation whenever possible.
|
|
79
|
-
// https://typescript-eslint.io/rules/dot-notation
|
|
80
|
-
'dot-notation': 'off',
|
|
81
|
-
'@typescript-eslint/dot-notation': [
|
|
82
|
-
best_practices_1.default.rules['dot-notation'][0],
|
|
83
|
-
Object.assign(Object.assign({}, best_practices_1.default.rules['dot-notation'][1]), { allowPrivateClassPropertyAccess: false, allowProtectedClassPropertyAccess: false, allowIndexSignaturePropertyAccess: false }),
|
|
84
|
-
],
|
|
85
|
-
// Require explicit return types on functions and class methods.
|
|
86
|
-
// https://typescript-eslint.io/rules/explicit-function-return-type
|
|
87
|
-
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
88
|
-
// Require explicit accessibility modifiers on class properties and methods.
|
|
89
|
-
// https://typescript-eslint.io/rules/explicit-member-accessibility
|
|
90
|
-
'@typescript-eslint/explicit-member-accessibility': 'off',
|
|
91
|
-
// Require explicit return and argument types on exported functions' and classes' public class methods.
|
|
92
|
-
// https://typescript-eslint.io/rules/explicit-module-boundary-types
|
|
93
|
-
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
94
|
-
// Require or disallow initialization in variable declarations.
|
|
95
|
-
// https://typescript-eslint.io/rules/init-declarations
|
|
96
|
-
'@typescript-eslint/init-declarations': 'off',
|
|
97
|
-
// Enforce a maximum number of parameters in function definitions.
|
|
98
|
-
// https://typescript-eslint.io/rules/max-params
|
|
99
|
-
'@typescript-eslint/max-params': 'off',
|
|
100
|
-
// Require a consistent member declaration order.
|
|
101
|
-
// https://typescript-eslint.io/rules/member-ordering
|
|
102
|
-
// Not recommended by the TypeScript Eslint team due to "eslint-plugin-perfectionist"
|
|
103
|
-
'@typescript-eslint/member-ordering': 'off',
|
|
104
|
-
// Enforce using a particular method signature syntax.
|
|
105
|
-
// https://typescript-eslint.io/rules/method-signature-style
|
|
106
|
-
'@typescript-eslint/method-signature-style': 'off',
|
|
107
|
-
// Enforce naming conventions for everything across a codebase.
|
|
108
|
-
// https://typescript-eslint.io/rules/naming-convention
|
|
109
|
-
camelcase: 'off',
|
|
110
|
-
'@typescript-eslint/naming-convention': [
|
|
111
|
-
'error',
|
|
112
|
-
{
|
|
113
|
-
selector: 'variable',
|
|
114
|
-
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
selector: 'function',
|
|
118
|
-
format: ['camelCase', 'PascalCase'],
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
selector: 'typeLike',
|
|
122
|
-
format: ['PascalCase'],
|
|
123
|
-
},
|
|
124
|
-
],
|
|
125
|
-
// Disallow generic Array constructors.
|
|
126
|
-
// https://typescript-eslint.io/rules/no-array-constructor
|
|
127
|
-
'no-array-constructor': 'off',
|
|
128
|
-
'@typescript-eslint/no-array-constructor': style_1.default.rules['no-array-constructor'],
|
|
129
|
-
// Disallow using the delete operator on array values.
|
|
130
|
-
// https://typescript-eslint.io/rules/no-array-delete
|
|
131
|
-
'@typescript-eslint/no-array-delete': 'off',
|
|
132
|
-
// Require .toString() and .toLocaleString() to only be called on objects which provide useful information when stringified.
|
|
133
|
-
// https://typescript-eslint.io/rules/no-base-to-string
|
|
134
|
-
'@typescript-eslint/no-base-to-string': 'off',
|
|
135
|
-
// Disallow non-null assertion in locations that may be confusing.
|
|
136
|
-
// https://typescript-eslint.io/rules/no-confusing-non-null-assertion
|
|
137
|
-
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
|
|
138
|
-
// Require expressions of type void to appear in statement position.
|
|
139
|
-
// https://typescript-eslint.io/rules/no-confusing-void-expression
|
|
140
|
-
'@typescript-eslint/no-confusing-void-expression': 'off',
|
|
141
|
-
// Disallow using code marked as @deprecated.
|
|
142
|
-
// https://typescript-eslint.io/rules/no-deprecated
|
|
143
|
-
'@typescript-eslint/no-deprecated': 'off',
|
|
144
|
-
// Disallow duplicate class members.
|
|
145
|
-
// https://typescript-eslint.io/rules/no-dupe-class-members
|
|
146
|
-
// Not recommended by the TypeScript Eslint team
|
|
147
|
-
'@typescript-eslint/no-dupe-class-members': 'off',
|
|
148
|
-
// Disallow duplicate enum member values.
|
|
149
|
-
// https://typescript-eslint.io/rules/no-duplicate-enum-values
|
|
150
|
-
'@typescript-eslint/no-duplicate-enum-values': 'error',
|
|
151
|
-
// Disallow duplicate constituents of union or intersection types.
|
|
152
|
-
// https://typescript-eslint.io/rules/no-duplicate-type-constituents
|
|
153
|
-
'@typescript-eslint/no-duplicate-type-constituents': 'off',
|
|
154
|
-
// Disallow using the delete operator on computed key expressions.
|
|
155
|
-
// https://typescript-eslint.io/rules/no-dynamic-delete
|
|
156
|
-
'@typescript-eslint/no-dynamic-delete': 'off',
|
|
157
|
-
// Disallow empty functions.
|
|
158
|
-
// https://typescript-eslint.io/rules/no-empty-function
|
|
159
|
-
'no-empty-function': 'off',
|
|
160
|
-
'@typescript-eslint/no-empty-function': best_practices_1.default.rules['no-empty-function'],
|
|
161
|
-
// Disallow accidentally using the "empty object" type.
|
|
162
|
-
// https://typescript-eslint.io/rules/no-empty-object-type
|
|
163
|
-
'@typescript-eslint/no-empty-object-type': [
|
|
164
|
-
'error',
|
|
165
|
-
{
|
|
166
|
-
allowInterfaces: 'never',
|
|
167
|
-
allowObjectTypes: 'never',
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
// Disallow the any type.
|
|
171
|
-
// https://typescript-eslint.io/rules/no-explicit-any
|
|
172
|
-
// Recommended by the TypeScript Eslint team
|
|
173
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
174
|
-
// Disallow extra non-null assertions.
|
|
175
|
-
// https://typescript-eslint.io/rules/no-extra-non-null-assertion
|
|
176
|
-
'@typescript-eslint/no-extra-non-null-assertion': 'error',
|
|
177
|
-
// Disallow classes used as namespaces.
|
|
178
|
-
// https://typescript-eslint.io/rules/no-extraneous-class
|
|
179
|
-
'@typescript-eslint/no-extraneous-class': 'off',
|
|
180
|
-
// Require Promise-like statements to be handled appropriately.
|
|
181
|
-
// https://typescript-eslint.io/rules/no-floating-promises
|
|
182
|
-
'@typescript-eslint/no-floating-promises': 'off',
|
|
183
|
-
// Disallow iterating over an array with a for-in loop.
|
|
184
|
-
// https://typescript-eslint.io/rules/no-for-in-array
|
|
185
|
-
'@typescript-eslint/no-for-in-array': 'error',
|
|
186
|
-
// Disallow the use of eval()-like functions.
|
|
187
|
-
// https://typescript-eslint.io/rules/no-implied-eval
|
|
188
|
-
'no-implied-eval': 'off',
|
|
189
|
-
'no-new-func': 'off',
|
|
190
|
-
'@typescript-eslint/no-implied-eval': best_practices_1.default.rules['no-implied-eval'],
|
|
191
|
-
// Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
|
|
192
|
-
// https://typescript-eslint.io/rules/no-import-type-side-effects
|
|
193
|
-
'@typescript-eslint/no-import-type-side-effects': 'off',
|
|
194
|
-
// Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.
|
|
195
|
-
// https://typescript-eslint.io/rules/no-inferrable-types
|
|
196
|
-
'@typescript-eslint/no-inferrable-types': [
|
|
197
|
-
'error',
|
|
198
|
-
{
|
|
199
|
-
ignoreParameters: false,
|
|
200
|
-
ignoreProperties: false,
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
// Disallow this keywords outside of classes or class-like objects.
|
|
204
|
-
// https://typescript-eslint.io/rules/no-invalid-this
|
|
205
|
-
'@typescript-eslint/no-invalid-this': 'off',
|
|
206
|
-
// Disallow void type outside of generic or return types.
|
|
207
|
-
// https://typescript-eslint.io/rules/no-invalid-void-type
|
|
208
|
-
'@typescript-eslint/no-invalid-void-type': 'off',
|
|
209
|
-
// Disallow function declarations that contain unsafe references inside loop statements.
|
|
210
|
-
// https://typescript-eslint.io/rules/no-loop-func
|
|
211
|
-
'no-loop-func': 'off',
|
|
212
|
-
'@typescript-eslint/no-loop-func': best_practices_1.default.rules['no-loop-func'],
|
|
213
|
-
// Disallow magic numbers.
|
|
214
|
-
// https://typescript-eslint.io/rules/no-magic-numbers
|
|
215
|
-
'@typescript-eslint/no-magic-numbers': 'off',
|
|
216
|
-
// Disallow the void operator except when used to discard a value.
|
|
217
|
-
// https://typescript-eslint.io/rules/no-meaningless-void-operator
|
|
218
|
-
'@typescript-eslint/no-meaningless-void-operator': 'off',
|
|
219
|
-
// Enforce valid definition of new and constructor.
|
|
220
|
-
// https://typescript-eslint.io/rules/no-misused-new
|
|
221
|
-
'@typescript-eslint/no-misused-new': 'error',
|
|
222
|
-
// Disallow Promises in places not designed to handle them.
|
|
223
|
-
// https://typescript-eslint.io/rules/no-misused-promises
|
|
224
|
-
'@typescript-eslint/no-misused-promises': 'off',
|
|
225
|
-
// Disallow using the spread operator when it might cause unexpected behavior.
|
|
226
|
-
// https://typescript-eslint.io/rules/no-misused-spread
|
|
227
|
-
'@typescript-eslint/no-misused-spread': 'off',
|
|
228
|
-
// Disallow enums from having both number and string members.
|
|
229
|
-
// https://typescript-eslint.io/rules/no-mixed-enums
|
|
230
|
-
'@typescript-eslint/no-mixed-enums': 'error',
|
|
231
|
-
// Disallow TypeScript namespaces.
|
|
232
|
-
// https://typescript-eslint.io/rules/no-namespace
|
|
233
|
-
'@typescript-eslint/no-namespace': [
|
|
234
|
-
'error',
|
|
235
|
-
{
|
|
236
|
-
allowDeclarations: false,
|
|
237
|
-
allowDefinitionFiles: true,
|
|
238
|
-
},
|
|
239
|
-
],
|
|
240
|
-
// Disallow non-null assertions in the left operand of a nullish coalescing operator.
|
|
241
|
-
// https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing
|
|
242
|
-
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'off',
|
|
243
|
-
// Disallow non-null assertions after an optional chain expression.
|
|
244
|
-
// https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain
|
|
245
|
-
// Recommended by the TypeScript Eslint team
|
|
246
|
-
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
|
247
|
-
// Disallow non-null assertions using the ! postfix operator.
|
|
248
|
-
// https://typescript-eslint.io/rules/no-non-null-assertion
|
|
249
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
250
|
-
// Disallow variable redeclaration.
|
|
251
|
-
// https://typescript-eslint.io/rules/no-redeclare
|
|
252
|
-
'@typescript-eslint/no-redeclare': 'off',
|
|
253
|
-
// Disallow members of unions and intersections that do nothing or override type information.
|
|
254
|
-
// https://typescript-eslint.io/rules/no-redundant-type-constituents
|
|
255
|
-
'@typescript-eslint/no-redundant-type-constituents': 'off',
|
|
256
|
-
// Disallow invocation of require().
|
|
257
|
-
// https://typescript-eslint.io/rules/no-require-imports
|
|
258
|
-
'@typescript-eslint/no-require-imports': [
|
|
259
|
-
'error',
|
|
260
|
-
{
|
|
261
|
-
allow: [],
|
|
262
|
-
allowAsImport: false,
|
|
263
|
-
},
|
|
264
|
-
],
|
|
265
|
-
// Disallow specified modules when loaded by import.
|
|
266
|
-
// https://typescript-eslint.io/rules/no-restricted-imports
|
|
267
|
-
'@typescript-eslint/no-restricted-imports': 'off',
|
|
268
|
-
// Disallow certain types.
|
|
269
|
-
// https://typescript-eslint.io/rules/no-restricted-types
|
|
270
|
-
'@typescript-eslint/no-restricted-types': 'off',
|
|
271
|
-
// Disallow variable declarations from shadowing variables declared in the outer scope.
|
|
272
|
-
// https://typescript-eslint.io/rules/no-shadow
|
|
273
|
-
'no-shadow': 'off',
|
|
274
|
-
'@typescript-eslint/no-shadow': variables_1.default.rules['no-shadow'],
|
|
275
|
-
// Disallow aliasing this.
|
|
276
|
-
// https://typescript-eslint.io/rules/no-this-alias
|
|
277
|
-
'@typescript-eslint/no-this-alias': [
|
|
278
|
-
'error',
|
|
279
|
-
{
|
|
280
|
-
allowDestructuring: true,
|
|
281
|
-
allowedNames: ['self', 'that'],
|
|
282
|
-
},
|
|
283
|
-
],
|
|
284
|
-
// Disallow unnecessary equality comparisons against boolean literals.
|
|
285
|
-
// https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
|
|
286
|
-
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
|
|
287
|
-
// Disallow conditionals where the type is always truthy or always falsy.
|
|
288
|
-
// https://typescript-eslint.io/rules/no-unnecessary-condition
|
|
289
|
-
'@typescript-eslint/no-unnecessary-condition': 'off',
|
|
290
|
-
// Disallow unnecessary assignment of constructor property parameter.
|
|
291
|
-
// https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment
|
|
292
|
-
'@typescript-eslint/no-unnecessary-parameter-property-assignment': 'error',
|
|
293
|
-
// Disallow unnecessary namespace qualifiers.
|
|
294
|
-
// https://typescript-eslint.io/rules/no-unnecessary-qualifier
|
|
295
|
-
'@typescript-eslint/no-unnecessary-qualifier': 'error',
|
|
296
|
-
// Disallow unnecessary template expressions.
|
|
297
|
-
// https://typescript-eslint.io/rules/no-unnecessary-template-expression
|
|
298
|
-
'@typescript-eslint/no-unnecessary-template-expression': 'error',
|
|
299
|
-
// Disallow type arguments that are equal to the default.
|
|
300
|
-
// https://typescript-eslint.io/rules/no-unnecessary-type-arguments
|
|
301
|
-
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
|
|
302
|
-
// Disallow type assertions that do not change the type of an expression.
|
|
303
|
-
// https://typescript-eslint.io/rules/no-unnecessary-type-assertion
|
|
304
|
-
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
|
|
305
|
-
// Disallow unnecessary constraints on generic types.
|
|
306
|
-
// https://typescript-eslint.io/rules/no-unnecessary-type-constraint
|
|
307
|
-
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
|
|
308
|
-
// Disallow conversion idioms when they do not change the type or value of the expression.
|
|
309
|
-
// https://typescript-eslint.io/rules/no-unnecessary-type-conversion
|
|
310
|
-
'@typescript-eslint/no-unnecessary-type-conversion': 'off',
|
|
311
|
-
// Disallow type parameters that aren't used multiple times.
|
|
312
|
-
// https://typescript-eslint.io/rules/no-unnecessary-type-parameters
|
|
313
|
-
'@typescript-eslint/no-unnecessary-type-parameters': 'off',
|
|
314
|
-
// Disallow calling a function with a value with type any.
|
|
315
|
-
// https://typescript-eslint.io/rules/no-unsafe-argument
|
|
316
|
-
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
317
|
-
// Disallow assigning a value with type any to variables and properties.
|
|
318
|
-
// https://typescript-eslint.io/rules/no-unsafe-assignment
|
|
319
|
-
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
320
|
-
// Disallow calling a value with type any.
|
|
321
|
-
// https://typescript-eslint.io/rules/no-unsafe-call
|
|
322
|
-
'@typescript-eslint/no-unsafe-call': 'off',
|
|
323
|
-
// Disallow unsafe declaration merging.
|
|
324
|
-
// https://typescript-eslint.io/rules/no-unsafe-declaration-merging
|
|
325
|
-
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
|
|
326
|
-
// Disallow comparing an enum value with a non-enum value.
|
|
327
|
-
// https://typescript-eslint.io/rules/no-unsafe-enum-comparison
|
|
328
|
-
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
|
|
329
|
-
// Disallow using the unsafe built-in Function type.
|
|
330
|
-
// https://typescript-eslint.io/rules/no-unsafe-function-type
|
|
331
|
-
'@typescript-eslint/no-unsafe-function-type': 'error',
|
|
332
|
-
// Disallow member access on a value with type any.
|
|
333
|
-
// https://typescript-eslint.io/rules/no-unsafe-member-access
|
|
334
|
-
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
335
|
-
// Disallow returning a value with type any from a function.
|
|
336
|
-
// https://typescript-eslint.io/rules/no-unsafe-return
|
|
337
|
-
'@typescript-eslint/no-unsafe-return': 'off',
|
|
338
|
-
// Disallow type assertions that narrow a type.
|
|
339
|
-
// https://typescript-eslint.io/rules/no-unsafe-type-assertion
|
|
340
|
-
'@typescript-eslint/no-unsafe-type-assertion': 'off',
|
|
341
|
-
// Require unary negation to take a number.
|
|
342
|
-
// https://typescript-eslint.io/rules/no-unsafe-unary-minus
|
|
343
|
-
'@typescript-eslint/no-unsafe-unary-minus': 'error',
|
|
344
|
-
// Disallow unused expressions.
|
|
345
|
-
// https://typescript-eslint.io/rules/no-unused-expressions
|
|
346
|
-
'no-unused-expressions': 'off',
|
|
347
|
-
'@typescript-eslint/no-unused-expressions': best_practices_1.default.rules['no-unused-expressions'],
|
|
348
|
-
// Disallow unused variables.
|
|
349
|
-
// https://typescript-eslint.io/rules/no-unused-vars
|
|
350
|
-
'no-unused-vars': 'off',
|
|
351
|
-
'@typescript-eslint/no-unused-vars': variables_1.default.rules['no-unused-vars'],
|
|
352
|
-
// Disallow the use of variables before they are defined.
|
|
353
|
-
// https://typescript-eslint.io/rules/no-use-before-define
|
|
354
|
-
'no-use-before-define': 'off',
|
|
355
|
-
'@typescript-eslint/no-use-before-define': variables_1.default.rules['no-use-before-define'],
|
|
356
|
-
// Disallow unnecessary constructors.
|
|
357
|
-
// https://typescript-eslint.io/rules/no-useless-constructor
|
|
358
|
-
'no-useless-constructor': 'off',
|
|
359
|
-
'@typescript-eslint/no-useless-constructor': es6_1.default.rules['no-useless-constructor'],
|
|
360
|
-
// Disallow empty exports that don't change anything in a module file.
|
|
361
|
-
// https://typescript-eslint.io/rules/no-useless-empty-export
|
|
362
|
-
'@typescript-eslint/no-useless-empty-export': 'off',
|
|
363
|
-
// Disallow using confusing built-in primitive class wrappers.
|
|
364
|
-
// https://typescript-eslint.io/rules/no-wrapper-object-types
|
|
365
|
-
'@typescript-eslint/no-wrapper-object-types': 'error',
|
|
366
|
-
// Enforce non-null assertions over explicit type assertions.
|
|
367
|
-
// https://typescript-eslint.io/rules/non-nullable-type-assertion-style
|
|
368
|
-
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
|
|
369
|
-
// Disallow throwing non-Error values as exceptions.
|
|
370
|
-
// https://typescript-eslint.io/rules/only-throw-error
|
|
371
|
-
'no-throw-literal': 'off',
|
|
372
|
-
'@typescript-eslint/only-throw-error': best_practices_1.default.rules['no-throw-literal'],
|
|
373
|
-
// Require or disallow parameter properties in class constructors.
|
|
374
|
-
// https://typescript-eslint.io/rules/parameter-properties
|
|
375
|
-
'@typescript-eslint/parameter-properties': 'off',
|
|
376
|
-
// Enforce the use of as const over literal type.
|
|
377
|
-
// https://typescript-eslint.io/rules/prefer-as-const
|
|
378
|
-
'@typescript-eslint/prefer-as-const': 'error',
|
|
379
|
-
// Require destructuring from arrays and/or objects.
|
|
380
|
-
// https://typescript-eslint.io/rules/prefer-destructuring
|
|
381
|
-
'prefer-destructuring': 'off',
|
|
382
|
-
'@typescript-eslint/prefer-destructuring': es6_1.default.rules['prefer-destructuring'],
|
|
383
|
-
// Require each enum member value to be explicitly initialized.
|
|
384
|
-
// https://typescript-eslint.io/rules/prefer-enum-initializers
|
|
385
|
-
'@typescript-eslint/prefer-enum-initializers': 'off',
|
|
386
|
-
// Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.
|
|
387
|
-
// https://typescript-eslint.io/rules/prefer-find
|
|
388
|
-
'@typescript-eslint/prefer-find': 'error',
|
|
389
|
-
// Enforce the use of for-of loop over the standard for loop where possible.
|
|
390
|
-
// https://typescript-eslint.io/rules/prefer-for-of
|
|
391
|
-
// Recommended in stylistic by the TypeScript Eslint team
|
|
392
|
-
'@typescript-eslint/prefer-for-of': 'off',
|
|
393
|
-
// Enforce using function types instead of interfaces with call signatures.
|
|
394
|
-
// https://typescript-eslint.io/rules/prefer-function-type
|
|
395
|
-
'@typescript-eslint/prefer-function-type': 'error',
|
|
396
|
-
// Enforce includes method over indexOf method.
|
|
397
|
-
// https://typescript-eslint.io/rules/prefer-includes
|
|
398
|
-
'@typescript-eslint/prefer-includes': 'off',
|
|
399
|
-
// Require all enum members to be literal values.
|
|
400
|
-
// https://typescript-eslint.io/rules/prefer-literal-enum-member
|
|
401
|
-
'@typescript-eslint/prefer-literal-enum-member': 'off',
|
|
402
|
-
// Require using the namespace keyword over module keyword to declare custom TypeScript modules.
|
|
403
|
-
// https://typescript-eslint.io/rules/prefer-namespace-keyword
|
|
404
|
-
'@typescript-eslint/prefer-namespace-keyword': 'error',
|
|
405
|
-
// Enforce using the nullish coalescing operator instead of logical assignments or chaining.
|
|
406
|
-
// https://typescript-eslint.io/rules/prefer-nullish-coalescing
|
|
407
|
-
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
408
|
-
// Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
|
|
409
|
-
// https://typescript-eslint.io/rules/prefer-optional-chain
|
|
410
|
-
'@typescript-eslint/prefer-optional-chain': 'off',
|
|
411
|
-
// Require using Error objects as Promise rejection reasons.
|
|
412
|
-
// https://typescript-eslint.io/rules/prefer-promise-reject-errors
|
|
413
|
-
'@typescript-eslint/prefer-promise-reject-errors': 'off',
|
|
414
|
-
// Require private members to be marked as readonly if they're never modified outside of the constructor.
|
|
415
|
-
// https://typescript-eslint.io/rules/prefer-readonly
|
|
416
|
-
'@typescript-eslint/prefer-readonly': 'off',
|
|
417
|
-
// Require function parameters to be typed as readonly to prevent accidental mutation of inputs.
|
|
418
|
-
// https://typescript-eslint.io/rules/prefer-readonly-parameter-types
|
|
419
|
-
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
|
|
420
|
-
// Enforce using type parameter when calling Array#reduce instead of using a type assertion.
|
|
421
|
-
// https://typescript-eslint.io/rules/prefer-reduce-type-parameter
|
|
422
|
-
'@typescript-eslint/prefer-reduce-type-parameter': 'off',
|
|
423
|
-
// Enforce RegExp#exec over String#match if no global flag is provided.
|
|
424
|
-
// https://typescript-eslint.io/rules/prefer-regexp-exec
|
|
425
|
-
'@typescript-eslint/prefer-regexp-exec': 'off',
|
|
426
|
-
// Enforce that this is used when only this type is returned.
|
|
427
|
-
// https://typescript-eslint.io/rules/prefer-return-this-type
|
|
428
|
-
'@typescript-eslint/prefer-return-this-type': 'off',
|
|
429
|
-
// Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings.
|
|
430
|
-
// https://typescript-eslint.io/rules/prefer-string-starts-ends-with
|
|
431
|
-
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
|
|
432
|
-
// Require any function or method that returns a Promise to be marked async.
|
|
433
|
-
// https://typescript-eslint.io/rules/promise-function-async
|
|
434
|
-
'@typescript-eslint/promise-function-async': 'off',
|
|
435
|
-
// Enforce that get() types should be assignable to their equivalent set() type.
|
|
436
|
-
// https://typescript-eslint.io/rules/related-getter-setter-pairs
|
|
437
|
-
'@typescript-eslint/related-getter-setter-pairs': 'off',
|
|
438
|
-
// Require Array#sort and Array#toSorted calls to always provide a compareFunction.
|
|
439
|
-
// https://typescript-eslint.io/rules/require-array-sort-compare
|
|
440
|
-
'@typescript-eslint/require-array-sort-compare': 'off',
|
|
441
|
-
// Disallow async functions which do not return promises and have no await expression.
|
|
442
|
-
// https://typescript-eslint.io/rules/require-await
|
|
443
|
-
'@typescript-eslint/require-await': 'off',
|
|
444
|
-
// Require both operands of addition to be the same type and be bigint, number, or string.
|
|
445
|
-
// https://typescript-eslint.io/rules/restrict-plus-operands
|
|
446
|
-
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
447
|
-
// Enforce template literal expressions to be of string type.
|
|
448
|
-
// https://typescript-eslint.io/rules/restrict-template-expressions
|
|
449
|
-
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
450
|
-
// Enforce consistent awaiting of returned promises.
|
|
451
|
-
// https://typescript-eslint.io/rules/return-await
|
|
452
|
-
'@typescript-eslint/return-await': ['error', 'in-try-catch'],
|
|
453
|
-
// Disallow certain types in boolean expressions.
|
|
454
|
-
// https://typescript-eslint.io/rules/strict-boolean-expressions
|
|
455
|
-
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
456
|
-
// Require switch-case statements to be exhaustive.
|
|
457
|
-
// https://typescript-eslint.io/rules/switch-exhaustiveness-check
|
|
458
|
-
'@typescript-eslint/switch-exhaustiveness-check': 'off',
|
|
459
|
-
// Disallow certain triple slash directives in favor of ES6-style import declarations.
|
|
460
|
-
// https://typescript-eslint.io/rules/triple-slash-reference
|
|
461
|
-
'@typescript-eslint/triple-slash-reference': [
|
|
462
|
-
'error',
|
|
463
|
-
{
|
|
464
|
-
lib: 'always',
|
|
465
|
-
path: 'never',
|
|
466
|
-
types: 'prefer-import',
|
|
467
|
-
},
|
|
468
|
-
],
|
|
469
|
-
// Require type annotations in certain places.
|
|
470
|
-
// https://typescript-eslint.io/rules/typedef
|
|
471
|
-
'@typescript-eslint/typedef': 'off',
|
|
472
|
-
// Enforce unbound methods are called with their expected scope.
|
|
473
|
-
// https://typescript-eslint.io/rules/unbound-method
|
|
474
|
-
'@typescript-eslint/unbound-method': 'off',
|
|
475
|
-
// Disallow two overloads that could be unified into one with a union or an optional/rest parameter.
|
|
476
|
-
// https://typescript-eslint.io/rules/unified-signatures
|
|
477
|
-
'@typescript-eslint/unified-signatures': 'off',
|
|
478
|
-
// Enforce typing arguments in Promise rejection callbacks as unknown.
|
|
479
|
-
// https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
|
|
480
|
-
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
|
|
481
|
-
},
|
|
482
|
-
};
|
|
483
|
-
exports.deprecatedTypescriptEslintRules = {
|
|
484
|
-
name: 'airbnb/config/typescript/typescript-eslint/deprecated',
|
|
485
|
-
files: utils_1.tsFiles,
|
|
486
|
-
rules: {
|
|
487
|
-
// Disallow the declaration of empty interfaces.
|
|
488
|
-
// https://typescript-eslint.io/rules/no-empty-interface
|
|
489
|
-
'@typescript-eslint/no-empty-interface': 'off',
|
|
490
|
-
// Disallow literal numbers that lose precision.
|
|
491
|
-
// https://typescript-eslint.io/rules/no-loss-of-precision
|
|
492
|
-
'@typescript-eslint/no-loss-of-precision': 'off',
|
|
493
|
-
// Disallow type aliases.
|
|
494
|
-
// https://typescript-eslint.io/rules/no-type-alias
|
|
495
|
-
'@typescript-eslint/no-type-alias': 'off',
|
|
496
|
-
// Disallow require statements except in import statements.
|
|
497
|
-
// https://typescript-eslint.io/rules/no-var-requires
|
|
498
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
499
|
-
// Enforce using @ts-expect-error over @ts-ignore.
|
|
500
|
-
// https://typescript-eslint.io/rules/prefer-ts-expect-error
|
|
501
|
-
'@typescript-eslint/prefer-ts-expect-error': 'off',
|
|
502
|
-
// Enforce constituents of a type union/intersection to be sorted alphabetically.
|
|
503
|
-
// https://typescript-eslint.io/rules/sort-type-constituents
|
|
504
|
-
'@typescript-eslint/sort-type-constituents': 'off',
|
|
505
|
-
},
|
|
506
|
-
};
|
|
507
|
-
exports.default = typescriptEslintRules;
|
|
1
|
+
import{__esmMin as e}from"../../_virtual/rolldown_runtime.js";import{init_utils as t,tsFiles as n}from"../../utils/index.js";import r,{init_best_practices as i}from"../best-practices.js";import a,{init_errors as o}from"../errors.js";import s,{init_es6 as c}from"../es6.js";import l,{init_style as u}from"../style.js";import d,{init_variables as f}from"../variables.js";var p,m,h=e((()=>{i(),o(),c(),u(),f(),t(),p={name:`airbnb/config/typescript/typescript-eslint`,files:n,languageOptions:{parserOptions:{projectService:!0}},rules:{"@typescript-eslint/adjacent-overload-signatures":`off`,"@typescript-eslint/array-type":[`error`,{default:`array`,readonly:`array`}],"@typescript-eslint/await-thenable":`off`,"@typescript-eslint/ban-ts-comment":`off`,"@typescript-eslint/ban-tslint-comment":`error`,"@typescript-eslint/class-literal-property-style":[`error`,`fields`],"@typescript-eslint/class-methods-use-this":`off`,"@typescript-eslint/consistent-generic-constructors":`off`,"@typescript-eslint/consistent-indexed-object-style":`error`,"@typescript-eslint/consistent-return":`off`,"@typescript-eslint/consistent-type-assertions":`off`,"@typescript-eslint/consistent-type-definitions":[`error`,`interface`],"@typescript-eslint/consistent-type-exports":`off`,"@typescript-eslint/consistent-type-imports":`off`,"default-param-last":`off`,"@typescript-eslint/default-param-last":r.rules[`default-param-last`],"dot-notation":`off`,"@typescript-eslint/dot-notation":[r.rules[`dot-notation`][0],{...r.rules[`dot-notation`][1],allowPrivateClassPropertyAccess:!1,allowProtectedClassPropertyAccess:!1,allowIndexSignaturePropertyAccess:!1}],"@typescript-eslint/explicit-function-return-type":`off`,"@typescript-eslint/explicit-member-accessibility":`off`,"@typescript-eslint/explicit-module-boundary-types":`off`,"@typescript-eslint/init-declarations":`off`,"@typescript-eslint/max-params":`off`,"@typescript-eslint/member-ordering":`off`,"@typescript-eslint/method-signature-style":`off`,camelcase:`off`,"@typescript-eslint/naming-convention":[`error`,{selector:`variable`,format:[`camelCase`,`PascalCase`,`UPPER_CASE`]},{selector:`function`,format:[`camelCase`,`PascalCase`]},{selector:`typeLike`,format:[`PascalCase`]}],"no-array-constructor":`off`,"@typescript-eslint/no-array-constructor":l.rules[`no-array-constructor`],"@typescript-eslint/no-array-delete":`off`,"@typescript-eslint/no-base-to-string":`off`,"@typescript-eslint/no-confusing-non-null-assertion":`error`,"@typescript-eslint/no-confusing-void-expression":`off`,"@typescript-eslint/no-deprecated":`off`,"@typescript-eslint/no-dupe-class-members":`off`,"@typescript-eslint/no-duplicate-enum-values":`error`,"@typescript-eslint/no-duplicate-type-constituents":`off`,"@typescript-eslint/no-dynamic-delete":`off`,"no-empty-function":`off`,"@typescript-eslint/no-empty-function":r.rules[`no-empty-function`],"@typescript-eslint/no-empty-object-type":[`error`,{allowInterfaces:`never`,allowObjectTypes:`never`}],"@typescript-eslint/no-explicit-any":`off`,"@typescript-eslint/no-extra-non-null-assertion":`error`,"@typescript-eslint/no-extraneous-class":`off`,"@typescript-eslint/no-floating-promises":`off`,"@typescript-eslint/no-for-in-array":`error`,"no-implied-eval":`off`,"no-new-func":`off`,"@typescript-eslint/no-implied-eval":r.rules[`no-implied-eval`],"@typescript-eslint/no-import-type-side-effects":`off`,"@typescript-eslint/no-inferrable-types":[`error`,{ignoreParameters:!1,ignoreProperties:!1}],"@typescript-eslint/no-invalid-this":`off`,"@typescript-eslint/no-invalid-void-type":`off`,"no-loop-func":`off`,"@typescript-eslint/no-loop-func":r.rules[`no-loop-func`],"@typescript-eslint/no-magic-numbers":`off`,"@typescript-eslint/no-meaningless-void-operator":`off`,"@typescript-eslint/no-misused-new":`error`,"@typescript-eslint/no-misused-promises":`off`,"@typescript-eslint/no-misused-spread":`off`,"@typescript-eslint/no-mixed-enums":`error`,"@typescript-eslint/no-namespace":[`error`,{allowDeclarations:!1,allowDefinitionFiles:!0}],"@typescript-eslint/no-non-null-asserted-nullish-coalescing":`off`,"@typescript-eslint/no-non-null-asserted-optional-chain":`off`,"@typescript-eslint/no-non-null-assertion":`off`,"@typescript-eslint/no-redeclare":`off`,"@typescript-eslint/no-redundant-type-constituents":`off`,"@typescript-eslint/no-require-imports":[`error`,{allow:[],allowAsImport:!1}],"@typescript-eslint/no-restricted-imports":`off`,"@typescript-eslint/no-restricted-types":`off`,"no-shadow":`off`,"@typescript-eslint/no-shadow":d.rules[`no-shadow`],"@typescript-eslint/no-this-alias":[`error`,{allowDestructuring:!0,allowedNames:[`self`,`that`]}],"@typescript-eslint/no-unnecessary-boolean-literal-compare":`off`,"@typescript-eslint/no-unnecessary-condition":`off`,"@typescript-eslint/no-unnecessary-parameter-property-assignment":`error`,"@typescript-eslint/no-unnecessary-qualifier":`error`,"@typescript-eslint/no-unnecessary-template-expression":`error`,"@typescript-eslint/no-unnecessary-type-arguments":`error`,"@typescript-eslint/no-unnecessary-type-assertion":`error`,"@typescript-eslint/no-unnecessary-type-constraint":`error`,"@typescript-eslint/no-unnecessary-type-conversion":`off`,"@typescript-eslint/no-unnecessary-type-parameters":`off`,"@typescript-eslint/no-unsafe-argument":`off`,"@typescript-eslint/no-unsafe-assignment":`off`,"@typescript-eslint/no-unsafe-call":`off`,"@typescript-eslint/no-unsafe-declaration-merging":`error`,"@typescript-eslint/no-unsafe-enum-comparison":`error`,"@typescript-eslint/no-unsafe-function-type":`error`,"@typescript-eslint/no-unsafe-member-access":`off`,"@typescript-eslint/no-unsafe-return":`off`,"@typescript-eslint/no-unsafe-type-assertion":`off`,"@typescript-eslint/no-unsafe-unary-minus":`error`,"no-unused-expressions":`off`,"@typescript-eslint/no-unused-expressions":r.rules[`no-unused-expressions`],"no-unused-private-class-members":`off`,"@typescript-eslint/no-unused-private-class-members":a.rules[`no-unused-private-class-members`],"no-unused-vars":`off`,"@typescript-eslint/no-unused-vars":d.rules[`no-unused-vars`],"no-use-before-define":`off`,"@typescript-eslint/no-use-before-define":d.rules[`no-use-before-define`],"no-useless-constructor":`off`,"@typescript-eslint/no-useless-constructor":s.rules[`no-useless-constructor`],"@typescript-eslint/no-useless-empty-export":`off`,"@typescript-eslint/no-wrapper-object-types":`error`,"@typescript-eslint/non-nullable-type-assertion-style":`off`,"no-throw-literal":`off`,"@typescript-eslint/only-throw-error":r.rules[`no-throw-literal`],"@typescript-eslint/parameter-properties":`off`,"@typescript-eslint/prefer-as-const":`error`,"prefer-destructuring":`off`,"@typescript-eslint/prefer-destructuring":s.rules[`prefer-destructuring`],"@typescript-eslint/prefer-enum-initializers":`off`,"@typescript-eslint/prefer-find":`error`,"@typescript-eslint/prefer-for-of":`off`,"@typescript-eslint/prefer-function-type":`error`,"@typescript-eslint/prefer-includes":`off`,"@typescript-eslint/prefer-literal-enum-member":`off`,"@typescript-eslint/prefer-namespace-keyword":`error`,"@typescript-eslint/prefer-nullish-coalescing":`off`,"@typescript-eslint/prefer-optional-chain":`off`,"@typescript-eslint/prefer-promise-reject-errors":`off`,"@typescript-eslint/prefer-readonly":`off`,"@typescript-eslint/prefer-readonly-parameter-types":`off`,"@typescript-eslint/prefer-reduce-type-parameter":`off`,"@typescript-eslint/prefer-regexp-exec":`off`,"@typescript-eslint/prefer-return-this-type":`off`,"@typescript-eslint/prefer-string-starts-ends-with":`off`,"@typescript-eslint/promise-function-async":`off`,"@typescript-eslint/related-getter-setter-pairs":`off`,"@typescript-eslint/require-array-sort-compare":`off`,"@typescript-eslint/require-await":`off`,"@typescript-eslint/restrict-plus-operands":`off`,"@typescript-eslint/restrict-template-expressions":`off`,"@typescript-eslint/return-await":[`error`,`in-try-catch`],"@typescript-eslint/strict-boolean-expressions":`off`,"@typescript-eslint/switch-exhaustiveness-check":`off`,"@typescript-eslint/triple-slash-reference":[`error`,{lib:`always`,path:`never`,types:`prefer-import`}],"@typescript-eslint/typedef":`off`,"@typescript-eslint/unbound-method":`off`,"@typescript-eslint/unified-signatures":`off`,"@typescript-eslint/use-unknown-in-catch-callback-variable":`off`}},m=p}));h();export{m as default,h as init_typescriptEslint};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../utils/index.cjs`);var n,r,i=e.__esmMin((()=>{t.init_utils(),n={name:`airbnb/config/typescript/typescript-eslint/strict`,files:t.tsFiles,rules:{"@typescript-eslint/adjacent-overload-signatures":`error`,"@typescript-eslint/await-thenable":`error`,"@typescript-eslint/ban-ts-comment":[`error`,{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":`allow-with-description`,"ts-ignore":!0,"ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":[`error`,`constructor`],"@typescript-eslint/consistent-type-assertions":[`error`,{arrayLiteralTypeAssertions:`allow`,assertionStyle:`as`,objectLiteralTypeAssertions:`allow`}],"@typescript-eslint/consistent-type-exports":[`error`,{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-imports":[`error`,{disallowTypeAnnotations:!0,fixStyle:`separate-type-imports`,prefer:`type-imports`}],"@typescript-eslint/explicit-module-boundary-types":[`error`,{allowArgumentsExplicitlyTypedAsAny:!1,allowDirectConstAssertionInArrowFunctions:!0,allowedNames:[],allowHigherOrderFunctions:!0,allowOverloadFunctions:!1,allowTypedFunctionExpressions:!0}],"@typescript-eslint/method-signature-style":[`error`,`property`],"@typescript-eslint/no-array-delete":`error`,"@typescript-eslint/no-confusing-void-expression":[`error`,{ignoreArrowShorthand:!0,ignoreVoidOperator:!0,ignoreVoidReturningFunctions:!1}],"@typescript-eslint/no-duplicate-type-constituents":[`error`,{ignoreIntersections:!1,ignoreUnions:!1}],"@typescript-eslint/no-explicit-any":[`error`,{fixToUnknown:!1,ignoreRestArgs:!1}],"@typescript-eslint/no-import-type-side-effects":`error`,"@typescript-eslint/no-invalid-void-type":[`error`,{allowAsThisParameter:!1,allowInGenericTypeArguments:!0}],"@typescript-eslint/no-misused-promises":[`error`,{checksConditionals:!0,checksSpreads:!0,checksVoidReturn:!1}],"@typescript-eslint/no-misused-spread":[`error`,{allow:[]}],"@typescript-eslint/no-non-null-asserted-nullish-coalescing":`warn`,"@typescript-eslint/no-non-null-asserted-optional-chain":`error`,"@typescript-eslint/no-non-null-assertion":`error`,"@typescript-eslint/no-redundant-type-constituents":`error`,"@typescript-eslint/no-unnecessary-boolean-literal-compare":`error`,"@typescript-eslint/no-unsafe-return":`error`,"@typescript-eslint/no-useless-empty-export":`error`,"@typescript-eslint/prefer-for-of":`error`,"@typescript-eslint/prefer-includes":`warn`,"@typescript-eslint/prefer-nullish-coalescing":`error`,"@typescript-eslint/prefer-optional-chain":`error`,"@typescript-eslint/prefer-reduce-type-parameter":`error`,"@typescript-eslint/prefer-regexp-exec":`error`,"@typescript-eslint/prefer-string-starts-ends-with":`warn`,"@typescript-eslint/promise-function-async":`error`,"@typescript-eslint/require-array-sort-compare":`error`,"@typescript-eslint/unified-signatures":[`error`,{ignoreDifferentlyNamedParameters:!1,ignoreOverloadsWithDifferentJSDoc:!1}]}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_typescriptEslintStrict`,{enumerable:!0,get:function(){return i}});
|