eslint-config-airbnb-extended 2.3.3 → 3.0.0-beta-2
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/stylisticPlus.cjs +1 -0
- package/dist/rules/stylisticPlus.js +1 -16
- 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/typescript/typescriptStylisticPlus.cjs +1 -0
- package/dist/rules/typescript/typescriptStylisticPlus.js +1 -16
- 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 +16 -16
- package/dist/@types/index.d.ts +0 -32
- package/dist/@types/legacy.d.ts +0 -12
package/dist/rules/style.js
CHANGED
|
@@ -1,205 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../utils");
|
|
4
|
-
const styleRules = {
|
|
5
|
-
name: 'airbnb/config/style',
|
|
6
|
-
files: utils_1.allFiles,
|
|
7
|
-
rules: {
|
|
8
|
-
// require camel case names
|
|
9
|
-
camelcase: [
|
|
10
|
-
'error',
|
|
11
|
-
{
|
|
12
|
-
properties: 'never',
|
|
13
|
-
ignoreDestructuring: false,
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
// enforce or disallow capitalization of the first letter of a comment
|
|
17
|
-
// https://eslint.org/docs/latest/rules/capitalized-comments
|
|
18
|
-
'capitalized-comments': [
|
|
19
|
-
'off',
|
|
20
|
-
'never',
|
|
21
|
-
{
|
|
22
|
-
line: {
|
|
23
|
-
ignorePattern: '.*',
|
|
24
|
-
ignoreInlineComments: true,
|
|
25
|
-
ignoreConsecutiveComments: true,
|
|
26
|
-
},
|
|
27
|
-
block: {
|
|
28
|
-
ignorePattern: '.*',
|
|
29
|
-
ignoreInlineComments: true,
|
|
30
|
-
ignoreConsecutiveComments: true,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
// enforces consistent naming when capturing the current execution context
|
|
35
|
-
'consistent-this': 'off',
|
|
36
|
-
// requires function names to match the name of the variable or property to which they are
|
|
37
|
-
// assigned
|
|
38
|
-
// https://eslint.org/docs/latest/rules/func-name-matching
|
|
39
|
-
'func-name-matching': [
|
|
40
|
-
'off',
|
|
41
|
-
'always',
|
|
42
|
-
{
|
|
43
|
-
includeCommonJSModuleExports: false,
|
|
44
|
-
considerPropertyDescriptor: true,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
// require function expressions to have a name
|
|
48
|
-
// https://eslint.org/docs/latest/rules/func-names
|
|
49
|
-
'func-names': 'warn',
|
|
50
|
-
// enforces use of function declarations or expressions
|
|
51
|
-
// https://eslint.org/docs/latest/rules/func-style
|
|
52
|
-
// TODO: enable
|
|
53
|
-
'func-style': ['off', 'expression'],
|
|
54
|
-
// disallow specified identifiers
|
|
55
|
-
// https://eslint.org/docs/latest/rules/id-denylist
|
|
56
|
-
'id-denylist': 'off',
|
|
57
|
-
// this option enforces minimum and maximum identifier lengths
|
|
58
|
-
// (variable names, property names etc.)
|
|
59
|
-
'id-length': 'off',
|
|
60
|
-
// require identifiers to match the provided regular expression
|
|
61
|
-
'id-match': 'off',
|
|
62
|
-
// Require or disallow logical assignment logical operator shorthand
|
|
63
|
-
// https://eslint.org/docs/latest/rules/logical-assignment-operators
|
|
64
|
-
// TODO, semver-major: enable
|
|
65
|
-
'logical-assignment-operators': [
|
|
66
|
-
'off',
|
|
67
|
-
'always',
|
|
68
|
-
{
|
|
69
|
-
enforceForIfStatements: true,
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
// specify the maximum depth that blocks can be nested
|
|
73
|
-
'max-depth': ['off', 4],
|
|
74
|
-
// specify the max number of lines in a file
|
|
75
|
-
// https://eslint.org/docs/latest/rules/max-lines
|
|
76
|
-
'max-lines': [
|
|
77
|
-
'off',
|
|
78
|
-
{
|
|
79
|
-
max: 300,
|
|
80
|
-
skipBlankLines: true,
|
|
81
|
-
skipComments: true,
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
// enforce a maximum function length
|
|
85
|
-
// https://eslint.org/docs/latest/rules/max-lines-per-function
|
|
86
|
-
'max-lines-per-function': [
|
|
87
|
-
'off',
|
|
88
|
-
{
|
|
89
|
-
max: 50,
|
|
90
|
-
skipBlankLines: true,
|
|
91
|
-
skipComments: true,
|
|
92
|
-
IIFEs: true,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
// specify the maximum depth callbacks can be nested
|
|
96
|
-
'max-nested-callbacks': 'off',
|
|
97
|
-
// limits the number of parameters that can be used in the function declaration.
|
|
98
|
-
'max-params': ['off', 3],
|
|
99
|
-
// specify the maximum number of statement allowed in a function
|
|
100
|
-
'max-statements': ['off', 10],
|
|
101
|
-
// require a capital letter for constructors
|
|
102
|
-
'new-cap': [
|
|
103
|
-
'error',
|
|
104
|
-
{
|
|
105
|
-
newIsCap: true,
|
|
106
|
-
newIsCapExceptions: [],
|
|
107
|
-
capIsNew: false,
|
|
108
|
-
capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'],
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
// disallow use of the Array constructor
|
|
112
|
-
'no-array-constructor': 'error',
|
|
113
|
-
// disallow use of bitwise operators
|
|
114
|
-
// https://eslint.org/docs/latest/rules/no-bitwise
|
|
115
|
-
'no-bitwise': 'error',
|
|
116
|
-
// disallow use of the continue statement
|
|
117
|
-
// https://eslint.org/docs/latest/rules/no-continue
|
|
118
|
-
'no-continue': 'error',
|
|
119
|
-
// disallow comments inline after code
|
|
120
|
-
'no-inline-comments': 'off',
|
|
121
|
-
// disallow if as the only statement in an else block
|
|
122
|
-
// https://eslint.org/docs/latest/rules/no-lonely-if
|
|
123
|
-
'no-lonely-if': 'error',
|
|
124
|
-
// disallow use of chained assignment expressions
|
|
125
|
-
// https://eslint.org/docs/latest/rules/no-multi-assign
|
|
126
|
-
'no-multi-assign': 'error',
|
|
127
|
-
// disallow negated conditions
|
|
128
|
-
// https://eslint.org/docs/latest/rules/no-negated-condition
|
|
129
|
-
'no-negated-condition': 'off',
|
|
130
|
-
// disallow nested ternary expressions
|
|
131
|
-
'no-nested-ternary': 'error',
|
|
132
|
-
// disallow use of unary operators, ++ and --
|
|
133
|
-
// https://eslint.org/docs/latest/rules/no-plusplus
|
|
134
|
-
'no-plusplus': 'error',
|
|
135
|
-
// disallow certain syntax forms
|
|
136
|
-
// https://eslint.org/docs/latest/rules/no-restricted-syntax
|
|
137
|
-
'no-restricted-syntax': [
|
|
138
|
-
'error',
|
|
139
|
-
{
|
|
140
|
-
selector: 'ForInStatement',
|
|
141
|
-
message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
selector: 'ForOfStatement',
|
|
145
|
-
message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.',
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
selector: 'LabeledStatement',
|
|
149
|
-
message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
selector: 'WithStatement',
|
|
153
|
-
message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
// disallow the use of ternary operators
|
|
157
|
-
'no-ternary': 'off',
|
|
158
|
-
// disallow dangling underscores in identifiers
|
|
159
|
-
// https://eslint.org/docs/latest/rules/no-underscore-dangle
|
|
160
|
-
'no-underscore-dangle': [
|
|
161
|
-
'error',
|
|
162
|
-
{
|
|
163
|
-
allow: [],
|
|
164
|
-
allowAfterThis: false,
|
|
165
|
-
allowAfterSuper: false,
|
|
166
|
-
enforceInMethodNames: true,
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
// disallow the use of Boolean literals in conditional expressions
|
|
170
|
-
// also, prefer `a || b` over `a ? a : b`
|
|
171
|
-
// https://eslint.org/docs/latest/rules/no-unneeded-ternary
|
|
172
|
-
'no-unneeded-ternary': [
|
|
173
|
-
'error',
|
|
174
|
-
{
|
|
175
|
-
defaultAssignment: false,
|
|
176
|
-
},
|
|
177
|
-
],
|
|
178
|
-
// allow just one var statement per function
|
|
179
|
-
'one-var': ['error', 'never'],
|
|
180
|
-
// require assignment operator shorthand where possible or prohibit it entirely
|
|
181
|
-
// https://eslint.org/docs/latest/rules/operator-assignment
|
|
182
|
-
'operator-assignment': ['error', 'always'],
|
|
183
|
-
// Disallow the use of Math.pow in favor of the ** operator
|
|
184
|
-
// https://eslint.org/docs/latest/rules/prefer-exponentiation-operator
|
|
185
|
-
'prefer-exponentiation-operator': 'error',
|
|
186
|
-
// Prefer use of an object spread over Object.assign
|
|
187
|
-
// https://eslint.org/docs/latest/rules/prefer-object-spread
|
|
188
|
-
'prefer-object-spread': 'error',
|
|
189
|
-
// requires object keys to be sorted
|
|
190
|
-
'sort-keys': [
|
|
191
|
-
'off',
|
|
192
|
-
'asc',
|
|
193
|
-
{
|
|
194
|
-
caseSensitive: false,
|
|
195
|
-
natural: true,
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
// sort variables within the same declaration block
|
|
199
|
-
'sort-vars': 'off',
|
|
200
|
-
// require or disallow the Unicode Byte Order Mark
|
|
201
|
-
// https://eslint.org/docs/latest/rules/unicode-bom
|
|
202
|
-
'unicode-bom': ['error', 'never'],
|
|
203
|
-
},
|
|
204
|
-
};
|
|
205
|
-
exports.default = styleRules;
|
|
1
|
+
import{__esmMin as e}from"../_virtual/rolldown_runtime.js";import{allFiles as t,init_utils as n}from"../utils/index.js";var r,i,a=e((()=>{n(),r={name:`airbnb/config/style`,files:t,rules:{camelcase:[`error`,{properties:`never`,ignoreDestructuring:!1}],"capitalized-comments":[`off`,`never`,{line:{ignorePattern:`.*`,ignoreInlineComments:!0,ignoreConsecutiveComments:!0},block:{ignorePattern:`.*`,ignoreInlineComments:!0,ignoreConsecutiveComments:!0}}],"consistent-this":`off`,"func-name-matching":[`off`,`always`,{includeCommonJSModuleExports:!1,considerPropertyDescriptor:!0}],"func-names":`warn`,"func-style":[`off`,`expression`],"id-denylist":`off`,"id-length":`off`,"id-match":`off`,"logical-assignment-operators":[`off`,`always`,{enforceForIfStatements:!0}],"max-depth":[`off`,4],"max-lines":[`off`,{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":[`off`,{max:50,skipBlankLines:!0,skipComments:!0,IIFEs:!0}],"max-nested-callbacks":`off`,"max-params":[`off`,3],"max-statements":[`off`,10],"new-cap":[`error`,{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:[`Immutable.Map`,`Immutable.Set`,`Immutable.List`]}],"no-array-constructor":`error`,"no-bitwise":`error`,"no-continue":`error`,"no-inline-comments":`off`,"no-lonely-if":`error`,"no-multi-assign":`error`,"no-negated-condition":`off`,"no-nested-ternary":`error`,"no-plusplus":`error`,"no-restricted-syntax":[`error`,{selector:`ForInStatement`,message:`for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.`},{selector:`ForOfStatement`,message:`iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.`},{selector:`LabeledStatement`,message:`Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.`},{selector:`WithStatement`,message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize."}],"no-ternary":`off`,"no-underscore-dangle":[`error`,{allow:[],allowAfterThis:!1,allowAfterSuper:!1,enforceInMethodNames:!0}],"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"one-var":[`error`,`never`],"operator-assignment":[`error`,`always`],"prefer-exponentiation-operator":`error`,"prefer-object-spread":`error`,"sort-keys":[`off`,`asc`,{caseSensitive:!1,natural:!0}],"sort-vars":`off`,"unicode-bom":[`error`,`never`]}},i=r}));a();export{i as default,a as init_style};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);var n,r,i,a=e.__esmMin((()=>{t.init_utils(),n={name:`airbnb/config/stylistic`,files:t.allFiles,rules:{"@stylistic/array-bracket-newline":`off`,"@stylistic/array-bracket-spacing":[`error`,`never`],"@stylistic/array-element-newline":`off`,"@stylistic/arrow-parens":[`error`,`always`],"@stylistic/arrow-spacing":[`error`,{before:!0,after:!0}],"@stylistic/block-spacing":[`error`,`always`],"@stylistic/brace-style":[`error`,`1tbs`,{allowSingleLine:!1}],"@stylistic/comma-dangle":[`error`,{arrays:`always-multiline`,objects:`always-multiline`,imports:`always-multiline`,exports:`always-multiline`,functions:`always-multiline`,importAttributes:`never`,dynamicImports:`never`}],"@stylistic/comma-spacing":[`error`,{before:!1,after:!0}],"@stylistic/comma-style":[`error`,`last`],"@stylistic/computed-property-spacing":[`error`,`never`,{enforceForClassMembers:!0}],"@stylistic/dot-location":[`error`,`property`],"@stylistic/eol-last":[`error`,`always`],"@stylistic/function-call-argument-newline":[`error`,`consistent`],"@stylistic/function-call-spacing":[`error`,`never`],"@stylistic/function-paren-newline":[`error`,`multiline-arguments`],"@stylistic/generator-star-spacing":[`error`,{before:!1,after:!0,anonymous:`after`,method:`after`}],"@stylistic/implicit-arrow-linebreak":[`error`,`beside`],"@stylistic/indent":[`error`,2,{ignoredNodes:[`JSXElement`,`JSXElement > *`,`JSXAttribute`,`JSXIdentifier`,`JSXNamespacedName`,`JSXMemberExpression`,`JSXSpreadAttribute`,`JSXExpressionContainer`,`JSXOpeningElement`,`JSXClosingElement`,`JSXFragment`,`JSXOpeningFragment`,`JSXClosingFragment`,`JSXText`,`JSXEmptyExpression`,`JSXSpreadChild`],SwitchCase:1,VariableDeclarator:1,outerIIFEBody:1,MemberExpression:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},StaticBlock:{body:1},CallExpression:{arguments:1},ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,offsetTernaryExpressions:!1,offsetTernaryExpressionsOffsetCallExpressions:!0,ignoreComments:!1,tabLength:2}],"@stylistic/jsx-quotes":`off`,"@stylistic/key-spacing":[`error`,{beforeColon:!1,afterColon:!0}],"@stylistic/keyword-spacing":[`error`,{before:!0,after:!0,overrides:{}}],"@stylistic/line-comment-position":`off`,"@stylistic/linebreak-style":[`error`,`unix`],"@stylistic/lines-around-comment":`off`,"@stylistic/lines-between-class-members":[`error`,`always`,{exceptAfterSingleLine:!1}],"@stylistic/max-len":[`error`,{code:100,tabWidth:2}],"@stylistic/max-statements-per-line":[`error`,{max:1}],"@stylistic/multiline-comment-style":`off`,"@stylistic/multiline-ternary":`off`,"@stylistic/new-parens":`error`,"@stylistic/newline-per-chained-call":[`error`,{ignoreChainWithDepth:4}],"@stylistic/no-confusing-arrow":[`error`,{allowParens:!0,onlyOneSimpleParam:!1}],"@stylistic/no-extra-parens":`off`,"@stylistic/no-extra-semi":`error`,"@stylistic/no-floating-decimal":`error`,"@stylistic/no-mixed-operators":[`error`,{groups:[[`%`,`**`],[`%`,`+`],[`%`,`-`],[`%`,`*`],[`%`,`/`],[`/`,`*`],[`&`,`|`,`<<`,`>>`,`>>>`],[`==`,`!=`,`===`,`!==`],[`&&`,`||`]],allowSamePrecedence:!1}],"@stylistic/no-mixed-spaces-and-tabs":`error`,"@stylistic/no-multi-spaces":[`error`,{ignoreEOLComments:!1}],"@stylistic/no-multiple-empty-lines":[`error`,{max:1,maxBOF:0,maxEOF:0}],"@stylistic/no-tabs":[`error`,{allowIndentationTabs:!1}],"@stylistic/no-trailing-spaces":[`error`,{skipBlankLines:!1,ignoreComments:!1}],"@stylistic/no-whitespace-before-property":`error`,"@stylistic/nonblock-statement-body-position":[`error`,`beside`,{overrides:{}}],"@stylistic/object-curly-newline":[`error`,{ObjectExpression:{minProperties:4,multiline:!0,consistent:!0},ObjectPattern:{minProperties:4,multiline:!0,consistent:!0},ImportDeclaration:{minProperties:4,multiline:!0,consistent:!0},ExportDeclaration:{minProperties:4,multiline:!0,consistent:!0}}],"@stylistic/object-curly-spacing":[`error`,`always`],"@stylistic/object-property-newline":[`error`,{allowAllPropertiesOnSameLine:!0}],"@stylistic/one-var-declaration-per-line":[`error`,`always`],"@stylistic/operator-linebreak":[`error`,`before`,{overrides:{"=":`none`}}],"@stylistic/padded-blocks":[`error`,{blocks:`never`,classes:`never`,switches:`never`},{allowSingleLineBlocks:!0}],"@stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:`directive`,next:`*`},{blankLine:`any`,prev:`directive`,next:`directive`}],"@stylistic/quote-props":[`error`,`as-needed`,{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/quotes":[`error`,`single`,{avoidEscape:!0}],"@stylistic/rest-spread-spacing":[`error`,`never`],"@stylistic/semi":[`error`,`always`],"@stylistic/semi-spacing":[`error`,{before:!1,after:!0}],"@stylistic/semi-style":[`error`,`last`],"@stylistic/space-before-blocks":`error`,"@stylistic/space-before-function-paren":[`error`,{anonymous:`always`,named:`never`,asyncArrow:`always`}],"@stylistic/space-in-parens":[`error`,`never`],"@stylistic/space-infix-ops":[`error`,{int32Hint:!1}],"@stylistic/space-unary-ops":[`error`,{words:!0,nonwords:!1,overrides:{}}],"@stylistic/spaced-comment":[`error`,`always`,{line:{exceptions:[`-`,`+`],markers:[`=`,`!`,`/`]},block:{exceptions:[`-`,`+`],markers:[`=`,`!`,`:`,`::`],balanced:!0}}],"@stylistic/switch-colon-spacing":[`error`,{after:!0,before:!1}],"@stylistic/template-curly-spacing":[`error`,`never`],"@stylistic/template-tag-spacing":[`error`,`never`],"@stylistic/wrap-iife":[`error`,`outside`,{functionPrototypeMethods:!1}],"@stylistic/wrap-regex":`off`,"@stylistic/yield-star-spacing":[`error`,`after`]}},r={name:`airbnb/config/stylistic/deprecated`,files:t.allFiles,rules:{"@stylistic/func-call-spacing":`off`}},i=n}));a(),exports.default=i,exports.deprecatedStylisticRules=r,Object.defineProperty(exports,`init_stylistic`,{enumerable:!0,get:function(){return a}});
|