eslint-config-airbnb-extended 2.3.2 → 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 -36
- 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 +18 -18
- package/dist/@types/index.d.ts +0 -32
- package/dist/@types/legacy.d.ts +0 -12
package/dist/rules/stylistic.js
CHANGED
|
@@ -1,524 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deprecatedStylisticRules = void 0;
|
|
4
|
-
const utils_1 = require("../utils");
|
|
5
|
-
const stylisticRules = {
|
|
6
|
-
name: 'airbnb/config/stylistic',
|
|
7
|
-
files: utils_1.allFiles,
|
|
8
|
-
rules: {
|
|
9
|
-
// enforce line breaks after opening and before closing array brackets
|
|
10
|
-
// https://eslint.style/rules/js/array-bracket-newline
|
|
11
|
-
'@stylistic/array-bracket-newline': 'off',
|
|
12
|
-
// enforce spacing inside array brackets
|
|
13
|
-
// https://eslint.style/rules/js/array-bracket-spacing
|
|
14
|
-
'@stylistic/array-bracket-spacing': ['error', 'never'],
|
|
15
|
-
// enforce line breaks between array elements
|
|
16
|
-
// https://eslint.style/rules/js/array-element-newline
|
|
17
|
-
'@stylistic/array-element-newline': 'off',
|
|
18
|
-
// require parens in arrow function arguments
|
|
19
|
-
// https://eslint.style/rules/js/arrow-parens
|
|
20
|
-
'@stylistic/arrow-parens': ['error', 'always'],
|
|
21
|
-
// require space before/after arrow function's arrow
|
|
22
|
-
// https://eslint.style/rules/js/arrow-spacing
|
|
23
|
-
'@stylistic/arrow-spacing': [
|
|
24
|
-
'error',
|
|
25
|
-
{
|
|
26
|
-
before: true,
|
|
27
|
-
after: true,
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
// enforce spacing inside single-line blocks
|
|
31
|
-
// https://eslint.style/rules/js/block-spacing
|
|
32
|
-
'@stylistic/block-spacing': ['error', 'always'],
|
|
33
|
-
// enforce one true brace style
|
|
34
|
-
// https://eslint.style/rules/js/brace-style
|
|
35
|
-
'@stylistic/brace-style': [
|
|
36
|
-
'error',
|
|
37
|
-
'1tbs',
|
|
38
|
-
{
|
|
39
|
-
allowSingleLine: false,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
// require trailing commas in multiline object literals
|
|
43
|
-
// https://eslint.style/rules/js/comma-dangle
|
|
44
|
-
'@stylistic/comma-dangle': [
|
|
45
|
-
'error',
|
|
46
|
-
{
|
|
47
|
-
arrays: 'always-multiline',
|
|
48
|
-
objects: 'always-multiline',
|
|
49
|
-
imports: 'always-multiline',
|
|
50
|
-
exports: 'always-multiline',
|
|
51
|
-
functions: 'always-multiline',
|
|
52
|
-
importAttributes: 'never',
|
|
53
|
-
dynamicImports: 'never',
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
// enforce spacing before and after comma
|
|
57
|
-
// https://eslint.style/rules/js/comma-spacing
|
|
58
|
-
'@stylistic/comma-spacing': [
|
|
59
|
-
'error',
|
|
60
|
-
{
|
|
61
|
-
before: false,
|
|
62
|
-
after: true,
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
// enforce one true comma style
|
|
66
|
-
// https://eslint.style/rules/js/comma-style
|
|
67
|
-
'@stylistic/comma-style': ['error', 'last'],
|
|
68
|
-
// disallow padding inside computed properties
|
|
69
|
-
// https://eslint.style/rules/js/computed-property-spacing
|
|
70
|
-
'@stylistic/computed-property-spacing': [
|
|
71
|
-
'error',
|
|
72
|
-
'never',
|
|
73
|
-
{
|
|
74
|
-
enforceForClassMembers: true,
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
// enforces consistent newlines before or after dots
|
|
78
|
-
// https://eslint.style/rules/js/dot-location
|
|
79
|
-
'@stylistic/dot-location': ['error', 'property'],
|
|
80
|
-
// enforce newline at the end of file, with no multiple empty lines
|
|
81
|
-
// https://eslint.style/rules/js/eol-last
|
|
82
|
-
'@stylistic/eol-last': ['error', 'always'],
|
|
83
|
-
// enforce line breaks between arguments of a function call.
|
|
84
|
-
// https://eslint.style/rules/js/function-call-argument-newline
|
|
85
|
-
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
|
|
86
|
-
// enforce spacing between functions and their invocations
|
|
87
|
-
// https://eslint.style/rules/js/function-call-spacing
|
|
88
|
-
'@stylistic/function-call-spacing': ['error', 'never'],
|
|
89
|
-
// require line breaks inside function parentheses if there are line breaks between parameters
|
|
90
|
-
// https://eslint.style/rules/js/function-paren-newline
|
|
91
|
-
'@stylistic/function-paren-newline': ['error', 'multiline-arguments'],
|
|
92
|
-
// enforce the spacing around the * in generator functions
|
|
93
|
-
// https://eslint.style/rules/js/generator-star-spacing
|
|
94
|
-
'@stylistic/generator-star-spacing': [
|
|
95
|
-
'error',
|
|
96
|
-
{
|
|
97
|
-
before: false,
|
|
98
|
-
after: true,
|
|
99
|
-
anonymous: 'after',
|
|
100
|
-
method: 'after',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
// Enforce the location of arrow function bodies with implicit returns
|
|
104
|
-
// https://eslint.style/rules/js/implicit-arrow-linebreak
|
|
105
|
-
'@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
|
|
106
|
-
// this option sets a specific tab width for your code
|
|
107
|
-
// https://eslint.style/rules/js/indent
|
|
108
|
-
'@stylistic/indent': [
|
|
109
|
-
'error',
|
|
110
|
-
2,
|
|
111
|
-
{
|
|
112
|
-
// list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
|
|
113
|
-
ignoredNodes: [
|
|
114
|
-
'JSXElement',
|
|
115
|
-
'JSXElement > *',
|
|
116
|
-
'JSXAttribute',
|
|
117
|
-
'JSXIdentifier',
|
|
118
|
-
'JSXNamespacedName',
|
|
119
|
-
'JSXMemberExpression',
|
|
120
|
-
'JSXSpreadAttribute',
|
|
121
|
-
'JSXExpressionContainer',
|
|
122
|
-
'JSXOpeningElement',
|
|
123
|
-
'JSXClosingElement',
|
|
124
|
-
'JSXFragment',
|
|
125
|
-
'JSXOpeningFragment',
|
|
126
|
-
'JSXClosingFragment',
|
|
127
|
-
'JSXText',
|
|
128
|
-
'JSXEmptyExpression',
|
|
129
|
-
'JSXSpreadChild',
|
|
130
|
-
],
|
|
131
|
-
SwitchCase: 1,
|
|
132
|
-
VariableDeclarator: 1,
|
|
133
|
-
outerIIFEBody: 1,
|
|
134
|
-
MemberExpression: 1,
|
|
135
|
-
FunctionDeclaration: {
|
|
136
|
-
parameters: 1,
|
|
137
|
-
body: 1,
|
|
138
|
-
},
|
|
139
|
-
FunctionExpression: {
|
|
140
|
-
parameters: 1,
|
|
141
|
-
body: 1,
|
|
142
|
-
},
|
|
143
|
-
StaticBlock: {
|
|
144
|
-
body: 1,
|
|
145
|
-
},
|
|
146
|
-
CallExpression: {
|
|
147
|
-
arguments: 1,
|
|
148
|
-
},
|
|
149
|
-
ArrayExpression: 1,
|
|
150
|
-
ObjectExpression: 1,
|
|
151
|
-
ImportDeclaration: 1,
|
|
152
|
-
flatTernaryExpressions: false,
|
|
153
|
-
offsetTernaryExpressions: false,
|
|
154
|
-
offsetTernaryExpressionsOffsetCallExpressions: true,
|
|
155
|
-
ignoreComments: false,
|
|
156
|
-
tabLength: 2,
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
// specify whether double or single quotes should be used in JSX attributes
|
|
160
|
-
// https://eslint.style/rules/js/jsx-quotes
|
|
161
|
-
// Off due to react rule
|
|
162
|
-
'@stylistic/jsx-quotes': 'off',
|
|
163
|
-
// enforces spacing between keys and values in object literal properties
|
|
164
|
-
// https://eslint.style/rules/js/key-spacing
|
|
165
|
-
'@stylistic/key-spacing': [
|
|
166
|
-
'error',
|
|
167
|
-
{
|
|
168
|
-
beforeColon: false,
|
|
169
|
-
afterColon: true,
|
|
170
|
-
},
|
|
171
|
-
],
|
|
172
|
-
// require a space before & after certain keywords
|
|
173
|
-
// https://eslint.style/rules/js/keyword-spacing
|
|
174
|
-
'@stylistic/keyword-spacing': [
|
|
175
|
-
'error',
|
|
176
|
-
{
|
|
177
|
-
before: true,
|
|
178
|
-
after: true,
|
|
179
|
-
overrides: {},
|
|
180
|
-
},
|
|
181
|
-
],
|
|
182
|
-
// enforce the position of line comments
|
|
183
|
-
// https://eslint.style/rules/js/line-comment-position
|
|
184
|
-
'@stylistic/line-comment-position': 'off',
|
|
185
|
-
// disallow mixed 'LF' and 'CRLF' as linebreaks
|
|
186
|
-
// https://eslint.style/rules/js/linebreak-style
|
|
187
|
-
'@stylistic/linebreak-style': ['error', 'unix'],
|
|
188
|
-
// enforces empty lines around comments
|
|
189
|
-
// https://eslint.style/rules/js/lines-around-comment
|
|
190
|
-
'@stylistic/lines-around-comment': 'off',
|
|
191
|
-
// require or disallow an empty line between class members
|
|
192
|
-
// https://eslint.style/rules/js/lines-between-class-members
|
|
193
|
-
'@stylistic/lines-between-class-members': [
|
|
194
|
-
'error',
|
|
195
|
-
'always',
|
|
196
|
-
{
|
|
197
|
-
exceptAfterSingleLine: false,
|
|
198
|
-
},
|
|
199
|
-
],
|
|
200
|
-
// specify the maximum length of a line in your program
|
|
201
|
-
// https://eslint.style/rules/js/max-len
|
|
202
|
-
'@stylistic/max-len': [
|
|
203
|
-
'error',
|
|
204
|
-
{
|
|
205
|
-
code: 100,
|
|
206
|
-
tabWidth: 2,
|
|
207
|
-
},
|
|
208
|
-
],
|
|
209
|
-
// restrict the number of statements per line
|
|
210
|
-
// https://eslint.style/rules/js/max-statements-per-line
|
|
211
|
-
'@stylistic/max-statements-per-line': [
|
|
212
|
-
'error',
|
|
213
|
-
{
|
|
214
|
-
max: 1,
|
|
215
|
-
},
|
|
216
|
-
],
|
|
217
|
-
// enforce a particular style for multiline comments
|
|
218
|
-
// https://eslint.style/rules/js/multiline-comment-style
|
|
219
|
-
'@stylistic/multiline-comment-style': 'off',
|
|
220
|
-
// require multiline ternary
|
|
221
|
-
// https://eslint.style/rules/js/multiline-ternary
|
|
222
|
-
'@stylistic/multiline-ternary': 'off',
|
|
223
|
-
// disallow the omission of parentheses when invoking a constructor with no arguments
|
|
224
|
-
// https://eslint.style/rules/js/new-parens
|
|
225
|
-
'@stylistic/new-parens': 'error',
|
|
226
|
-
// enforces new line after each method call in the chain to make it
|
|
227
|
-
// more readable and easy to maintain
|
|
228
|
-
// https://eslint.style/rules/js/newline-per-chained-call
|
|
229
|
-
'@stylistic/newline-per-chained-call': [
|
|
230
|
-
'error',
|
|
231
|
-
{
|
|
232
|
-
ignoreChainWithDepth: 4,
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
// disallow arrow functions where they could be confused with comparisons
|
|
236
|
-
// https://eslint.style/rules/js/no-confusing-arrow
|
|
237
|
-
'@stylistic/no-confusing-arrow': [
|
|
238
|
-
'error',
|
|
239
|
-
{
|
|
240
|
-
allowParens: true,
|
|
241
|
-
onlyOneSimpleParam: false,
|
|
242
|
-
},
|
|
243
|
-
],
|
|
244
|
-
// disallow unnecessary parentheses
|
|
245
|
-
// https://eslint.style/rules/js/no-extra-parens
|
|
246
|
-
'@stylistic/no-extra-parens': 'off',
|
|
247
|
-
// disallow unnecessary semicolons
|
|
248
|
-
// https://eslint.style/rules/js/no-extra-semi
|
|
249
|
-
'@stylistic/no-extra-semi': 'error',
|
|
250
|
-
// disallow the use of leading or trailing decimal points in numeric literals
|
|
251
|
-
// https://eslint.style/rules/js/no-floating-decimal
|
|
252
|
-
'@stylistic/no-floating-decimal': 'error',
|
|
253
|
-
// disallow un-paren'd mixes of different operators
|
|
254
|
-
// https://eslint.style/rules/js/no-mixed-operators
|
|
255
|
-
'@stylistic/no-mixed-operators': [
|
|
256
|
-
'error',
|
|
257
|
-
{
|
|
258
|
-
// the list of arithmetic groups disallows mixing `%` and `**`
|
|
259
|
-
// with other arithmetic operators.
|
|
260
|
-
groups: [
|
|
261
|
-
['%', '**'],
|
|
262
|
-
['%', '+'],
|
|
263
|
-
['%', '-'],
|
|
264
|
-
['%', '*'],
|
|
265
|
-
['%', '/'],
|
|
266
|
-
['/', '*'],
|
|
267
|
-
['&', '|', '<<', '>>', '>>>'],
|
|
268
|
-
['==', '!=', '===', '!=='],
|
|
269
|
-
['&&', '||'],
|
|
270
|
-
],
|
|
271
|
-
allowSamePrecedence: false,
|
|
272
|
-
},
|
|
273
|
-
],
|
|
274
|
-
// disallow mixed spaces and tabs for indentation
|
|
275
|
-
// https://eslint.style/rules/js/no-mixed-spaces-and-tabs
|
|
276
|
-
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
|
277
|
-
// disallow use of multiple spaces
|
|
278
|
-
// https://eslint.style/rules/js/no-multi-spaces
|
|
279
|
-
'@stylistic/no-multi-spaces': [
|
|
280
|
-
'error',
|
|
281
|
-
{
|
|
282
|
-
ignoreEOLComments: false,
|
|
283
|
-
},
|
|
284
|
-
],
|
|
285
|
-
// disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
|
|
286
|
-
// https://eslint.style/rules/js/no-multiple-empty-lines
|
|
287
|
-
'@stylistic/no-multiple-empty-lines': [
|
|
288
|
-
'error',
|
|
289
|
-
{
|
|
290
|
-
max: 1,
|
|
291
|
-
maxBOF: 0,
|
|
292
|
-
maxEOF: 0,
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
// disallow tab characters entirely
|
|
296
|
-
// https://eslint.style/rules/js/no-tabs
|
|
297
|
-
'@stylistic/no-tabs': [
|
|
298
|
-
'error',
|
|
299
|
-
{
|
|
300
|
-
allowIndentationTabs: false,
|
|
301
|
-
},
|
|
302
|
-
],
|
|
303
|
-
// disallow trailing whitespace at the end of lines
|
|
304
|
-
// https://eslint.style/rules/js/no-trailing-spaces
|
|
305
|
-
'@stylistic/no-trailing-spaces': [
|
|
306
|
-
'error',
|
|
307
|
-
{
|
|
308
|
-
skipBlankLines: false,
|
|
309
|
-
ignoreComments: false,
|
|
310
|
-
},
|
|
311
|
-
],
|
|
312
|
-
// disallow whitespace before properties
|
|
313
|
-
// https://eslint.style/rules/js/no-whitespace-before-property
|
|
314
|
-
'@stylistic/no-whitespace-before-property': 'error',
|
|
315
|
-
// enforce the location of single-line statements
|
|
316
|
-
// https://eslint.style/rules/js/nonblock-statement-body-position
|
|
317
|
-
'@stylistic/nonblock-statement-body-position': [
|
|
318
|
-
'error',
|
|
319
|
-
'beside',
|
|
320
|
-
{
|
|
321
|
-
overrides: {},
|
|
322
|
-
},
|
|
323
|
-
],
|
|
324
|
-
// enforce line breaks between braces
|
|
325
|
-
// https://eslint.style/rules/js/object-curly-newline
|
|
326
|
-
'@stylistic/object-curly-newline': [
|
|
327
|
-
'error',
|
|
328
|
-
{
|
|
329
|
-
ObjectExpression: {
|
|
330
|
-
minProperties: 4,
|
|
331
|
-
multiline: true,
|
|
332
|
-
consistent: true,
|
|
333
|
-
},
|
|
334
|
-
ObjectPattern: {
|
|
335
|
-
minProperties: 4,
|
|
336
|
-
multiline: true,
|
|
337
|
-
consistent: true,
|
|
338
|
-
},
|
|
339
|
-
ImportDeclaration: {
|
|
340
|
-
minProperties: 4,
|
|
341
|
-
multiline: true,
|
|
342
|
-
consistent: true,
|
|
343
|
-
},
|
|
344
|
-
ExportDeclaration: {
|
|
345
|
-
minProperties: 4,
|
|
346
|
-
multiline: true,
|
|
347
|
-
consistent: true,
|
|
348
|
-
},
|
|
349
|
-
},
|
|
350
|
-
],
|
|
351
|
-
// require padding inside curly braces
|
|
352
|
-
// https://eslint.style/rules/js/object-curly-spacing
|
|
353
|
-
'@stylistic/object-curly-spacing': ['error', 'always'],
|
|
354
|
-
// enforce "same line" or "multiple line" on object properties.
|
|
355
|
-
// https://eslint.style/rules/js/object-property-newline
|
|
356
|
-
'@stylistic/object-property-newline': [
|
|
357
|
-
'error',
|
|
358
|
-
{
|
|
359
|
-
allowAllPropertiesOnSameLine: true,
|
|
360
|
-
},
|
|
361
|
-
],
|
|
362
|
-
// require a newline around variable declaration
|
|
363
|
-
// https://eslint.style/rules/js/one-var-declaration-per-line
|
|
364
|
-
'@stylistic/one-var-declaration-per-line': ['error', 'always'],
|
|
365
|
-
// Requires operator at the beginning of the line in multiline statements
|
|
366
|
-
// https://eslint.style/rules/js/operator-linebreak
|
|
367
|
-
'@stylistic/operator-linebreak': [
|
|
368
|
-
'error',
|
|
369
|
-
'before',
|
|
370
|
-
{
|
|
371
|
-
overrides: { '=': 'none' },
|
|
372
|
-
},
|
|
373
|
-
],
|
|
374
|
-
// disallow padding within blocks
|
|
375
|
-
// https://eslint.style/rules/js/padded-blocks
|
|
376
|
-
'@stylistic/padded-blocks': [
|
|
377
|
-
'error',
|
|
378
|
-
{
|
|
379
|
-
blocks: 'never',
|
|
380
|
-
classes: 'never',
|
|
381
|
-
switches: 'never',
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
allowSingleLineBlocks: true,
|
|
385
|
-
},
|
|
386
|
-
],
|
|
387
|
-
// Require or disallow padding lines between statements
|
|
388
|
-
// https://eslint.style/rules/js/padding-line-between-statements
|
|
389
|
-
'@stylistic/padding-line-between-statements': [
|
|
390
|
-
'error',
|
|
391
|
-
{ blankLine: 'always', prev: 'directive', next: '*' },
|
|
392
|
-
{ blankLine: 'any', prev: 'directive', next: 'directive' },
|
|
393
|
-
],
|
|
394
|
-
// require quotes around object literal property names
|
|
395
|
-
// https://eslint.style/rules/js/quote-props
|
|
396
|
-
'@stylistic/quote-props': [
|
|
397
|
-
'error',
|
|
398
|
-
'as-needed',
|
|
399
|
-
{
|
|
400
|
-
keywords: false,
|
|
401
|
-
unnecessary: true,
|
|
402
|
-
numbers: false,
|
|
403
|
-
},
|
|
404
|
-
],
|
|
405
|
-
// specify whether double or single quotes should be used
|
|
406
|
-
// https://eslint.style/rules/js/quotes
|
|
407
|
-
'@stylistic/quotes': [
|
|
408
|
-
'error',
|
|
409
|
-
'single',
|
|
410
|
-
{
|
|
411
|
-
avoidEscape: true,
|
|
412
|
-
},
|
|
413
|
-
],
|
|
414
|
-
// enforce spacing between object rest-spread
|
|
415
|
-
// https://eslint.style/rules/js/rest-spread-spacing
|
|
416
|
-
'@stylistic/rest-spread-spacing': ['error', 'never'],
|
|
417
|
-
// require or disallow use of semicolons instead of ASI
|
|
418
|
-
// https://eslint.style/rules/js/semi
|
|
419
|
-
'@stylistic/semi': ['error', 'always'],
|
|
420
|
-
// enforce spacing before and after semicolons
|
|
421
|
-
// https://eslint.style/rules/js/semi-spacing
|
|
422
|
-
'@stylistic/semi-spacing': [
|
|
423
|
-
'error',
|
|
424
|
-
{
|
|
425
|
-
before: false,
|
|
426
|
-
after: true,
|
|
427
|
-
},
|
|
428
|
-
],
|
|
429
|
-
// Enforce location of semicolons
|
|
430
|
-
// https://eslint.style/rules/js/semi-style
|
|
431
|
-
'@stylistic/semi-style': ['error', 'last'],
|
|
432
|
-
// require or disallow space before blocks
|
|
433
|
-
// https://eslint.style/rules/js/space-before-blocks
|
|
434
|
-
'@stylistic/space-before-blocks': 'error',
|
|
435
|
-
// require or disallow space before function opening parenthesis
|
|
436
|
-
// https://eslint.style/rules/js/space-before-function-paren
|
|
437
|
-
'@stylistic/space-before-function-paren': [
|
|
438
|
-
'error',
|
|
439
|
-
{
|
|
440
|
-
anonymous: 'always',
|
|
441
|
-
named: 'never',
|
|
442
|
-
asyncArrow: 'always',
|
|
443
|
-
},
|
|
444
|
-
],
|
|
445
|
-
// require or disallow spaces inside parentheses
|
|
446
|
-
// https://eslint.style/rules/js/space-in-parens
|
|
447
|
-
'@stylistic/space-in-parens': ['error', 'never'],
|
|
448
|
-
// require spaces around operators
|
|
449
|
-
// https://eslint.style/rules/js/space-infix-ops
|
|
450
|
-
'@stylistic/space-infix-ops': [
|
|
451
|
-
'error',
|
|
452
|
-
{
|
|
453
|
-
int32Hint: false,
|
|
454
|
-
},
|
|
455
|
-
],
|
|
456
|
-
// Require or disallow spaces before/after unary operators
|
|
457
|
-
// https://eslint.style/rules/js/space-unary-ops
|
|
458
|
-
'@stylistic/space-unary-ops': [
|
|
459
|
-
'error',
|
|
460
|
-
{
|
|
461
|
-
words: true,
|
|
462
|
-
nonwords: false,
|
|
463
|
-
overrides: {},
|
|
464
|
-
},
|
|
465
|
-
],
|
|
466
|
-
// require or disallow a space immediately following the // or /* in a comment
|
|
467
|
-
// https://eslint.style/rules/js/spaced-comment
|
|
468
|
-
'@stylistic/spaced-comment': [
|
|
469
|
-
'error',
|
|
470
|
-
'always',
|
|
471
|
-
{
|
|
472
|
-
line: {
|
|
473
|
-
exceptions: ['-', '+'],
|
|
474
|
-
markers: ['=', '!', '/'], // space here to support sprockets directives, slash for TS /// comments
|
|
475
|
-
},
|
|
476
|
-
block: {
|
|
477
|
-
exceptions: ['-', '+'],
|
|
478
|
-
markers: ['=', '!', ':', '::'], // space here to support sprockets directives and flow comment types
|
|
479
|
-
balanced: true,
|
|
480
|
-
},
|
|
481
|
-
},
|
|
482
|
-
],
|
|
483
|
-
// Enforce spacing around colons of switch statements
|
|
484
|
-
// https://eslint.style/rules/js/switch-colon-spacing
|
|
485
|
-
'@stylistic/switch-colon-spacing': [
|
|
486
|
-
'error',
|
|
487
|
-
{
|
|
488
|
-
after: true,
|
|
489
|
-
before: false,
|
|
490
|
-
},
|
|
491
|
-
],
|
|
492
|
-
// enforce usage of spacing in template strings
|
|
493
|
-
// https://eslint.style/rules/js/template-curly-spacing
|
|
494
|
-
'@stylistic/template-curly-spacing': ['error', 'never'],
|
|
495
|
-
// Require or disallow spacing between template tags and their literals
|
|
496
|
-
// https://eslint.style/rules/js/template-tag-spacing
|
|
497
|
-
'@stylistic/template-tag-spacing': ['error', 'never'],
|
|
498
|
-
// require immediate function invocation to be wrapped in parentheses
|
|
499
|
-
// https://eslint.style/rules/js/wrap-iife
|
|
500
|
-
'@stylistic/wrap-iife': [
|
|
501
|
-
'error',
|
|
502
|
-
'outside',
|
|
503
|
-
{
|
|
504
|
-
functionPrototypeMethods: false,
|
|
505
|
-
},
|
|
506
|
-
],
|
|
507
|
-
// require regex literals to be wrapped in parentheses
|
|
508
|
-
// https://eslint.style/rules/js/wrap-regex
|
|
509
|
-
'@stylistic/wrap-regex': 'off',
|
|
510
|
-
// enforce spacing around the * in yield* expressions
|
|
511
|
-
// https://eslint.style/rules/js/yield-star-spacing
|
|
512
|
-
'@stylistic/yield-star-spacing': ['error', 'after'],
|
|
513
|
-
},
|
|
514
|
-
};
|
|
515
|
-
exports.deprecatedStylisticRules = {
|
|
516
|
-
name: 'airbnb/config/stylistic/deprecated',
|
|
517
|
-
files: utils_1.allFiles,
|
|
518
|
-
rules: {
|
|
519
|
-
// enforce spacing between functions and their invocations
|
|
520
|
-
// https://eslint.style/rules/js/function-call-spacing
|
|
521
|
-
'@stylistic/func-call-spacing': 'off',
|
|
522
|
-
},
|
|
523
|
-
};
|
|
524
|
-
exports.default = stylisticRules;
|
|
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,o=e((()=>{n(),r={name:`airbnb/config/stylistic`,files:t,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`]}},i={name:`airbnb/config/stylistic/deprecated`,files:t,rules:{"@stylistic/func-call-spacing":`off`}},a=r}));o();export{a as default,i as deprecatedStylisticRules,o as init_stylistic};
|
|
@@ -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/stylistic-plus`,files:t.allFiles,rules:{"@stylistic/curly-newline":`off`,"@stylistic/indent-binary-ops":`off`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_stylisticPlus`,{enumerable:!0,get:function(){return i}});
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../utils");
|
|
4
|
-
const stylisticPlusRules = {
|
|
5
|
-
name: 'airbnb/config/stylistic-plus',
|
|
6
|
-
files: utils_1.allFiles,
|
|
7
|
-
rules: {
|
|
8
|
-
// A number of style guides require or disallow line breaks inside of block statements and block-like code.
|
|
9
|
-
// https://eslint.style/rules/plus/curly-newline
|
|
10
|
-
'@stylistic/curly-newline': 'off',
|
|
11
|
-
// Indentation for binary operators in multiline expressions
|
|
12
|
-
// https://eslint.style/rules/plus/indent-binary-ops
|
|
13
|
-
'@stylistic/indent-binary-ops': 'off',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
exports.default = stylisticPlusRules;
|
|
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/stylistic-plus`,files:t,rules:{"@stylistic/curly-newline":`off`,"@stylistic/indent-binary-ops":`off`}},i=r}));a();export{i as default,a as init_stylisticPlus};
|
|
@@ -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/base`,files:t.tsFiles,rules:{"constructor-super":`off`,"getter-return":`off`,"no-class-assign":`off`,"no-const-assign":`off`,"no-dupe-args":`off`,"no-dupe-class-members":`off`,"no-dupe-keys":`off`,"no-func-assign":`off`,"no-import-assign":`off`,"no-new-symbol":`off`,"no-obj-calls":`off`,"no-redeclare":`off`,"no-setter-return":`off`,"no-this-before-super":`off`,"no-undef":`off`,"no-unreachable":`off`,"no-unsafe-negation":`off`,"no-with":`off`,"valid-typeof":`off`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_typescriptBase`,{enumerable:!0,get:function(){return i}});
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../../utils");
|
|
4
|
-
const typescriptBaseRules = {
|
|
5
|
-
name: 'airbnb/config/typescript/base',
|
|
6
|
-
files: utils_1.tsFiles,
|
|
7
|
-
rules: {
|
|
8
|
-
// The following rules are enabled in Airbnb config, but are already checked (more thoroughly) by the TypeScript compiler
|
|
9
|
-
// Rules are inspired by: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended-raw.ts
|
|
10
|
-
// no-var, prefer-const, prefer-rest-params and prefer-spread is already declared in previous configs
|
|
11
|
-
'constructor-super': 'off', // ts(2335) & ts(2377)
|
|
12
|
-
'getter-return': 'off', // ts(2378)
|
|
13
|
-
'no-class-assign': 'off', // ts(2629)
|
|
14
|
-
'no-const-assign': 'off', // ts(2588)
|
|
15
|
-
'no-dupe-args': 'off', // ts(2300)
|
|
16
|
-
'no-dupe-class-members': 'off', // ts(2393) & ts(2300)
|
|
17
|
-
'no-dupe-keys': 'off', // ts(1117)
|
|
18
|
-
'no-func-assign': 'off', // ts(2630)
|
|
19
|
-
'no-import-assign': 'off', // ts(2632) & ts(2540)
|
|
20
|
-
'no-new-symbol': 'off', // ts(7009)
|
|
21
|
-
'no-obj-calls': 'off', // ts(2349)
|
|
22
|
-
'no-redeclare': 'off', // ts(2451)
|
|
23
|
-
'no-setter-return': 'off', // ts(2408)
|
|
24
|
-
'no-this-before-super': 'off', // ts(2376) & ts(17009)
|
|
25
|
-
'no-undef': 'off', // ts(2304) & ts(2552)
|
|
26
|
-
'no-unreachable': 'off', // ts(7027)
|
|
27
|
-
'no-unsafe-negation': 'off', // ts(2365) & ts(2322) & ts(2358)
|
|
28
|
-
'no-with': 'off', // ts(1101) & ts(2410)
|
|
29
|
-
'valid-typeof': 'off',
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
exports.default = typescriptBaseRules;
|
|
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/base`,files:n,rules:{"constructor-super":`off`,"getter-return":`off`,"no-class-assign":`off`,"no-const-assign":`off`,"no-dupe-args":`off`,"no-dupe-class-members":`off`,"no-dupe-keys":`off`,"no-func-assign":`off`,"no-import-assign":`off`,"no-new-symbol":`off`,"no-obj-calls":`off`,"no-redeclare":`off`,"no-setter-return":`off`,"no-this-before-super":`off`,"no-undef":`off`,"no-unreachable":`off`,"no-unsafe-negation":`off`,"no-with":`off`,"valid-typeof":`off`}},i=r}));a();export{i as default,a as init_typescriptBase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../utils/index.cjs`),n=require(`../best-practices.cjs`),r=require(`../errors.cjs`),i=require(`../es6.cjs`),a=require(`../style.cjs`),o=require(`../variables.cjs`);var s,c,l=e.__esmMin((()=>{n.init_best_practices(),r.init_errors(),i.init_es6(),a.init_style(),o.init_variables(),t.init_utils(),s={name:`airbnb/config/typescript/typescript-eslint`,files:t.tsFiles,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":n.default.rules[`default-param-last`],"dot-notation":`off`,"@typescript-eslint/dot-notation":[n.default.rules[`dot-notation`][0],{...n.default.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":a.default.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":n.default.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":n.default.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":n.default.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":o.default.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":n.default.rules[`no-unused-expressions`],"no-unused-private-class-members":`off`,"@typescript-eslint/no-unused-private-class-members":r.default.rules[`no-unused-private-class-members`],"no-unused-vars":`off`,"@typescript-eslint/no-unused-vars":o.default.rules[`no-unused-vars`],"no-use-before-define":`off`,"@typescript-eslint/no-use-before-define":o.default.rules[`no-use-before-define`],"no-useless-constructor":`off`,"@typescript-eslint/no-useless-constructor":i.default.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":n.default.rules[`no-throw-literal`],"@typescript-eslint/parameter-properties":`off`,"@typescript-eslint/prefer-as-const":`error`,"prefer-destructuring":`off`,"@typescript-eslint/prefer-destructuring":i.default.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`}},c=s}));l(),exports.default=c,Object.defineProperty(exports,`init_typescriptEslint`,{enumerable:!0,get:function(){return l}});
|