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
|
@@ -1,231 +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 typescript_eslint_1 = require("typescript-eslint");
|
|
7
|
-
const getDevDepsList_1 = __importDefault(require("../../../helpers/getDevDepsList"));
|
|
8
|
-
const best_practices_1 = __importDefault(require("../../../legacy/rules/best-practices"));
|
|
9
|
-
const errors_1 = __importDefault(require("../../../legacy/rules/errors"));
|
|
10
|
-
const es6_1 = __importDefault(require("../../../legacy/rules/es6"));
|
|
11
|
-
const imports_1 = __importDefault(require("../../../legacy/rules/imports"));
|
|
12
|
-
const style_1 = __importDefault(require("../../../legacy/rules/style"));
|
|
13
|
-
const variables_1 = __importDefault(require("../../../legacy/rules/variables"));
|
|
14
|
-
const utils_1 = require("../../../utils");
|
|
15
|
-
const { rules: baseBestPracticesRules } = best_practices_1.default;
|
|
16
|
-
const { rules: baseErrorsRules } = errors_1.default;
|
|
17
|
-
const { rules: baseES6Rules } = es6_1.default;
|
|
18
|
-
const { rules: baseImportsRules } = imports_1.default;
|
|
19
|
-
const { rules: baseStyleRules } = style_1.default;
|
|
20
|
-
const { rules: baseVariablesRules } = variables_1.default;
|
|
21
|
-
const legacyTypescriptBaseRules = {
|
|
22
|
-
name: 'airbnb/config/typescript/legacy',
|
|
23
|
-
files: utils_1.tsFiles,
|
|
24
|
-
plugins: {
|
|
25
|
-
'@typescript-eslint': typescript_eslint_1.plugin,
|
|
26
|
-
},
|
|
27
|
-
languageOptions: {
|
|
28
|
-
parser: typescript_eslint_1.parser,
|
|
29
|
-
parserOptions: {
|
|
30
|
-
projectService: true,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
rules: {
|
|
34
|
-
// Replace Airbnb 'brace-style' rule with '@typescript-eslint' version
|
|
35
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md
|
|
36
|
-
// @deprecated and deleted by @typescript-eslint
|
|
37
|
-
// 'brace-style': 'off',
|
|
38
|
-
// '@typescript-eslint/brace-style': baseStyleRules['brace-style'],
|
|
39
|
-
// Replace Airbnb 'camelcase' rule with '@typescript-eslint/naming-convention'
|
|
40
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md
|
|
41
|
-
camelcase: 'off',
|
|
42
|
-
// The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.
|
|
43
|
-
'@typescript-eslint/naming-convention': [
|
|
44
|
-
'error',
|
|
45
|
-
// Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)
|
|
46
|
-
{
|
|
47
|
-
selector: 'variable',
|
|
48
|
-
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
49
|
-
},
|
|
50
|
-
// Allow camelCase functions (23.2), and PascalCase functions (23.8)
|
|
51
|
-
{
|
|
52
|
-
selector: 'function',
|
|
53
|
-
format: ['camelCase', 'PascalCase'],
|
|
54
|
-
},
|
|
55
|
-
// Airbnb recommends PascalCase for classes (23.3), and although Airbnb does not make TypeScript recommendations, we are assuming this rule would similarly apply to anything "type like", including interfaces, type aliases, and enums
|
|
56
|
-
{
|
|
57
|
-
selector: 'typeLike',
|
|
58
|
-
format: ['PascalCase'],
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
// Replace Airbnb 'comma-dangle' rule with '@typescript-eslint' version
|
|
62
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md
|
|
63
|
-
// The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config
|
|
64
|
-
// @deprecated and deleted by @typescript-eslint
|
|
65
|
-
// 'comma-dangle': 'off',
|
|
66
|
-
// '@typescript-eslint/comma-dangle': [
|
|
67
|
-
// baseStyleRules['comma-dangle'][0],
|
|
68
|
-
// {
|
|
69
|
-
// ...baseStyleRules['comma-dangle'][1],
|
|
70
|
-
// enums: baseStyleRules['comma-dangle'][1].arrays,
|
|
71
|
-
// generics: baseStyleRules['comma-dangle'][1].arrays,
|
|
72
|
-
// tuples: baseStyleRules['comma-dangle'][1].arrays,
|
|
73
|
-
// },
|
|
74
|
-
// ],
|
|
75
|
-
// Replace Airbnb 'comma-spacing' rule with '@typescript-eslint' version
|
|
76
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md
|
|
77
|
-
// @deprecated and deleted by @typescript-eslint
|
|
78
|
-
// 'comma-spacing': 'off',
|
|
79
|
-
// '@typescript-eslint/comma-spacing': baseStyleRules['comma-spacing'],
|
|
80
|
-
// Replace Airbnb 'default-param-last' rule with '@typescript-eslint' version
|
|
81
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/default-param-last.md
|
|
82
|
-
'default-param-last': 'off',
|
|
83
|
-
'@typescript-eslint/default-param-last': baseBestPracticesRules['default-param-last'],
|
|
84
|
-
// Replace Airbnb 'dot-notation' rule with '@typescript-eslint' version
|
|
85
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md
|
|
86
|
-
'dot-notation': 'off',
|
|
87
|
-
'@typescript-eslint/dot-notation': baseBestPracticesRules['dot-notation'],
|
|
88
|
-
// Replace Airbnb 'func-call-spacing' rule with '@typescript-eslint' version
|
|
89
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md
|
|
90
|
-
// @deprecated and deleted by @typescript-eslint
|
|
91
|
-
// 'func-call-spacing': 'off',
|
|
92
|
-
// '@typescript-eslint/func-call-spacing': baseStyleRules['func-call-spacing'],
|
|
93
|
-
// Replace Airbnb 'indent' rule with '@typescript-eslint' version
|
|
94
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md
|
|
95
|
-
// @deprecated and deleted by @typescript-eslint
|
|
96
|
-
// indent: 'off',
|
|
97
|
-
// '@typescript-eslint/indent': baseStyleRules.indent,
|
|
98
|
-
// Replace Airbnb 'keyword-spacing' rule with '@typescript-eslint' version
|
|
99
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md
|
|
100
|
-
// @deprecated and deleted by @typescript-eslint
|
|
101
|
-
// 'keyword-spacing': 'off',
|
|
102
|
-
// '@typescript-eslint/keyword-spacing': baseStyleRules['keyword-spacing'],
|
|
103
|
-
// Replace Airbnb 'lines-between-class-members' rule with '@typescript-eslint' version
|
|
104
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md
|
|
105
|
-
// @deprecated and deleted by @typescript-eslint
|
|
106
|
-
// 'lines-between-class-members': 'off',
|
|
107
|
-
// '@typescript-eslint/lines-between-class-members': baseStyleRules['lines-between-class-members'],
|
|
108
|
-
// Replace Airbnb 'no-array-constructor' rule with '@typescript-eslint' version
|
|
109
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md
|
|
110
|
-
'no-array-constructor': 'off',
|
|
111
|
-
'@typescript-eslint/no-array-constructor': baseStyleRules['no-array-constructor'],
|
|
112
|
-
// Replace Airbnb 'no-dupe-class-members' rule with '@typescript-eslint' version
|
|
113
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md
|
|
114
|
-
'no-dupe-class-members': 'off',
|
|
115
|
-
'@typescript-eslint/no-dupe-class-members': baseES6Rules['no-dupe-class-members'],
|
|
116
|
-
// Replace Airbnb 'no-empty-function' rule with '@typescript-eslint' version
|
|
117
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md
|
|
118
|
-
'no-empty-function': 'off',
|
|
119
|
-
'@typescript-eslint/no-empty-function': baseBestPracticesRules['no-empty-function'],
|
|
120
|
-
// Replace Airbnb 'no-extra-parens' rule with '@typescript-eslint' version
|
|
121
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md
|
|
122
|
-
'no-extra-parens': 'off',
|
|
123
|
-
'@typescript-eslint/no-extra-parens': baseErrorsRules['no-extra-parens'],
|
|
124
|
-
// Replace Airbnb 'no-extra-semi' rule with '@typescript-eslint' version
|
|
125
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md
|
|
126
|
-
// @deprecated and deleted by @typescript-eslint
|
|
127
|
-
// 'no-extra-semi': 'off',
|
|
128
|
-
// '@typescript-eslint/no-extra-semi': baseErrorsRules['no-extra-semi'],
|
|
129
|
-
// Replace Airbnb 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version
|
|
130
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implied-eval.md
|
|
131
|
-
'no-implied-eval': 'off',
|
|
132
|
-
'no-new-func': 'off',
|
|
133
|
-
'@typescript-eslint/no-implied-eval': baseBestPracticesRules['no-implied-eval'],
|
|
134
|
-
// Replace Airbnb 'no-loss-of-precision' rule with '@typescript-eslint' version
|
|
135
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loss-of-precision.md
|
|
136
|
-
'no-loss-of-precision': 'off',
|
|
137
|
-
'@typescript-eslint/no-loss-of-precision': baseErrorsRules['no-loss-of-precision'],
|
|
138
|
-
// Replace Airbnb 'no-loop-func' rule with '@typescript-eslint' version
|
|
139
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md
|
|
140
|
-
'no-loop-func': 'off',
|
|
141
|
-
'@typescript-eslint/no-loop-func': baseBestPracticesRules['no-loop-func'],
|
|
142
|
-
// Replace Airbnb 'no-magic-numbers' rule with '@typescript-eslint' version
|
|
143
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md
|
|
144
|
-
'no-magic-numbers': 'off',
|
|
145
|
-
'@typescript-eslint/no-magic-numbers': baseBestPracticesRules['no-magic-numbers'],
|
|
146
|
-
// Replace Airbnb 'no-redeclare' rule with '@typescript-eslint' version
|
|
147
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md
|
|
148
|
-
'no-redeclare': 'off',
|
|
149
|
-
'@typescript-eslint/no-redeclare': baseBestPracticesRules['no-redeclare'],
|
|
150
|
-
// Replace Airbnb 'no-shadow' rule with '@typescript-eslint' version
|
|
151
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
|
152
|
-
'no-shadow': 'off',
|
|
153
|
-
'@typescript-eslint/no-shadow': baseVariablesRules['no-shadow'],
|
|
154
|
-
// Replace Airbnb 'space-before-blocks' rule with '@typescript-eslint' version
|
|
155
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-blocks.md
|
|
156
|
-
// @deprecated and deleted by @typescript-eslint
|
|
157
|
-
// 'space-before-blocks': 'off',
|
|
158
|
-
// '@typescript-eslint/space-before-blocks': baseStyleRules['space-before-blocks'],
|
|
159
|
-
// Replace Airbnb 'no-throw-literal' rule with '@typescript-eslint' version
|
|
160
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md
|
|
161
|
-
// @deprecated and deleted by @typescript-eslint
|
|
162
|
-
// 'no-throw-literal': 'off',
|
|
163
|
-
// '@typescript-eslint/no-throw-literal': baseBestPracticesRules['no-throw-literal'],
|
|
164
|
-
// Replace Airbnb 'no-unused-expressions' rule with '@typescript-eslint' version
|
|
165
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md
|
|
166
|
-
'no-unused-expressions': 'off',
|
|
167
|
-
'@typescript-eslint/no-unused-expressions': baseBestPracticesRules['no-unused-expressions'],
|
|
168
|
-
// Replace Airbnb 'no-unused-vars' rule with '@typescript-eslint' version
|
|
169
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
|
170
|
-
'no-unused-vars': 'off',
|
|
171
|
-
'@typescript-eslint/no-unused-vars': baseVariablesRules['no-unused-vars'],
|
|
172
|
-
// Replace Airbnb 'no-use-before-define' rule with '@typescript-eslint' version
|
|
173
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md
|
|
174
|
-
'no-use-before-define': 'off',
|
|
175
|
-
'@typescript-eslint/no-use-before-define': baseVariablesRules['no-use-before-define'],
|
|
176
|
-
// Replace Airbnb 'no-useless-constructor' rule with '@typescript-eslint' version
|
|
177
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md
|
|
178
|
-
'no-useless-constructor': 'off',
|
|
179
|
-
'@typescript-eslint/no-useless-constructor': baseES6Rules['no-useless-constructor'],
|
|
180
|
-
// Replace Airbnb 'quotes' rule with '@typescript-eslint' version
|
|
181
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
|
|
182
|
-
// @deprecated and deleted by @typescript-eslint
|
|
183
|
-
// quotes: 'off',
|
|
184
|
-
// '@typescript-eslint/quotes': baseStyleRules.quotes,
|
|
185
|
-
// Replace Airbnb 'semi' rule with '@typescript-eslint' version
|
|
186
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md
|
|
187
|
-
// @deprecated and deleted by @typescript-eslint
|
|
188
|
-
// semi: 'off',
|
|
189
|
-
// '@typescript-eslint/semi': baseStyleRules.semi,
|
|
190
|
-
// Replace Airbnb 'space-before-function-paren' rule with '@typescript-eslint' version
|
|
191
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md
|
|
192
|
-
// @deprecated and deleted by @typescript-eslint
|
|
193
|
-
// 'space-before-function-paren': 'off',
|
|
194
|
-
// '@typescript-eslint/space-before-function-paren': baseStyleRules['space-before-function-paren'],
|
|
195
|
-
// Replace Airbnb 'require-await' rule with '@typescript-eslint' version
|
|
196
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md
|
|
197
|
-
'require-await': 'off',
|
|
198
|
-
'@typescript-eslint/require-await': baseBestPracticesRules['require-await'],
|
|
199
|
-
// Replace Airbnb 'no-return-await' rule with '@typescript-eslint' version
|
|
200
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md
|
|
201
|
-
'no-return-await': 'off',
|
|
202
|
-
'@typescript-eslint/return-await': [baseBestPracticesRules['no-return-await'], 'in-try-catch'],
|
|
203
|
-
// Replace Airbnb 'space-infix-ops' rule with '@typescript-eslint' version
|
|
204
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md
|
|
205
|
-
// @deprecated and deleted by @typescript-eslint
|
|
206
|
-
// 'space-infix-ops': 'off',
|
|
207
|
-
// '@typescript-eslint/space-infix-ops': baseStyleRules['space-infix-ops'],
|
|
208
|
-
// Replace Airbnb 'object-curly-spacing' rule with '@typescript-eslint' version
|
|
209
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/object-curly-spacing.md
|
|
210
|
-
// @deprecated and deleted by @typescript-eslint
|
|
211
|
-
// 'object-curly-spacing': 'off',
|
|
212
|
-
// '@typescript-eslint/object-curly-spacing': baseStyleRules['object-curly-spacing'],
|
|
213
|
-
// Append 'ts' and 'tsx' to Airbnb 'import/extensions' rule
|
|
214
|
-
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
|
|
215
|
-
'import/extensions': [
|
|
216
|
-
baseImportsRules['import/extensions'][0],
|
|
217
|
-
baseImportsRules['import/extensions'][1],
|
|
218
|
-
Object.assign(Object.assign({}, baseImportsRules['import/extensions'][2]), { ts: 'never', tsx: 'never' }),
|
|
219
|
-
],
|
|
220
|
-
// Append 'ts' and 'tsx' extensions to Airbnb 'import/no-extraneous-dependencies' rule
|
|
221
|
-
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
|
|
222
|
-
'import/no-extraneous-dependencies': [
|
|
223
|
-
'error',
|
|
224
|
-
{
|
|
225
|
-
devDependencies: (0, getDevDepsList_1.default)([...utils_1.jsExtensions, ...utils_1.tsExtensions].map((ext) => ext.slice(1)).join(',')),
|
|
226
|
-
optionalDependencies: false,
|
|
227
|
-
},
|
|
228
|
-
],
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
exports.default = legacyTypescriptBaseRules;
|
|
1
|
+
import{__esmMin as e}from"../../../_virtual/rolldown_runtime.js";import{init_utils as t,jsExtensions as n,tsExtensions as r,tsFiles as i}from"../../../utils/index.js";import a,{init_getDevDepsList as o}from"../../../helpers/getDevDepsList.js";import s,{init_best_practices as c}from"../best-practices.js";import l,{init_errors as u}from"../errors.js";import d,{init_es6 as f}from"../es6.js";import p,{init_imports as m}from"../imports.js";import h,{init_style as g}from"../style.js";import _,{init_variables as v}from"../variables.js";import{parser as y,plugin as b}from"typescript-eslint";var x,S,C,w,T,E,D,O,k=e((()=>{o(),c(),u(),f(),m(),g(),v(),t(),{rules:x}=s,{rules:S}=l,{rules:C}=d,{rules:w}=p,{rules:T}=h,{rules:E}=_,D={name:`airbnb/config/typescript/legacy`,files:i,plugins:{"@typescript-eslint":b},languageOptions:{parser:y,parserOptions:{projectService:!0}},rules:{camelcase:`off`,"@typescript-eslint/naming-convention":[`error`,{selector:`variable`,format:[`camelCase`,`PascalCase`,`UPPER_CASE`]},{selector:`function`,format:[`camelCase`,`PascalCase`]},{selector:`typeLike`,format:[`PascalCase`]}],"default-param-last":`off`,"@typescript-eslint/default-param-last":x[`default-param-last`],"dot-notation":`off`,"@typescript-eslint/dot-notation":x[`dot-notation`],"no-array-constructor":`off`,"@typescript-eslint/no-array-constructor":T[`no-array-constructor`],"no-dupe-class-members":`off`,"@typescript-eslint/no-dupe-class-members":C[`no-dupe-class-members`],"no-empty-function":`off`,"@typescript-eslint/no-empty-function":x[`no-empty-function`],"no-extra-parens":`off`,"@typescript-eslint/no-extra-parens":S[`no-extra-parens`],"no-implied-eval":`off`,"no-new-func":`off`,"@typescript-eslint/no-implied-eval":x[`no-implied-eval`],"no-loss-of-precision":`off`,"@typescript-eslint/no-loss-of-precision":S[`no-loss-of-precision`],"no-loop-func":`off`,"@typescript-eslint/no-loop-func":x[`no-loop-func`],"no-magic-numbers":`off`,"@typescript-eslint/no-magic-numbers":x[`no-magic-numbers`],"no-redeclare":`off`,"@typescript-eslint/no-redeclare":x[`no-redeclare`],"no-shadow":`off`,"@typescript-eslint/no-shadow":E[`no-shadow`],"no-unused-expressions":`off`,"@typescript-eslint/no-unused-expressions":x[`no-unused-expressions`],"no-unused-vars":`off`,"@typescript-eslint/no-unused-vars":E[`no-unused-vars`],"no-use-before-define":`off`,"@typescript-eslint/no-use-before-define":E[`no-use-before-define`],"no-useless-constructor":`off`,"@typescript-eslint/no-useless-constructor":C[`no-useless-constructor`],"require-await":`off`,"@typescript-eslint/require-await":x[`require-await`],"no-return-await":`off`,"@typescript-eslint/return-await":[x[`no-return-await`],`in-try-catch`],"import/extensions":[w[`import/extensions`][0],w[`import/extensions`][1],{...w[`import/extensions`][2],ts:`never`,tsx:`never`}],"import/no-extraneous-dependencies":[`error`,{devDependencies:a([...n,...r].map(e=>e.slice(1)).join(`,`)),optionalDependencies:!1}]}},O=D}));k();export{O as default,k as init_typescript};
|
|
@@ -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/overrides/legacy`,files:t.tsFiles,rules:{"constructor-super":`off`,"getter-return":`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`,"valid-typeof":`off`,"import/named":`off`,"import/no-named-as-default-member":`off`,"import/no-unresolved":`off`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_typescriptOverrides`,{enumerable:!0,get:function(){return i}});
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../../../utils");
|
|
4
|
-
const legacyTypescriptOverridesRules = {
|
|
5
|
-
name: 'airbnb/config/typescript/overrides/legacy',
|
|
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
|
-
// Some of the rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586
|
|
10
|
-
// Rules are inspired by: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts
|
|
11
|
-
'constructor-super': 'off',
|
|
12
|
-
'getter-return': 'off',
|
|
13
|
-
'no-const-assign': 'off',
|
|
14
|
-
'no-dupe-args': 'off',
|
|
15
|
-
'no-dupe-class-members': 'off',
|
|
16
|
-
'no-dupe-keys': 'off',
|
|
17
|
-
'no-func-assign': 'off',
|
|
18
|
-
'no-import-assign': 'off',
|
|
19
|
-
'no-new-symbol': 'off',
|
|
20
|
-
'no-obj-calls': 'off',
|
|
21
|
-
'no-redeclare': 'off',
|
|
22
|
-
'no-setter-return': 'off',
|
|
23
|
-
'no-this-before-super': 'off',
|
|
24
|
-
'no-undef': 'off',
|
|
25
|
-
'no-unreachable': 'off',
|
|
26
|
-
'no-unsafe-negation': 'off',
|
|
27
|
-
'valid-typeof': 'off',
|
|
28
|
-
// The following rules are enabled in Airbnb config, but are recommended to be disabled within TypeScript projects
|
|
29
|
-
// See: https://github.com/typescript-eslint/typescript-eslint/blob/13583e65f5973da2a7ae8384493c5e00014db51b/docs/linting/TROUBLESHOOTING.md#eslint-plugin-import
|
|
30
|
-
'import/named': 'off',
|
|
31
|
-
'import/no-named-as-default-member': 'off',
|
|
32
|
-
// Disable `import/no-unresolved`, see README.md for details
|
|
33
|
-
'import/no-unresolved': 'off',
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
exports.default = legacyTypescriptOverridesRules;
|
|
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/overrides/legacy`,files:n,rules:{"constructor-super":`off`,"getter-return":`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`,"valid-typeof":`off`,"import/named":`off`,"import/no-named-as-default-member":`off`,"import/no-unresolved":`off`}},i=r}));a();export{i as default,a as init_typescriptOverrides};
|
|
@@ -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/settings/legacy`,files:t.allFiles,settings:{"import/parsers":{"@typescript-eslint/parser":t.tsExtensionsResolver},"import/resolver":{node:{extensions:[...t.tsExtensionsResolver,`.json`]},typescript:!0},"import/extensions":t.tsExtensionsResolver,"import/external-module-folders":[`node_modules`,`node_modules/@types`]}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_typescriptSettings`,{enumerable:!0,get:function(){return i}});
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../../../utils");
|
|
4
|
-
const legacyTypescriptSettingsRules = {
|
|
5
|
-
name: 'airbnb/config/typescript/settings/legacy',
|
|
6
|
-
files: utils_1.allFiles,
|
|
7
|
-
settings: {
|
|
8
|
-
// Apply special parsing for TypeScript files
|
|
9
|
-
'import/parsers': {
|
|
10
|
-
'@typescript-eslint/parser': utils_1.tsExtensionsResolver,
|
|
11
|
-
},
|
|
12
|
-
// Append 'ts' extensions to Airbnb 'import/resolver' setting
|
|
13
|
-
// Original: ['.mjs', '.js', '.json']
|
|
14
|
-
'import/resolver': {
|
|
15
|
-
node: {
|
|
16
|
-
extensions: [...utils_1.tsExtensionsResolver, '.json'],
|
|
17
|
-
},
|
|
18
|
-
typescript: true,
|
|
19
|
-
},
|
|
20
|
-
// Append 'ts' extensions to Airbnb 'import/extensions' setting
|
|
21
|
-
// Original: ['.js', '.mjs', '.jsx']
|
|
22
|
-
'import/extensions': utils_1.tsExtensionsResolver,
|
|
23
|
-
// Resolve type definition packages
|
|
24
|
-
'import/external-module-folders': ['node_modules', 'node_modules/@types'],
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
exports.default = legacyTypescriptSettingsRules;
|
|
1
|
+
import{__esmMin as e}from"../../../_virtual/rolldown_runtime.js";import{allFiles as t,init_utils as n,tsExtensionsResolver as r}from"../../../utils/index.js";var i,a,o=e((()=>{n(),i={name:`airbnb/config/typescript/settings/legacy`,files:t,settings:{"import/parsers":{"@typescript-eslint/parser":r},"import/resolver":{node:{extensions:[...r,`.json`]},typescript:!0},"import/extensions":r,"import/external-module-folders":[`node_modules`,`node_modules/@types`]}},a=i}));o();export{a as default,o as init_typescriptSettings};
|
|
@@ -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/legacy`,files:t.allFiles,rules:{"init-declarations":`off`,"no-catch-shadow":`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":[`error`,{vars:`all`,args:`after-used`,ignoreRestSiblings:!0}],"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}});
|
|
@@ -1,68 +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 legacyVariablesRules = {
|
|
9
|
-
name: 'airbnb/config/variables/legacy',
|
|
10
|
-
files: utils_1.allFiles,
|
|
11
|
-
rules: {
|
|
12
|
-
// enforce or disallow variable initializations at definition
|
|
13
|
-
'init-declarations': 'off',
|
|
14
|
-
// disallow the catch clause parameter name being the same as a variable in the outer scope
|
|
15
|
-
'no-catch-shadow': 'off',
|
|
16
|
-
// disallow deletion of variables
|
|
17
|
-
'no-delete-var': 'error',
|
|
18
|
-
// disallow labels that share a name with a variable
|
|
19
|
-
// https://eslint.org/docs/rules/no-label-var
|
|
20
|
-
'no-label-var': 'error',
|
|
21
|
-
// disallow specific globals
|
|
22
|
-
'no-restricted-globals': [
|
|
23
|
-
'error',
|
|
24
|
-
{
|
|
25
|
-
name: 'isFinite',
|
|
26
|
-
message: 'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'isNaN',
|
|
30
|
-
message: 'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
|
|
31
|
-
},
|
|
32
|
-
...confusing_browser_globals_1.default.map((g) => ({
|
|
33
|
-
name: g,
|
|
34
|
-
message: `Use window.${g} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,
|
|
35
|
-
})),
|
|
36
|
-
],
|
|
37
|
-
// disallow declaration of variables already declared in the outer scope
|
|
38
|
-
'no-shadow': 'error',
|
|
39
|
-
// disallow shadowing of names such as arguments
|
|
40
|
-
'no-shadow-restricted-names': 'error',
|
|
41
|
-
// disallow use of undeclared variables unless mentioned in a /*global */ block
|
|
42
|
-
'no-undef': 'error',
|
|
43
|
-
// disallow use of undefined when initializing variables
|
|
44
|
-
'no-undef-init': 'error',
|
|
45
|
-
// disallow use of undefined variable
|
|
46
|
-
// https://eslint.org/docs/rules/no-undefined
|
|
47
|
-
'no-undefined': 'off',
|
|
48
|
-
// disallow declaration of variables that are not used in the code
|
|
49
|
-
'no-unused-vars': [
|
|
50
|
-
'error',
|
|
51
|
-
{
|
|
52
|
-
vars: 'all',
|
|
53
|
-
args: 'after-used',
|
|
54
|
-
ignoreRestSiblings: true,
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
// disallow use of variables before they are defined
|
|
58
|
-
'no-use-before-define': [
|
|
59
|
-
'error',
|
|
60
|
-
{
|
|
61
|
-
functions: true,
|
|
62
|
-
classes: true,
|
|
63
|
-
variables: true,
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
exports.default = legacyVariablesRules;
|
|
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/legacy`,files:t,rules:{"init-declarations":`off`,"no-catch-shadow":`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":[`error`,{vars:`all`,args:`after-used`,ignoreRestSiblings:!0}],"no-use-before-define":[`error`,{functions:!0,classes:!0,variables:!0}]}},a=i}));o();export{a as default,o as init_variables};
|
package/dist/legacy.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./legacy/configs/index.cjs`),n=require(`./legacy/rules/index.cjs`),r=n.default,i=t.default;exports.configs=i,exports.rules=r;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as eslint0 from "eslint";
|
|
2
|
+
|
|
3
|
+
//#region legacy.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Direct export isn't allowed, it will increase the size of d.ts
|
|
6
|
+
*/
|
|
7
|
+
declare const rules: {
|
|
8
|
+
readonly base: Record<"bestPractices" | "errors" | "es6" | "imports" | "strict" | "style" | "variables" | "node", eslint0.Linter.Config>;
|
|
9
|
+
readonly react: Record<string, eslint0.Linter.Config>;
|
|
10
|
+
readonly typescript: Record<string, eslint0.Linter.Config>;
|
|
11
|
+
};
|
|
12
|
+
declare const configs: {
|
|
13
|
+
readonly base: Record<"recommended" | "typescript" | "legacy", eslint0.Linter.Config[]>;
|
|
14
|
+
readonly react: Record<"base" | "hooks" | "recommended" | "typescript" | "legacy", eslint0.Linter.Config[]>;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { configs, rules };
|
package/dist/legacy.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as eslint20 from "eslint";
|
|
2
|
+
|
|
3
|
+
//#region legacy.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Direct export isn't allowed, it will increase the size of d.ts
|
|
6
|
+
*/
|
|
7
|
+
declare const rules: {
|
|
8
|
+
readonly base: Record<"bestPractices" | "errors" | "es6" | "imports" | "strict" | "style" | "variables" | "node", eslint20.Linter.Config>;
|
|
9
|
+
readonly react: Record<string, eslint20.Linter.Config>;
|
|
10
|
+
readonly typescript: Record<string, eslint20.Linter.Config>;
|
|
11
|
+
};
|
|
12
|
+
declare const configs: {
|
|
13
|
+
readonly base: Record<"recommended" | "typescript" | "legacy", eslint20.Linter.Config[]>;
|
|
14
|
+
readonly react: Record<"base" | "hooks" | "recommended" | "typescript" | "legacy", eslint20.Linter.Config[]>;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { configs, rules };
|
package/dist/legacy.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
/* eslint-disable import-x/no-rename-default, unicorn/prefer-export-from */
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.configs = exports.rules = void 0;
|
|
8
|
-
const configs_1 = __importDefault(require("./legacy/configs"));
|
|
9
|
-
const rules_1 = __importDefault(require("./legacy/rules"));
|
|
10
|
-
/**
|
|
11
|
-
* Direct export isn't allowed, it will increase the size of d.ts
|
|
12
|
-
*/
|
|
13
|
-
exports.rules = rules_1.default;
|
|
14
|
-
exports.configs = configs_1.default;
|
|
1
|
+
import e from"./legacy/configs/index.js";import t from"./legacy/rules/index.js";const n=t,r=e;export{r as configs,n as rules};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`eslint-plugin-import-x`);n=e.__toESM(n);var r=e.__export({default:()=>a}),i,a,o=e.__esmMin((()=>{t.init_utils(),i={name:`airbnb/config/plugin/import-x`,files:t.allFiles,plugins:{"import-x":n.default}},a=i}));o(),Object.defineProperty(exports,`importXPlugin_exports`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`init_importXPlugin`,{enumerable:!0,get:function(){return o}});
|
|
@@ -1,15 +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 eslint_plugin_import_x_1 = __importDefault(require("eslint-plugin-import-x"));
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const importXPluginConfig = {
|
|
9
|
-
name: 'airbnb/config/plugin/import-x',
|
|
10
|
-
files: utils_1.allFiles,
|
|
11
|
-
plugins: {
|
|
12
|
-
'import-x': eslint_plugin_import_x_1.default,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
exports.default = importXPluginConfig;
|
|
1
|
+
import{__esmMin as e,__export as t}from"../_virtual/rolldown_runtime.js";import{allFiles as n,init_utils as r}from"../utils/index.js";import i from"eslint-plugin-import-x";var a=t({default:()=>s}),o,s,c=e((()=>{r(),o={name:`airbnb/config/plugin/import-x`,files:n,plugins:{"import-x":i}},s=o}));c();export{a as importXPlugin_exports,c as init_importXPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./stylisticPlugin.cjs`),n=require(`./importXPlugin.cjs`),r=require(`./nodePlugin.cjs`),i=require(`./reactPlugin.cjs`),a=require(`./reactA11yPlugin.cjs`),o=require(`./reactHooksPlugin.cjs`),s=require(`./nextPlugin.cjs`),c=require(`./typescriptEslintPlugin.cjs`),l={get stylistic(){return(t.init_stylisticPlugin(),e.__toCommonJS(t.stylisticPlugin_exports)).default},get importX(){return(n.init_importXPlugin(),e.__toCommonJS(n.importXPlugin_exports)).default},get node(){return(r.init_nodePlugin(),e.__toCommonJS(r.nodePlugin_exports)).default},get react(){return(i.init_reactPlugin(),e.__toCommonJS(i.reactPlugin_exports)).default},get reactA11y(){return(a.init_reactA11yPlugin(),e.__toCommonJS(a.reactA11yPlugin_exports)).default},get reactHooks(){return(o.init_reactHooksPlugin(),e.__toCommonJS(o.reactHooksPlugin_exports)).default},get next(){return(s.init_nextPlugin(),e.__toCommonJS(s.nextPlugin_exports)).default},get typescriptEslint(){return(c.init_typescriptEslintPlugin(),e.__toCommonJS(c.typescriptEslintPlugin_exports)).default}};var u=l;exports.default=u;
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-return */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* as is given due to less size of index.d.ts
|
|
6
|
-
*/
|
|
7
|
-
const plugins = {
|
|
8
|
-
get stylistic() {
|
|
9
|
-
return require('../plugins/stylisticPlugin').default;
|
|
10
|
-
},
|
|
11
|
-
get importX() {
|
|
12
|
-
return require('../plugins/importXPlugin').default;
|
|
13
|
-
},
|
|
14
|
-
get node() {
|
|
15
|
-
return require('../plugins/nodePlugin').default;
|
|
16
|
-
},
|
|
17
|
-
get react() {
|
|
18
|
-
return require('../plugins/reactPlugin').default;
|
|
19
|
-
},
|
|
20
|
-
get reactA11y() {
|
|
21
|
-
return require('../plugins/reactA11yPlugin').default;
|
|
22
|
-
},
|
|
23
|
-
get reactHooks() {
|
|
24
|
-
return require('../plugins/reactHooksPlugin').default;
|
|
25
|
-
},
|
|
26
|
-
get next() {
|
|
27
|
-
return require('../plugins/nextPlugin').default;
|
|
28
|
-
},
|
|
29
|
-
get typescriptEslint() {
|
|
30
|
-
return require('../plugins/typescriptEslintPlugin').default;
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
exports.default = plugins;
|
|
1
|
+
import{__toCommonJS as e}from"../_virtual/rolldown_runtime.js";import{init_stylisticPlugin as t,stylisticPlugin_exports as n}from"./stylisticPlugin.js";import{importXPlugin_exports as r,init_importXPlugin as i}from"./importXPlugin.js";import{init_nodePlugin as a,nodePlugin_exports as o}from"./nodePlugin.js";import{init_reactPlugin as s,reactPlugin_exports as c}from"./reactPlugin.js";import{init_reactA11yPlugin as l,reactA11yPlugin_exports as u}from"./reactA11yPlugin.js";import{init_reactHooksPlugin as d,reactHooksPlugin_exports as f}from"./reactHooksPlugin.js";import{init_nextPlugin as p,nextPlugin_exports as m}from"./nextPlugin.js";import{init_typescriptEslintPlugin as h,typescriptEslintPlugin_exports as g}from"./typescriptEslintPlugin.js";var _={get stylistic(){return(t(),e(n)).default},get importX(){return(i(),e(r)).default},get node(){return(a(),e(o)).default},get react(){return(s(),e(c)).default},get reactA11y(){return(l(),e(u)).default},get reactHooks(){return(d(),e(f)).default},get next(){return(p(),e(m)).default},get typescriptEslint(){return(h(),e(g)).default}};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`@next/eslint-plugin-next`);n=e.__toESM(n);var r=e.__export({default:()=>a}),i,a,o=e.__esmMin((()=>{t.init_utils(),i={name:`airbnb/config/plugin/next`,files:t.allFiles,plugins:{"@next/next":n.default}},a=i}));o(),Object.defineProperty(exports,`init_nextPlugin`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`nextPlugin_exports`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../utils");
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
5
|
-
const plugin = require('@next/eslint-plugin-next');
|
|
6
|
-
const nextPlugin = {
|
|
7
|
-
name: 'airbnb/config/plugin/next',
|
|
8
|
-
files: utils_1.allFiles,
|
|
9
|
-
plugins: {
|
|
10
|
-
'@next/next': plugin,
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
exports.default = nextPlugin;
|
|
1
|
+
import{__esmMin as e,__export as t}from"../_virtual/rolldown_runtime.js";import{allFiles as n,init_utils as r}from"../utils/index.js";import i from"@next/eslint-plugin-next";var a=t({default:()=>s}),o,s,c=e((()=>{r(),o={name:`airbnb/config/plugin/next`,files:n,plugins:{"@next/next":i}},s=o}));c();export{c as init_nextPlugin,a as nextPlugin_exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`eslint-plugin-n`);n=e.__toESM(n);var r=e.__export({default:()=>a}),i,a,o=e.__esmMin((()=>{t.init_utils(),i={name:`airbnb/config/plugin/node`,files:t.allFiles,plugins:{n:n.default}},a=i}));o(),Object.defineProperty(exports,`init_nodePlugin`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`nodePlugin_exports`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1,15 +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 eslint_plugin_n_1 = __importDefault(require("eslint-plugin-n"));
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const nodePlugin = {
|
|
9
|
-
name: 'airbnb/config/plugin/node',
|
|
10
|
-
files: utils_1.allFiles,
|
|
11
|
-
plugins: {
|
|
12
|
-
n: eslint_plugin_n_1.default,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
exports.default = nodePlugin;
|
|
1
|
+
import{__esmMin as e,__export as t}from"../_virtual/rolldown_runtime.js";import{allFiles as n,init_utils as r}from"../utils/index.js";import i from"eslint-plugin-n";var a=t({default:()=>s}),o,s,c=e((()=>{r(),o={name:`airbnb/config/plugin/node`,files:n,plugins:{n:i}},s=o}));c();export{c as init_nodePlugin,a as nodePlugin_exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`eslint-plugin-jsx-a11y`);n=e.__toESM(n);var r=e.__export({default:()=>a}),i,a,o=e.__esmMin((()=>{t.init_utils(),i={name:`airbnb/config/plugin/react-a11y`,files:t.allFiles,plugins:{"jsx-a11y":n.default}},a=i}));o(),Object.defineProperty(exports,`init_reactA11yPlugin`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`reactA11yPlugin_exports`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1,15 +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 eslint_plugin_jsx_a11y_1 = __importDefault(require("eslint-plugin-jsx-a11y"));
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const reactA11yPlugin = {
|
|
9
|
-
name: 'airbnb/config/plugin/react-a11y',
|
|
10
|
-
files: utils_1.allFiles,
|
|
11
|
-
plugins: {
|
|
12
|
-
'jsx-a11y': eslint_plugin_jsx_a11y_1.default,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
exports.default = reactA11yPlugin;
|
|
1
|
+
import{__esmMin as e,__export as t}from"../_virtual/rolldown_runtime.js";import{allFiles as n,init_utils as r}from"../utils/index.js";import i from"eslint-plugin-jsx-a11y";var a=t({default:()=>s}),o,s,c=e((()=>{r(),o={name:`airbnb/config/plugin/react-a11y`,files:n,plugins:{"jsx-a11y":i}},s=o}));c();export{c as init_reactA11yPlugin,a as reactA11yPlugin_exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`eslint-plugin-react-hooks`);n=e.__toESM(n);var r=e.__export({default:()=>a}),i,a,o=e.__esmMin((()=>{t.init_utils(),i={name:`airbnb/config/plugin/react-hooks`,files:t.allFiles,plugins:{"react-hooks":n.default}},a=i}));o(),Object.defineProperty(exports,`init_reactHooksPlugin`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`reactHooksPlugin_exports`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1,15 +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 eslint_plugin_react_hooks_1 = __importDefault(require("eslint-plugin-react-hooks"));
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const reactHooksPlugin = {
|
|
9
|
-
name: 'airbnb/config/plugin/react-hooks',
|
|
10
|
-
files: utils_1.allFiles,
|
|
11
|
-
plugins: {
|
|
12
|
-
'react-hooks': eslint_plugin_react_hooks_1.default,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
exports.default = reactHooksPlugin;
|
|
1
|
+
import{__esmMin as e,__export as t}from"../_virtual/rolldown_runtime.js";import{allFiles as n,init_utils as r}from"../utils/index.js";import i from"eslint-plugin-react-hooks";var a=t({default:()=>s}),o,s,c=e((()=>{r(),o={name:`airbnb/config/plugin/react-hooks`,files:n,plugins:{"react-hooks":i}},s=o}));c();export{c as init_reactHooksPlugin,a as reactHooksPlugin_exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`eslint-plugin-react`);n=e.__toESM(n);var r=e.__export({default:()=>a}),i,a,o=e.__esmMin((()=>{t.init_utils(),i={name:`airbnb/config/plugin/react`,files:t.allFiles,plugins:{react:n.default}},a=i}));o(),Object.defineProperty(exports,`init_reactPlugin`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`reactPlugin_exports`,{enumerable:!0,get:function(){return r}});
|