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,193 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../../utils");
|
|
4
|
-
const typescriptEslintStrictRules = {
|
|
5
|
-
name: 'airbnb/config/typescript/typescript-eslint/strict',
|
|
6
|
-
files: utils_1.tsFiles,
|
|
7
|
-
rules: {
|
|
8
|
-
// Require that function overload signatures be consecutive.
|
|
9
|
-
// https://typescript-eslint.io/rules/adjacent-overload-signatures
|
|
10
|
-
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
11
|
-
// Disallow awaiting a value that is not a Thenable.
|
|
12
|
-
// https://typescript-eslint.io/rules/await-thenable
|
|
13
|
-
'@typescript-eslint/await-thenable': 'error',
|
|
14
|
-
// Disallow @ts-<directive> comments or require descriptions after directives.
|
|
15
|
-
// https://typescript-eslint.io/rules/ban-ts-comment
|
|
16
|
-
'@typescript-eslint/ban-ts-comment': [
|
|
17
|
-
'error',
|
|
18
|
-
{
|
|
19
|
-
minimumDescriptionLength: 3,
|
|
20
|
-
'ts-check': false,
|
|
21
|
-
'ts-expect-error': 'allow-with-description',
|
|
22
|
-
'ts-ignore': true,
|
|
23
|
-
'ts-nocheck': true,
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
// Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.
|
|
27
|
-
// https://typescript-eslint.io/rules/consistent-generic-constructors
|
|
28
|
-
'@typescript-eslint/consistent-generic-constructors': ['error', 'constructor'],
|
|
29
|
-
// Enforce consistent usage of type assertions.
|
|
30
|
-
// https://typescript-eslint.io/rules/consistent-type-assertions
|
|
31
|
-
'@typescript-eslint/consistent-type-assertions': [
|
|
32
|
-
'error',
|
|
33
|
-
{
|
|
34
|
-
arrayLiteralTypeAssertions: 'allow',
|
|
35
|
-
assertionStyle: 'as',
|
|
36
|
-
objectLiteralTypeAssertions: 'allow',
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
// Enforce consistent usage of type exports.
|
|
40
|
-
// https://typescript-eslint.io/rules/consistent-type-exports
|
|
41
|
-
'@typescript-eslint/consistent-type-exports': [
|
|
42
|
-
'error',
|
|
43
|
-
{
|
|
44
|
-
fixMixedExportsWithInlineTypeSpecifier: false,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
// Enforce consistent usage of type imports.
|
|
48
|
-
// https://typescript-eslint.io/rules/consistent-type-imports
|
|
49
|
-
'@typescript-eslint/consistent-type-imports': [
|
|
50
|
-
'error',
|
|
51
|
-
{
|
|
52
|
-
disallowTypeAnnotations: true,
|
|
53
|
-
fixStyle: 'separate-type-imports',
|
|
54
|
-
prefer: 'type-imports',
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
// Require explicit return and argument types on exported functions' and classes' public class methods.
|
|
58
|
-
// https://typescript-eslint.io/rules/explicit-module-boundary-types
|
|
59
|
-
'@typescript-eslint/explicit-module-boundary-types': [
|
|
60
|
-
'error',
|
|
61
|
-
{
|
|
62
|
-
allowArgumentsExplicitlyTypedAsAny: false,
|
|
63
|
-
allowDirectConstAssertionInArrowFunctions: true,
|
|
64
|
-
allowedNames: [],
|
|
65
|
-
allowHigherOrderFunctions: true,
|
|
66
|
-
allowOverloadFunctions: false,
|
|
67
|
-
allowTypedFunctionExpressions: true,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
// Enforce using a particular method signature syntax.
|
|
71
|
-
// https://typescript-eslint.io/rules/method-signature-style
|
|
72
|
-
'@typescript-eslint/method-signature-style': ['error', 'property'],
|
|
73
|
-
// Disallow using the delete operator on array values.
|
|
74
|
-
// https://typescript-eslint.io/rules/no-array-delete
|
|
75
|
-
'@typescript-eslint/no-array-delete': 'error',
|
|
76
|
-
// Require expressions of type void to appear in statement position.
|
|
77
|
-
// https://typescript-eslint.io/rules/no-confusing-void-expression
|
|
78
|
-
'@typescript-eslint/no-confusing-void-expression': [
|
|
79
|
-
'error',
|
|
80
|
-
{
|
|
81
|
-
ignoreArrowShorthand: true,
|
|
82
|
-
ignoreVoidOperator: true,
|
|
83
|
-
ignoreVoidReturningFunctions: false,
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
// Disallow duplicate constituents of union or intersection types.
|
|
87
|
-
// https://typescript-eslint.io/rules/no-duplicate-type-constituents
|
|
88
|
-
'@typescript-eslint/no-duplicate-type-constituents': [
|
|
89
|
-
'error',
|
|
90
|
-
{
|
|
91
|
-
ignoreIntersections: false,
|
|
92
|
-
ignoreUnions: false,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
// Disallow the any type.
|
|
96
|
-
// https://typescript-eslint.io/rules/no-explicit-any
|
|
97
|
-
'@typescript-eslint/no-explicit-any': [
|
|
98
|
-
'error',
|
|
99
|
-
{
|
|
100
|
-
fixToUnknown: false,
|
|
101
|
-
ignoreRestArgs: false,
|
|
102
|
-
},
|
|
103
|
-
],
|
|
104
|
-
// Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
|
|
105
|
-
// https://typescript-eslint.io/rules/no-import-type-side-effects
|
|
106
|
-
'@typescript-eslint/no-import-type-side-effects': 'error',
|
|
107
|
-
// Disallow void type outside of generic or return types.
|
|
108
|
-
// https://typescript-eslint.io/rules/no-invalid-void-type
|
|
109
|
-
'@typescript-eslint/no-invalid-void-type': [
|
|
110
|
-
'error',
|
|
111
|
-
{
|
|
112
|
-
allowAsThisParameter: false,
|
|
113
|
-
allowInGenericTypeArguments: true,
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
// Disallow Promises in places not designed to handle them.
|
|
117
|
-
// https://typescript-eslint.io/rules/no-misused-promises
|
|
118
|
-
'@typescript-eslint/no-misused-promises': [
|
|
119
|
-
'error',
|
|
120
|
-
{
|
|
121
|
-
checksConditionals: true,
|
|
122
|
-
checksSpreads: true,
|
|
123
|
-
checksVoidReturn: false,
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
// Disallow using the spread operator when it might cause unexpected behavior.
|
|
127
|
-
// https://typescript-eslint.io/rules/no-misused-spread
|
|
128
|
-
'@typescript-eslint/no-misused-spread': [
|
|
129
|
-
'error',
|
|
130
|
-
{
|
|
131
|
-
allow: [],
|
|
132
|
-
},
|
|
133
|
-
],
|
|
134
|
-
// Disallow non-null assertions in the left operand of a nullish coalescing operator.
|
|
135
|
-
// https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing
|
|
136
|
-
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'warn',
|
|
137
|
-
// Disallow non-null assertions after an optional chain expression.
|
|
138
|
-
// https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain
|
|
139
|
-
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
140
|
-
// Disallow non-null assertions using the ! postfix operator.
|
|
141
|
-
// https://typescript-eslint.io/rules/no-non-null-assertion
|
|
142
|
-
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
143
|
-
// Disallow members of unions and intersections that do nothing or override type information.
|
|
144
|
-
// https://typescript-eslint.io/rules/no-redundant-type-constituents
|
|
145
|
-
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
|
146
|
-
// Disallow unnecessary equality comparisons against boolean literals.
|
|
147
|
-
// https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
|
|
148
|
-
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
|
149
|
-
// Disallow returning a value with type any from a function.
|
|
150
|
-
// https://typescript-eslint.io/rules/no-unsafe-return
|
|
151
|
-
'@typescript-eslint/no-unsafe-return': 'error',
|
|
152
|
-
// Disallow empty exports that don't change anything in a module file.
|
|
153
|
-
// https://typescript-eslint.io/rules/no-useless-empty-export
|
|
154
|
-
'@typescript-eslint/no-useless-empty-export': 'error',
|
|
155
|
-
// Enforce the use of for-of loop over the standard for loop where possible.
|
|
156
|
-
// https://typescript-eslint.io/rules/prefer-for-of
|
|
157
|
-
'@typescript-eslint/prefer-for-of': 'error',
|
|
158
|
-
// Enforce includes method over indexOf method.
|
|
159
|
-
// https://typescript-eslint.io/rules/prefer-includes
|
|
160
|
-
'@typescript-eslint/prefer-includes': 'warn',
|
|
161
|
-
// Enforce using the nullish coalescing operator instead of logical assignments or chaining.
|
|
162
|
-
// https://typescript-eslint.io/rules/prefer-nullish-coalescing
|
|
163
|
-
'@typescript-eslint/prefer-nullish-coalescing': 'error',
|
|
164
|
-
// Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
|
|
165
|
-
// https://typescript-eslint.io/rules/prefer-optional-chain
|
|
166
|
-
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
167
|
-
// Enforce using type parameter when calling Array#reduce instead of using a type assertion.
|
|
168
|
-
// https://typescript-eslint.io/rules/prefer-reduce-type-parameter
|
|
169
|
-
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
|
|
170
|
-
// Enforce RegExp#exec over String#match if no global flag is provided.
|
|
171
|
-
// https://typescript-eslint.io/rules/prefer-regexp-exec
|
|
172
|
-
'@typescript-eslint/prefer-regexp-exec': 'error',
|
|
173
|
-
// Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings.
|
|
174
|
-
// https://typescript-eslint.io/rules/prefer-string-starts-ends-with
|
|
175
|
-
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
|
|
176
|
-
// Require any function or method that returns a Promise to be marked async.
|
|
177
|
-
// https://typescript-eslint.io/rules/promise-function-async
|
|
178
|
-
'@typescript-eslint/promise-function-async': 'error',
|
|
179
|
-
// Require Array#sort and Array#toSorted calls to always provide a compareFunction.
|
|
180
|
-
// https://typescript-eslint.io/rules/require-array-sort-compare
|
|
181
|
-
'@typescript-eslint/require-array-sort-compare': 'error',
|
|
182
|
-
// Disallow two overloads that could be unified into one with a union or an optional/rest parameter.
|
|
183
|
-
// https://typescript-eslint.io/rules/unified-signatures
|
|
184
|
-
'@typescript-eslint/unified-signatures': [
|
|
185
|
-
'error',
|
|
186
|
-
{
|
|
187
|
-
ignoreDifferentlyNamedParameters: false,
|
|
188
|
-
ignoreOverloadsWithDifferentJSDoc: false,
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
};
|
|
193
|
-
exports.default = typescriptEslintStrictRules;
|
|
1
|
+
import{__esmMin as e}from"../../_virtual/rolldown_runtime.js";import{init_utils as t,tsFiles as n}from"../../utils/index.js";var r,i,a=e((()=>{t(),r={name:`airbnb/config/typescript/typescript-eslint/strict`,files:n,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}]}},i=r}));a();export{i as default,a as init_typescriptEslintStrict};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../utils/index.cjs`),n=require(`../../helpers/getDevDepsList.cjs`);var r,i,a=e.__esmMin((()=>{n.init_getDevDepsList(),t.init_utils(),r={name:`airbnb/config/typescript/import-x`,files:t.tsFiles,rules:{"import-x/extensions":[`error`,`ignorePackages`,{...t.jsExtensionsRule,...t.tsExtensionsRule}],"import-x/no-extraneous-dependencies":[`error`,{devDependencies:n.default([...t.jsExtensions,...t.tsExtensions].map(e=>e.slice(1)).join(`,`)),optionalDependencies:!1,peerDependencies:!0,bundledDependencies:!0}],"import-x/named":`off`,"import-x/no-named-as-default-member":`off`}},i=r}));a(),exports.default=i,Object.defineProperty(exports,`init_typescriptImports`,{enumerable:!0,get:function(){return a}});
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
"
|
|
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
|
-
const getDevDepsList_1 = __importDefault(require("../../helpers/getDevDepsList"));
|
|
7
|
-
const utils_1 = require("../../utils");
|
|
8
|
-
/**
|
|
9
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/src/config/typescript.ts
|
|
10
|
-
*/
|
|
11
|
-
const typescriptImportsRules = {
|
|
12
|
-
name: 'airbnb/config/typescript/import-x',
|
|
13
|
-
files: utils_1.tsFiles,
|
|
14
|
-
rules: {
|
|
15
|
-
// Append 'ts' and 'tsx' to Airbnb 'import-x/extensions' rule
|
|
16
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/extensions.md
|
|
17
|
-
'import-x/extensions': [
|
|
18
|
-
'error',
|
|
19
|
-
'ignorePackages',
|
|
20
|
-
Object.assign(Object.assign({}, utils_1.jsExtensionsRule), utils_1.tsExtensionsRule),
|
|
21
|
-
],
|
|
22
|
-
// Append 'ts' and 'tsx' extensions to Airbnb 'import-x/no-extraneous-dependencies' rule
|
|
23
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-extraneous-dependencies.md
|
|
24
|
-
'import-x/no-extraneous-dependencies': [
|
|
25
|
-
'error',
|
|
26
|
-
{
|
|
27
|
-
devDependencies: (0, getDevDepsList_1.default)([...utils_1.jsExtensions, ...utils_1.tsExtensions].map((ext) => ext.slice(1)).join(',')),
|
|
28
|
-
optionalDependencies: false,
|
|
29
|
-
peerDependencies: true,
|
|
30
|
-
bundledDependencies: true,
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
// See: https://github.com/typescript-eslint/typescript-eslint/blob/13583e65f5973da2a7ae8384493c5e00014db51b/docs/linting/TROUBLESHOOTING.md#eslint-plugin-import
|
|
34
|
-
// TypeScript compilation already ensures that named imports exist in the referenced module
|
|
35
|
-
'import-x/named': 'off',
|
|
36
|
-
// warn on accessing default export property names that are also named exports
|
|
37
|
-
'import-x/no-named-as-default-member': 'off',
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
exports.default = typescriptImportsRules;
|
|
1
|
+
import{__esmMin as e}from"../../_virtual/rolldown_runtime.js";import{init_utils as t,jsExtensions as n,jsExtensionsRule as r,tsExtensions as i,tsExtensionsRule as a,tsFiles as o}from"../../utils/index.js";import s,{init_getDevDepsList as c}from"../../helpers/getDevDepsList.js";var l,u,d=e((()=>{c(),t(),l={name:`airbnb/config/typescript/import-x`,files:o,rules:{"import-x/extensions":[`error`,`ignorePackages`,{...r,...a}],"import-x/no-extraneous-dependencies":[`error`,{devDependencies:s([...n,...i].map(e=>e.slice(1)).join(`,`)),optionalDependencies:!1,peerDependencies:!0,bundledDependencies:!0}],"import-x/named":`off`,"import-x/no-named-as-default-member":`off`}},u=l}));d();export{u as default,d as init_typescriptImports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../utils/index.cjs`),n=require(`../stylistic.cjs`);var r,i,a=e.__esmMin((()=>{n.init_stylistic(),t.init_utils(),r={name:`airbnb/config/typescript/typescript-stylistic`,files:t.tsFiles,rules:{"@stylistic/comma-dangle":[n.default.rules[`@stylistic/comma-dangle`][0],{...n.default.rules[`@stylistic/comma-dangle`][1],enums:n.default.rules[`@stylistic/comma-dangle`][1].arrays,generics:n.default.rules[`@stylistic/comma-dangle`][1].arrays,tuples:n.default.rules[`@stylistic/comma-dangle`][1].arrays}],"@stylistic/member-delimiter-style":`error`,"@stylistic/space-infix-ops":[n.default.rules[`@stylistic/space-infix-ops`][0],{...n.default.rules[`@stylistic/space-infix-ops`][1],ignoreTypes:!1}],"@stylistic/type-annotation-spacing":[`error`,{before:!1,after:!0,overrides:{arrow:{before:!0,after:!0}}}],"@stylistic/type-generic-spacing":`error`,"@stylistic/type-named-tuple-spacing":`off`}},i=r}));a(),exports.default=i,Object.defineProperty(exports,`init_typescriptStylistic`,{enumerable:!0,get:function(){return a}});
|
|
@@ -1,150 +1 @@
|
|
|
1
|
-
"
|
|
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.deprecatedTypescriptStylisticRules = void 0;
|
|
37
|
-
const stylistic_1 = __importStar(require("../../rules/stylistic"));
|
|
38
|
-
const utils_1 = require("../../utils");
|
|
39
|
-
const typescriptStylisticRules = {
|
|
40
|
-
name: 'airbnb/config/typescript/typescript-stylistic',
|
|
41
|
-
files: utils_1.tsFiles,
|
|
42
|
-
rules: {
|
|
43
|
-
// enforce spacing inside single-line blocks
|
|
44
|
-
// https://eslint.style/rules/ts/block-spacing
|
|
45
|
-
'@stylistic/block-spacing': stylistic_1.default.rules['@stylistic/block-spacing'],
|
|
46
|
-
// enforce one true brace style
|
|
47
|
-
// https://eslint.style/rules/ts/brace-style
|
|
48
|
-
'@stylistic/brace-style': stylistic_1.default.rules['@stylistic/brace-style'],
|
|
49
|
-
// require trailing commas in multiline object literals
|
|
50
|
-
// https://eslint.style/rules/ts/comma-dangle
|
|
51
|
-
'@stylistic/comma-dangle': [
|
|
52
|
-
stylistic_1.default.rules['@stylistic/comma-dangle'][0],
|
|
53
|
-
Object.assign(Object.assign({}, stylistic_1.default.rules['@stylistic/comma-dangle'][1]), { enums: stylistic_1.default.rules['@stylistic/comma-dangle'][1].arrays, generics: stylistic_1.default.rules['@stylistic/comma-dangle'][1].arrays, tuples: stylistic_1.default.rules['@stylistic/comma-dangle'][1].arrays }),
|
|
54
|
-
],
|
|
55
|
-
// enforce spacing before and after comma
|
|
56
|
-
// https://eslint.style/rules/ts/comma-spacing
|
|
57
|
-
'@stylistic/comma-spacing': stylistic_1.default.rules['@stylistic/comma-spacing'],
|
|
58
|
-
// enforce spacing between functions and their invocations
|
|
59
|
-
// https://eslint.style/rules/ts/function-call-spacing
|
|
60
|
-
'@stylistic/function-call-spacing': stylistic_1.default.rules['@stylistic/function-call-spacing'],
|
|
61
|
-
// this option sets a specific tab width for your code
|
|
62
|
-
// https://eslint.style/rules/ts/indent
|
|
63
|
-
'@stylistic/indent': stylistic_1.default.rules['@stylistic/indent'],
|
|
64
|
-
// enforces spacing between keys and values in object literal properties
|
|
65
|
-
// https://eslint.style/rules/ts/key-spacing
|
|
66
|
-
'@stylistic/key-spacing': stylistic_1.default.rules['@stylistic/key-spacing'],
|
|
67
|
-
// require a space before & after certain keywords
|
|
68
|
-
// https://eslint.style/rules/ts/keyword-spacing
|
|
69
|
-
'@stylistic/keyword-spacing': stylistic_1.default.rules['@stylistic/keyword-spacing'],
|
|
70
|
-
// enforces empty lines around comments
|
|
71
|
-
// https://eslint.style/rules/ts/lines-around-comment
|
|
72
|
-
'@stylistic/lines-around-comment': stylistic_1.default.rules['@stylistic/lines-around-comment'],
|
|
73
|
-
// require or disallow an empty line between class members
|
|
74
|
-
// https://eslint.style/rules/ts/lines-between-class-members
|
|
75
|
-
'@stylistic/lines-between-class-members': stylistic_1.default.rules['@stylistic/lines-between-class-members'],
|
|
76
|
-
// enforce consistent member delimiter style
|
|
77
|
-
// https://eslint.style/rules/ts/member-delimiter-style
|
|
78
|
-
'@stylistic/member-delimiter-style': 'error',
|
|
79
|
-
// disallow unnecessary parentheses
|
|
80
|
-
// https://eslint.style/rules/ts/no-extra-parens
|
|
81
|
-
'@stylistic/no-extra-parens': stylistic_1.default.rules['@stylistic/no-extra-parens'],
|
|
82
|
-
// disallow unnecessary semicolons
|
|
83
|
-
// https://eslint.style/rules/ts/no-extra-semi
|
|
84
|
-
'@stylistic/no-extra-semi': stylistic_1.default.rules['@stylistic/no-extra-semi'],
|
|
85
|
-
// enforce line breaks between braces
|
|
86
|
-
// https://eslint.style/rules/ts/object-curly-newline
|
|
87
|
-
'@stylistic/object-curly-newline': stylistic_1.default.rules['@stylistic/object-curly-newline'],
|
|
88
|
-
// require padding inside curly braces
|
|
89
|
-
// https://eslint.style/rules/ts/object-curly-spacing
|
|
90
|
-
'@stylistic/object-curly-spacing': stylistic_1.default.rules['@stylistic/object-curly-spacing'],
|
|
91
|
-
// enforce "same line" or "multiple line" on object properties.
|
|
92
|
-
// https://eslint.style/rules/ts/object-property-newline
|
|
93
|
-
'@stylistic/object-property-newline': stylistic_1.default.rules['@stylistic/object-property-newline'],
|
|
94
|
-
// Require or disallow padding lines between statements
|
|
95
|
-
// https://eslint.style/rules/ts/padding-line-between-statements
|
|
96
|
-
'@stylistic/padding-line-between-statements': stylistic_1.default.rules['@stylistic/padding-line-between-statements'],
|
|
97
|
-
// require quotes around object literal property names
|
|
98
|
-
// https://eslint.style/rules/ts/quote-props
|
|
99
|
-
'@stylistic/quote-props': stylistic_1.default.rules['@stylistic/quote-props'],
|
|
100
|
-
// specify whether double or single quotes should be used
|
|
101
|
-
// https://eslint.style/rules/ts/quotes
|
|
102
|
-
'@stylistic/quotes': stylistic_1.default.rules['@stylistic/quotes'],
|
|
103
|
-
// require or disallow use of semicolons instead of ASI
|
|
104
|
-
// https://eslint.style/rules/ts/semi
|
|
105
|
-
'@stylistic/semi': stylistic_1.default.rules['@stylistic/semi'],
|
|
106
|
-
// enforce spacing before and after semicolons
|
|
107
|
-
// https://eslint.style/rules/ts/semi-spacing
|
|
108
|
-
'@stylistic/semi-spacing': stylistic_1.default.rules['@stylistic/semi-spacing'],
|
|
109
|
-
// require or disallow space before blocks
|
|
110
|
-
// https://eslint.style/rules/ts/space-before-blocks
|
|
111
|
-
'@stylistic/space-before-blocks': stylistic_1.default.rules['@stylistic/space-before-blocks'],
|
|
112
|
-
// require or disallow space before function opening parenthesis
|
|
113
|
-
// https://eslint.style/rules/ts/space-before-function-paren
|
|
114
|
-
'@stylistic/space-before-function-paren': stylistic_1.default.rules['@stylistic/space-before-function-paren'],
|
|
115
|
-
// require spaces around operators
|
|
116
|
-
// https://eslint.style/rules/ts/space-infix-ops
|
|
117
|
-
'@stylistic/space-infix-ops': [
|
|
118
|
-
stylistic_1.default.rules['@stylistic/space-infix-ops'][0],
|
|
119
|
-
Object.assign({}, stylistic_1.default.rules['@stylistic/space-infix-ops'][1]),
|
|
120
|
-
],
|
|
121
|
-
// enforce consistent spacing in type annotation
|
|
122
|
-
// https://eslint.style/rules/ts/type-annotation-spacing
|
|
123
|
-
'@stylistic/type-annotation-spacing': [
|
|
124
|
-
'error',
|
|
125
|
-
{
|
|
126
|
-
before: false,
|
|
127
|
-
after: true,
|
|
128
|
-
overrides: {
|
|
129
|
-
arrow: {
|
|
130
|
-
before: true,
|
|
131
|
-
after: true,
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
],
|
|
136
|
-
// enforce consistent spacing inside TypeScript type generics
|
|
137
|
-
// https://eslint.style/rules/plus/type-generic-spacing
|
|
138
|
-
'@stylistic/type-generic-spacing': 'error',
|
|
139
|
-
},
|
|
140
|
-
};
|
|
141
|
-
exports.deprecatedTypescriptStylisticRules = {
|
|
142
|
-
name: 'airbnb/config/typescript/typescript-stylistic/deprecated',
|
|
143
|
-
files: utils_1.tsFiles,
|
|
144
|
-
rules: {
|
|
145
|
-
// enforce spacing between functions and their invocations
|
|
146
|
-
// https://eslint.style/rules/ts/function-call-spacing
|
|
147
|
-
'@stylistic/func-call-spacing': stylistic_1.deprecatedStylisticRules.rules['@stylistic/func-call-spacing'],
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
exports.default = typescriptStylisticRules;
|
|
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_stylistic as i}from"../stylistic.js";var a,o,s=e((()=>{i(),t(),a={name:`airbnb/config/typescript/typescript-stylistic`,files:n,rules:{"@stylistic/comma-dangle":[r.rules[`@stylistic/comma-dangle`][0],{...r.rules[`@stylistic/comma-dangle`][1],enums:r.rules[`@stylistic/comma-dangle`][1].arrays,generics:r.rules[`@stylistic/comma-dangle`][1].arrays,tuples:r.rules[`@stylistic/comma-dangle`][1].arrays}],"@stylistic/member-delimiter-style":`error`,"@stylistic/space-infix-ops":[r.rules[`@stylistic/space-infix-ops`][0],{...r.rules[`@stylistic/space-infix-ops`][1],ignoreTypes:!1}],"@stylistic/type-annotation-spacing":[`error`,{before:!1,after:!0,overrides:{arrow:{before:!0,after:!0}}}],"@stylistic/type-generic-spacing":`error`,"@stylistic/type-named-tuple-spacing":`off`}},o=a}));s();export{o as default,s as init_typescriptStylistic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`confusing-browser-globals`);n=e.__toESM(n);var r,i,a=e.__esmMin((()=>{t.init_utils(),r={name:`airbnb/config/variables`,files:t.allFiles,rules:{"init-declarations":`off`,"no-delete-var":`error`,"no-label-var":`error`,"no-restricted-globals":[`error`,{name:`isFinite`,message:`Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite`},{name:`isNaN`,message:`Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan`},...n.default.map(e=>({name:e,message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`}))],"no-shadow":`error`,"no-shadow-restricted-names":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-undefined":`off`,"no-unused-vars":[`warn`,{vars:`all`,args:`after-used`,ignoreRestSiblings:!0,argsIgnorePattern:`^_`}],"no-use-before-define":[`error`,{functions:!0,classes:!0,variables:!0}]}},i=r}));a(),exports.default=i,Object.defineProperty(exports,`init_variables`,{enumerable:!0,get:function(){return a}});
|
package/dist/rules/variables.js
CHANGED
|
@@ -1,67 +1 @@
|
|
|
1
|
-
"
|
|
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
|
-
const confusing_browser_globals_1 = __importDefault(require("confusing-browser-globals"));
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const variablesRules = {
|
|
9
|
-
name: 'airbnb/config/variables',
|
|
10
|
-
files: utils_1.allFiles,
|
|
11
|
-
rules: {
|
|
12
|
-
// enforce or disallow variable initializations at definition
|
|
13
|
-
'init-declarations': 'off',
|
|
14
|
-
// disallow deletion of variables
|
|
15
|
-
'no-delete-var': 'error',
|
|
16
|
-
// disallow labels that share a name with a variable
|
|
17
|
-
// https://eslint.org/docs/rules/no-label-var
|
|
18
|
-
'no-label-var': 'error',
|
|
19
|
-
// disallow specific globals
|
|
20
|
-
'no-restricted-globals': [
|
|
21
|
-
'error',
|
|
22
|
-
{
|
|
23
|
-
name: 'isFinite',
|
|
24
|
-
message: 'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'isNaN',
|
|
28
|
-
message: 'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
|
|
29
|
-
},
|
|
30
|
-
...confusing_browser_globals_1.default.map((g) => ({
|
|
31
|
-
name: g,
|
|
32
|
-
message: `Use window.${g} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,
|
|
33
|
-
})),
|
|
34
|
-
],
|
|
35
|
-
// disallow declaration of variables already declared in the outer scope
|
|
36
|
-
'no-shadow': 'error',
|
|
37
|
-
// disallow shadowing of names such as arguments
|
|
38
|
-
'no-shadow-restricted-names': 'error',
|
|
39
|
-
// disallow use of undeclared variables unless mentioned in a /*global */ block
|
|
40
|
-
'no-undef': 'error',
|
|
41
|
-
// disallow use of undefined when initializing variables
|
|
42
|
-
'no-undef-init': 'error',
|
|
43
|
-
// disallow use of undefined variable
|
|
44
|
-
// https://eslint.org/docs/rules/no-undefined
|
|
45
|
-
'no-undefined': 'off',
|
|
46
|
-
// disallow declaration of variables that are not used in the code
|
|
47
|
-
'no-unused-vars': [
|
|
48
|
-
'warn',
|
|
49
|
-
{
|
|
50
|
-
vars: 'all',
|
|
51
|
-
args: 'after-used',
|
|
52
|
-
ignoreRestSiblings: true,
|
|
53
|
-
argsIgnorePattern: '^_',
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
// disallow use of variables before they are defined
|
|
57
|
-
'no-use-before-define': [
|
|
58
|
-
'error',
|
|
59
|
-
{
|
|
60
|
-
functions: true,
|
|
61
|
-
classes: true,
|
|
62
|
-
variables: true,
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
exports.default = variablesRules;
|
|
1
|
+
import{__esmMin as e}from"../_virtual/rolldown_runtime.js";import{allFiles as t,init_utils as n}from"../utils/index.js";import r from"confusing-browser-globals";var i,a,o=e((()=>{n(),i={name:`airbnb/config/variables`,files:t,rules:{"init-declarations":`off`,"no-delete-var":`error`,"no-label-var":`error`,"no-restricted-globals":[`error`,{name:`isFinite`,message:`Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite`},{name:`isNaN`,message:`Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan`},...r.map(e=>({name:e,message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`}))],"no-shadow":`error`,"no-shadow-restricted-names":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-undefined":`off`,"no-unused-vars":[`warn`,{vars:`all`,args:`after-used`,ignoreRestSiblings:!0,argsIgnorePattern:`^_`}],"no-use-before-define":[`error`,{functions:!0,classes:!0,variables:!0}]}},a=i}));o();export{a as default,o as init_variables};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`);var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h=e.__esmMin((()=>{t=[`.js`,`.cjs`,`.mjs`],n=[...t,`.jsx`],[...t],i=Object.fromEntries(Object.values(n).map(e=>[e.slice(1),`never`])),a=[`.ts`,`.cts`,`.mts`],o=[...a,`.tsx`],s=[...o,`.d.ts`],c=[...a,`.d.ts`],l=Object.fromEntries(Object.values(o).map(e=>[e.slice(1),`never`])),u=n.map(e=>`**/*${e}`),d=t.map(e=>`**/*${e}`),f=s.map(e=>`**/*${e}`),p=c.map(e=>`**/*${e}`),m=[...u,...f]}));h(),exports.allFiles=m,Object.defineProperty(exports,`init_utils`,{enumerable:!0,get:function(){return h}}),exports.jsExtensions=t,exports.jsExtensionsRule=i,exports.jsExtensionsWithReact=n,exports.jsFileWithoutReact=d,exports.jsFiles=u,exports.tsExtensions=a,exports.tsExtensionsResolver=c,exports.tsExtensionsRule=l,exports.tsExtensionsWithReactDTS=s,exports.tsFileWithoutReact=p,exports.tsFiles=f;
|
package/dist/utils/index.js
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allFiles = exports.tsFileWithoutReact = exports.tsFiles = exports.jsFileWithoutReact = exports.jsFiles = exports.tsExtensionsRule = exports.tsExtensionsResolver = exports.tsExtensionsWithReactDTS = exports.tsExtensionsWithReact = exports.tsExtensions = exports.jsExtensionsRule = exports.jsExtensionsResolver = exports.jsExtensionsWithReact = exports.jsExtensions = void 0;
|
|
4
|
-
exports.jsExtensions = ['.js', '.cjs', '.mjs'];
|
|
5
|
-
exports.jsExtensionsWithReact = [...exports.jsExtensions, '.jsx'];
|
|
6
|
-
exports.jsExtensionsResolver = [...exports.jsExtensions, '.json'];
|
|
7
|
-
exports.jsExtensionsRule = Object.fromEntries(Object.values(exports.jsExtensionsWithReact).map((val) => [val.slice(1), 'never']));
|
|
8
|
-
exports.tsExtensions = ['.ts', '.cts', '.mts'];
|
|
9
|
-
exports.tsExtensionsWithReact = [...exports.tsExtensions, '.tsx'];
|
|
10
|
-
exports.tsExtensionsWithReactDTS = [...exports.tsExtensionsWithReact, '.d.ts'];
|
|
11
|
-
exports.tsExtensionsResolver = [...exports.tsExtensions, '.d.ts'];
|
|
12
|
-
exports.tsExtensionsRule = Object.fromEntries(Object.values(exports.tsExtensionsWithReact).map((val) => [val.slice(1), 'never']));
|
|
13
|
-
// ESLINT CONFIG FILES
|
|
14
|
-
exports.jsFiles = exports.jsExtensionsWithReact.map((val) => `**/*${val}`);
|
|
15
|
-
exports.jsFileWithoutReact = exports.jsExtensions.map((val) => `**/*${val}`);
|
|
16
|
-
exports.tsFiles = exports.tsExtensionsWithReactDTS.map((val) => `**/*${val}`);
|
|
17
|
-
exports.tsFileWithoutReact = exports.tsExtensionsResolver.map((val) => `**/*${val}`);
|
|
18
|
-
exports.allFiles = [...exports.jsFiles, ...exports.tsFiles];
|
|
1
|
+
import{__esmMin as e}from"../_virtual/rolldown_runtime.js";var t,n,r,i,a,o,s,c,l,u,d,f,p,m=e((()=>{t=[`.js`,`.cjs`,`.mjs`],n=[...t,`.jsx`],[...t],r=Object.fromEntries(Object.values(n).map(e=>[e.slice(1),`never`])),i=[`.ts`,`.cts`,`.mts`],a=[...i,`.tsx`],o=[...a,`.d.ts`],s=[...i,`.d.ts`],c=Object.fromEntries(Object.values(a).map(e=>[e.slice(1),`never`])),l=n.map(e=>`**/*${e}`),u=t.map(e=>`**/*${e}`),d=o.map(e=>`**/*${e}`),f=s.map(e=>`**/*${e}`),p=[...l,...d]}));m();export{p as allFiles,m as init_utils,t as jsExtensions,r as jsExtensionsRule,n as jsExtensionsWithReact,u as jsFileWithoutReact,l as jsFiles,i as tsExtensions,s as tsExtensionsResolver,c as tsExtensionsRule,o as tsExtensionsWithReactDTS,f as tsFileWithoutReact,d as tsFiles};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-airbnb-extended",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta-3",
|
|
4
4
|
"description": "Eslint Airbnb Config Extended",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -28,33 +28,33 @@
|
|
|
28
28
|
},
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"author": "Nisharg Shah <nishargshah3101@gmail.com>",
|
|
31
|
-
"type": "
|
|
31
|
+
"type": "module",
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
34
|
+
"import": "./dist/index.js",
|
|
35
|
+
"require": "./dist/index.cjs"
|
|
36
36
|
},
|
|
37
37
|
"./legacy": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
}
|
|
38
|
+
"import": "./dist/legacy.js",
|
|
39
|
+
"require": "./dist/legacy.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
41
42
|
},
|
|
42
|
-
"main": "./dist/index.
|
|
43
|
-
"
|
|
43
|
+
"main": "./dist/index.cjs",
|
|
44
|
+
"module": "./dist/index.js",
|
|
45
|
+
"types": "./dist/index.d.cts",
|
|
44
46
|
"dependencies": {
|
|
45
47
|
"confusing-browser-globals": "^1.0.11",
|
|
46
48
|
"globals": "^16.5.0"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
51
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"tsx": "^4.20.5",
|
|
53
|
-
"typescript": "^5.9.2"
|
|
52
|
+
"tsdown": "^0.16.8",
|
|
53
|
+
"tsx": "^4.21.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@next/eslint-plugin-next": "^15.0.0 || ^16.0.0",
|
|
57
|
-
"@stylistic/eslint-plugin": "^
|
|
57
|
+
"@stylistic/eslint-plugin": "^5.0.0",
|
|
58
58
|
"@types/eslint-plugin-jsx-a11y": "^6.0.0",
|
|
59
59
|
"eslint": "^9.0.0",
|
|
60
60
|
"eslint-import-resolver-typescript": "^4.0.0",
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
"node": ">=16.0.0"
|
|
109
109
|
},
|
|
110
110
|
"scripts": {
|
|
111
|
-
"prebuild": "pnpm check:updates
|
|
112
|
-
"build": "
|
|
113
|
-
"
|
|
111
|
+
"prebuild": "pnpm check:updates",
|
|
112
|
+
"build": "tsdown",
|
|
113
|
+
"build:dev": "tsdown --watch",
|
|
114
114
|
"check:updates": "tsx script/checkUpdates.ts",
|
|
115
115
|
"typecheck": "tsc --noEmit"
|
|
116
116
|
}
|
package/dist/@types/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Direct export isn't allowed, it will increase the size of d.ts
|
|
3
|
-
*/
|
|
4
|
-
export declare const rules: {
|
|
5
|
-
readonly base: Record<"strict" | "imports" | "variables" | "bestPractices" | "errors" | "es6" | "style" | "stylistic" | "stylisticPlus" | "importsStrict", import("eslint").Linter.Config>;
|
|
6
|
-
readonly node: Record<"globals" | "base" | "promises" | "noUnsupportedFeatures", import("eslint").Linter.Config>;
|
|
7
|
-
readonly react: Record<"strict" | "stylistic" | "base" | "jsxA11y" | "hooks", import("eslint").Linter.Config>;
|
|
8
|
-
readonly next: Record<"base" | "coreWebVitals", import("eslint").Linter.Config>;
|
|
9
|
-
readonly typescript: Record<"imports" | "stylistic" | "stylisticPlus" | "base" | "typescriptEslint" | "typescriptEslintStrict", import("eslint").Linter.Config>;
|
|
10
|
-
};
|
|
11
|
-
export declare const configs: {
|
|
12
|
-
readonly base: Record<"recommended" | "typescript" | "all", import("eslint").Linter.Config[]>;
|
|
13
|
-
readonly react: Record<"recommended" | "typescript" | "all", import("eslint").Linter.Config[]>;
|
|
14
|
-
readonly next: Record<"recommended" | "typescript" | "all", import("eslint").Linter.Config[]>;
|
|
15
|
-
readonly node: Record<"recommended", import("eslint").Linter.Config[]>;
|
|
16
|
-
};
|
|
17
|
-
export declare const plugins: {
|
|
18
|
-
readonly stylistic: import("eslint").Linter.Config;
|
|
19
|
-
readonly importX: import("eslint").Linter.Config;
|
|
20
|
-
readonly node: import("eslint").Linter.Config;
|
|
21
|
-
readonly react: import("eslint").Linter.Config;
|
|
22
|
-
readonly reactA11y: import("eslint").Linter.Config;
|
|
23
|
-
readonly reactHooks: import("eslint").Linter.Config;
|
|
24
|
-
readonly next: import("eslint").Linter.Config;
|
|
25
|
-
readonly typescriptEslint: import("eslint").Linter.Config;
|
|
26
|
-
};
|
|
27
|
-
export declare const extensions: {
|
|
28
|
-
readonly base: Record<"recommended" | "typescript", import("eslint").Linter.Config[]>;
|
|
29
|
-
readonly react: Record<"recommended" | "typescript", import("eslint").Linter.Config[]>;
|
|
30
|
-
readonly next: Record<"recommended", import("eslint").Linter.Config[]>;
|
|
31
|
-
readonly node: Record<"recommended", import("eslint").Linter.Config[]>;
|
|
32
|
-
};
|
package/dist/@types/legacy.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Direct export isn't allowed, it will increase the size of d.ts
|
|
3
|
-
*/
|
|
4
|
-
export declare const rules: {
|
|
5
|
-
readonly base: Record<"strict" | "imports" | "variables" | "bestPractices" | "errors" | "es6" | "style" | "node", import("eslint").Linter.Config>;
|
|
6
|
-
readonly react: Record<"base" | "jsxA11y" | "hooks", import("eslint").Linter.Config>;
|
|
7
|
-
readonly typescript: Record<"overrides" | "base" | "settings", import("eslint").Linter.Config>;
|
|
8
|
-
};
|
|
9
|
-
export declare const configs: {
|
|
10
|
-
readonly base: Record<"recommended" | "typescript" | "legacy", import("eslint").Linter.Config[]>;
|
|
11
|
-
readonly react: Record<"recommended" | "typescript" | "base" | "hooks" | "legacy", import("eslint").Linter.Config[]>;
|
|
12
|
-
};
|