eslint-config-airbnb-extended 2.3.3 → 3.0.0-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/_virtual/rolldown_runtime.js +1 -0
- package/dist/configs/base/config.cjs +1 -0
- package/dist/configs/base/config.js +1 -26
- package/dist/configs/base/configExtended.cjs +1 -0
- package/dist/configs/base/configExtended.js +1 -9
- package/dist/configs/base/index.cjs +1 -0
- package/dist/configs/base/index.js +1 -18
- package/dist/configs/base/recommended.cjs +1 -0
- package/dist/configs/base/recommended.js +1 -12
- package/dist/configs/base/typescript.cjs +1 -0
- package/dist/configs/base/typescript.js +1 -12
- package/dist/configs/index.cjs +1 -0
- package/dist/configs/index.js +1 -21
- package/dist/configs/next/config.cjs +1 -0
- package/dist/configs/next/config.js +1 -12
- package/dist/configs/next/index.cjs +1 -0
- package/dist/configs/next/index.js +1 -18
- package/dist/configs/next/recommended.cjs +1 -0
- package/dist/configs/next/recommended.js +1 -14
- package/dist/configs/next/typescript.cjs +1 -0
- package/dist/configs/next/typescript.js +1 -8
- package/dist/configs/node/config.cjs +1 -0
- package/dist/configs/node/config.js +1 -16
- package/dist/configs/node/index.cjs +1 -0
- package/dist/configs/node/index.js +1 -12
- package/dist/configs/node/recommended.cjs +1 -0
- package/dist/configs/node/recommended.js +1 -12
- package/dist/configs/react/config.cjs +1 -0
- package/dist/configs/react/config.js +1 -16
- package/dist/configs/react/configExtended.cjs +1 -0
- package/dist/configs/react/configExtended.js +1 -9
- package/dist/configs/react/index.cjs +1 -0
- package/dist/configs/react/index.js +1 -18
- package/dist/configs/react/recommended.cjs +1 -0
- package/dist/configs/react/recommended.js +1 -12
- package/dist/configs/react/typescript.cjs +1 -0
- package/dist/configs/react/typescript.js +1 -8
- package/dist/configs/typescript/config.cjs +1 -0
- package/dist/configs/typescript/config.js +1 -18
- package/dist/configs/typescript/configExtended.cjs +1 -0
- package/dist/configs/typescript/configExtended.js +1 -9
- package/dist/extensions/base/index.cjs +1 -0
- package/dist/extensions/base/index.js +1 -15
- package/dist/extensions/base/recommended.cjs +1 -0
- package/dist/extensions/base/recommended.js +1 -31
- package/dist/extensions/base/typescript.cjs +1 -0
- package/dist/extensions/base/typescript.js +1 -19
- package/dist/extensions/index.cjs +1 -0
- package/dist/extensions/index.js +1 -21
- package/dist/extensions/next/index.cjs +1 -0
- package/dist/extensions/next/index.js +1 -12
- package/dist/extensions/next/recommended.cjs +1 -0
- package/dist/extensions/next/recommended.js +1 -21
- package/dist/extensions/node/index.cjs +1 -0
- package/dist/extensions/node/index.js +1 -12
- package/dist/extensions/node/recommended.cjs +1 -0
- package/dist/extensions/node/recommended.js +1 -39
- package/dist/extensions/react/index.cjs +1 -0
- package/dist/extensions/react/index.js +1 -15
- package/dist/extensions/react/recommended.cjs +1 -0
- package/dist/extensions/react/recommended.js +1 -72
- package/dist/extensions/react/typescript.cjs +1 -0
- package/dist/extensions/react/typescript.js +1 -29
- package/dist/helpers/getDevDepsList.cjs +1 -0
- package/dist/helpers/getDevDepsList.js +1 -32
- package/dist/helpers/getImportSettings.cjs +1 -0
- package/dist/helpers/getImportSettings.js +1 -42
- package/dist/helpers/getStylisticLegacyConfig.cjs +1 -0
- package/dist/helpers/getStylisticLegacyConfig.js +1 -29
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +37 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +1 -18
- package/dist/legacy/configs/base/config.cjs +1 -0
- package/dist/legacy/configs/base/config.js +1 -24
- package/dist/legacy/configs/base/index.cjs +1 -0
- package/dist/legacy/configs/base/index.js +1 -18
- package/dist/legacy/configs/base/legacy.cjs +1 -0
- package/dist/legacy/configs/base/legacy.js +1 -46
- package/dist/legacy/configs/base/recommended.cjs +1 -0
- package/dist/legacy/configs/base/recommended.js +1 -21
- package/dist/legacy/configs/base/typescript.cjs +1 -0
- package/dist/legacy/configs/base/typescript.js +1 -8
- package/dist/legacy/configs/index.cjs +1 -0
- package/dist/legacy/configs/index.js +1 -15
- package/dist/legacy/configs/react/base.cjs +1 -0
- package/dist/legacy/configs/react/base.js +1 -8
- package/dist/legacy/configs/react/config.cjs +1 -0
- package/dist/legacy/configs/react/config.js +1 -14
- package/dist/legacy/configs/react/hooks.cjs +1 -0
- package/dist/legacy/configs/react/hooks.js +1 -8
- package/dist/legacy/configs/react/index.cjs +1 -0
- package/dist/legacy/configs/react/index.js +1 -24
- package/dist/legacy/configs/react/legacy.cjs +1 -0
- package/dist/legacy/configs/react/legacy.js +1 -8
- package/dist/legacy/configs/react/recommended.cjs +1 -0
- package/dist/legacy/configs/react/recommended.js +1 -13
- package/dist/legacy/configs/react/typescript.cjs +1 -0
- package/dist/legacy/configs/react/typescript.js +1 -47
- package/dist/legacy/configs/typescript/config.cjs +1 -0
- package/dist/legacy/configs/typescript/config.js +1 -14
- package/dist/legacy/rules/best-practices.cjs +1 -0
- package/dist/legacy/rules/best-practices.js +1 -433
- package/dist/legacy/rules/errors.cjs +1 -0
- package/dist/legacy/rules/errors.js +1 -167
- package/dist/legacy/rules/es6.cjs +1 -0
- package/dist/legacy/rules/es6.js +1 -206
- package/dist/legacy/rules/imports.cjs +1 -0
- package/dist/legacy/rules/imports.js +1 -258
- package/dist/legacy/rules/index.cjs +1 -0
- package/dist/legacy/rules/index.js +1 -18
- package/dist/legacy/rules/node.cjs +1 -0
- package/dist/legacy/rules/node.js +1 -35
- package/dist/legacy/rules/react/react.cjs +1 -0
- package/dist/legacy/rules/react/react.js +1 -663
- package/dist/legacy/rules/react/reactHooks.cjs +1 -0
- package/dist/legacy/rules/react/reactHooks.js +1 -30
- package/dist/legacy/rules/react/reactJsxA11y.cjs +1 -0
- package/dist/legacy/rules/react/reactJsxA11y.js +1 -276
- package/dist/legacy/rules/strict.cjs +1 -0
- package/dist/legacy/rules/strict.js +1 -12
- package/dist/legacy/rules/style.cjs +1 -0
- package/dist/legacy/rules/style.js +1 -655
- package/dist/legacy/rules/typescript/typescript.cjs +1 -0
- package/dist/legacy/rules/typescript/typescript.js +1 -231
- package/dist/legacy/rules/typescript/typescriptOverrides.cjs +1 -0
- package/dist/legacy/rules/typescript/typescriptOverrides.js +1 -36
- package/dist/legacy/rules/typescript/typescriptSettings.cjs +1 -0
- package/dist/legacy/rules/typescript/typescriptSettings.js +1 -27
- package/dist/legacy/rules/variables.cjs +1 -0
- package/dist/legacy/rules/variables.js +1 -68
- package/dist/legacy.cjs +1 -0
- package/dist/legacy.d.cts +17 -0
- package/dist/legacy.d.ts +17 -0
- package/dist/legacy.js +1 -14
- package/dist/plugins/importXPlugin.cjs +1 -0
- package/dist/plugins/importXPlugin.js +1 -15
- package/dist/plugins/index.cjs +1 -0
- package/dist/plugins/index.js +1 -33
- package/dist/plugins/nextPlugin.cjs +1 -0
- package/dist/plugins/nextPlugin.js +1 -13
- package/dist/plugins/nodePlugin.cjs +1 -0
- package/dist/plugins/nodePlugin.js +1 -15
- package/dist/plugins/reactA11yPlugin.cjs +1 -0
- package/dist/plugins/reactA11yPlugin.js +1 -15
- package/dist/plugins/reactHooksPlugin.cjs +1 -0
- package/dist/plugins/reactHooksPlugin.js +1 -15
- package/dist/plugins/reactPlugin.cjs +1 -0
- package/dist/plugins/reactPlugin.js +1 -15
- package/dist/plugins/stylisticPlugin.cjs +1 -0
- package/dist/plugins/stylisticPlugin.js +1 -15
- package/dist/plugins/typescriptEslintPlugin.cjs +1 -0
- package/dist/plugins/typescriptEslintPlugin.js +1 -15
- package/dist/rules/best-practices.cjs +1 -0
- package/dist/rules/best-practices.js +1 -396
- package/dist/rules/errors.cjs +1 -0
- package/dist/rules/errors.js +1 -145
- package/dist/rules/es6.cjs +1 -0
- package/dist/rules/es6.js +1 -157
- package/dist/rules/imports.cjs +1 -0
- package/dist/rules/imports.js +1 -202
- package/dist/rules/importsStrict.cjs +1 -0
- package/dist/rules/importsStrict.js +1 -66
- package/dist/rules/index.cjs +1 -0
- package/dist/rules/index.js +1 -24
- package/dist/rules/next/nextBase.cjs +1 -0
- package/dist/rules/next/nextBase.js +1 -73
- package/dist/rules/next/nextCoreWebVitals.cjs +1 -0
- package/dist/rules/next/nextCoreWebVitals.js +1 -16
- package/dist/rules/node/nodeBase.cjs +1 -0
- package/dist/rules/node/nodeBase.js +1 -127
- package/dist/rules/node/nodeGlobals.cjs +1 -0
- package/dist/rules/node/nodeGlobals.js +1 -31
- package/dist/rules/node/nodeNoUnsupportedFeatures.cjs +1 -0
- package/dist/rules/node/nodeNoUnsupportedFeatures.js +1 -19
- package/dist/rules/node/nodePromises.cjs +1 -0
- package/dist/rules/node/nodePromises.js +1 -16
- package/dist/rules/react/react.cjs +1 -0
- package/dist/rules/react/react.js +1 -590
- package/dist/rules/react/reactHooks.cjs +1 -0
- package/dist/rules/react/reactHooks.js +1 -23
- package/dist/rules/react/reactJsxA11y.cjs +1 -0
- package/dist/rules/react/reactJsxA11y.js +1 -262
- package/dist/rules/react/reactStrict.cjs +1 -0
- package/dist/rules/react/reactStrict.js +1 -80
- package/dist/rules/react/reactStylistic.cjs +1 -0
- package/dist/rules/react/reactStylistic.js +1 -96
- package/dist/rules/strict.cjs +1 -0
- package/dist/rules/strict.js +1 -12
- package/dist/rules/style.cjs +1 -0
- package/dist/rules/style.js +1 -205
- package/dist/rules/stylistic.cjs +1 -0
- package/dist/rules/stylistic.js +1 -524
- package/dist/rules/stylisticPlus.cjs +1 -0
- package/dist/rules/stylisticPlus.js +1 -16
- package/dist/rules/typescript/typescriptBase.cjs +1 -0
- package/dist/rules/typescript/typescriptBase.js +1 -32
- package/dist/rules/typescript/typescriptEslint.cjs +1 -0
- package/dist/rules/typescript/typescriptEslint.js +1 -507
- package/dist/rules/typescript/typescriptEslintStrict.cjs +1 -0
- package/dist/rules/typescript/typescriptEslintStrict.js +1 -193
- package/dist/rules/typescript/typescriptImports.cjs +1 -0
- package/dist/rules/typescript/typescriptImports.js +1 -40
- package/dist/rules/typescript/typescriptStylistic.cjs +1 -0
- package/dist/rules/typescript/typescriptStylistic.js +1 -150
- package/dist/rules/typescript/typescriptStylisticPlus.cjs +1 -0
- package/dist/rules/typescript/typescriptStylisticPlus.js +1 -16
- package/dist/rules/variables.cjs +1 -0
- package/dist/rules/variables.js +1 -67
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.js +1 -18
- package/package.json +16 -16
- package/dist/@types/index.d.ts +0 -32
- package/dist/@types/legacy.d.ts +0 -12
package/dist/rules/es6.js
CHANGED
|
@@ -1,157 +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 globals_1 = __importDefault(require("globals"));
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const es6Rules = {
|
|
9
|
-
name: 'airbnb/config/es6',
|
|
10
|
-
files: utils_1.allFiles,
|
|
11
|
-
languageOptions: {
|
|
12
|
-
globals: Object.assign({}, globals_1.default.es2015),
|
|
13
|
-
parserOptions: {
|
|
14
|
-
ecmaVersion: 6,
|
|
15
|
-
sourceType: 'module',
|
|
16
|
-
ecmaFeatures: {
|
|
17
|
-
generators: false,
|
|
18
|
-
objectLiteralDuplicateProperties: false,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
rules: {
|
|
23
|
-
// enforces no braces where they can be omitted
|
|
24
|
-
// https://eslint.org/docs/rules/arrow-body-style
|
|
25
|
-
// TODO: enable requireReturnForObjectLiteral?
|
|
26
|
-
'arrow-body-style': [
|
|
27
|
-
'error',
|
|
28
|
-
'as-needed',
|
|
29
|
-
{
|
|
30
|
-
requireReturnForObjectLiteral: false,
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
// verify super() callings in constructors
|
|
34
|
-
'constructor-super': 'error',
|
|
35
|
-
// disallow modifying variables of class declarations
|
|
36
|
-
// https://eslint.org/docs/rules/no-class-assign
|
|
37
|
-
'no-class-assign': 'error',
|
|
38
|
-
// disallow modifying variables that are declared using const
|
|
39
|
-
'no-const-assign': 'error',
|
|
40
|
-
// disallow duplicate class members
|
|
41
|
-
// https://eslint.org/docs/rules/no-dupe-class-members
|
|
42
|
-
'no-dupe-class-members': 'error',
|
|
43
|
-
// disallow importing from the same path more than once
|
|
44
|
-
// https://eslint.org/docs/rules/no-duplicate-imports
|
|
45
|
-
// replaced by https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
|
|
46
|
-
'no-duplicate-imports': 'off',
|
|
47
|
-
// Disallow specified names in exports
|
|
48
|
-
// https://eslint.org/docs/rules/no-restricted-exports
|
|
49
|
-
'no-restricted-exports': [
|
|
50
|
-
'error',
|
|
51
|
-
{
|
|
52
|
-
restrictedNamedExports: [
|
|
53
|
-
'default', // use `export default` to provide a default export
|
|
54
|
-
'then', // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
// disallow specific imports
|
|
59
|
-
// https://eslint.org/docs/rules/no-restricted-imports
|
|
60
|
-
'no-restricted-imports': 'off',
|
|
61
|
-
// disallow to use this/super before super() calling in constructors.
|
|
62
|
-
// https://eslint.org/docs/rules/no-this-before-super
|
|
63
|
-
'no-this-before-super': 'error',
|
|
64
|
-
// disallow useless computed property keys
|
|
65
|
-
// https://eslint.org/docs/rules/no-useless-computed-key
|
|
66
|
-
'no-useless-computed-key': 'error',
|
|
67
|
-
// disallow unnecessary constructor
|
|
68
|
-
// https://eslint.org/docs/rules/no-useless-constructor
|
|
69
|
-
'no-useless-constructor': 'error',
|
|
70
|
-
// disallow renaming import, export, and destructured assignments to the same name
|
|
71
|
-
// https://eslint.org/docs/rules/no-useless-rename
|
|
72
|
-
'no-useless-rename': [
|
|
73
|
-
'error',
|
|
74
|
-
{
|
|
75
|
-
ignoreDestructuring: false,
|
|
76
|
-
ignoreImport: false,
|
|
77
|
-
ignoreExport: false,
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
// require let or const instead of var
|
|
81
|
-
'no-var': 'error',
|
|
82
|
-
// require method and property shorthand syntax for object literals
|
|
83
|
-
// https://eslint.org/docs/rules/object-shorthand
|
|
84
|
-
'object-shorthand': [
|
|
85
|
-
'error',
|
|
86
|
-
'always',
|
|
87
|
-
{
|
|
88
|
-
ignoreConstructors: false,
|
|
89
|
-
avoidQuotes: true,
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
// suggest using arrow functions as callbacks
|
|
93
|
-
'prefer-arrow-callback': [
|
|
94
|
-
'error',
|
|
95
|
-
{
|
|
96
|
-
allowNamedFunctions: false,
|
|
97
|
-
allowUnboundThis: true,
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
// suggest using of const declaration for variables that are never modified after declared
|
|
101
|
-
'prefer-const': [
|
|
102
|
-
'error',
|
|
103
|
-
{
|
|
104
|
-
destructuring: 'any',
|
|
105
|
-
ignoreReadBeforeAssign: true,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
// Prefer destructuring from arrays and objects
|
|
109
|
-
// https://eslint.org/docs/rules/prefer-destructuring
|
|
110
|
-
'prefer-destructuring': [
|
|
111
|
-
'error',
|
|
112
|
-
{
|
|
113
|
-
VariableDeclarator: {
|
|
114
|
-
array: false,
|
|
115
|
-
object: true,
|
|
116
|
-
},
|
|
117
|
-
AssignmentExpression: {
|
|
118
|
-
array: true,
|
|
119
|
-
object: false,
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
enforceForRenamedProperties: false,
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
// disallow parseInt() in favor of binary, octal, and hexadecimal literals
|
|
127
|
-
// https://eslint.org/docs/rules/prefer-numeric-literals
|
|
128
|
-
'prefer-numeric-literals': 'error',
|
|
129
|
-
// use rest parameters instead of arguments
|
|
130
|
-
// https://eslint.org/docs/rules/prefer-rest-params
|
|
131
|
-
'prefer-rest-params': 'error',
|
|
132
|
-
// suggest using the spread syntax instead of .apply()
|
|
133
|
-
// https://eslint.org/docs/rules/prefer-spread
|
|
134
|
-
'prefer-spread': 'error',
|
|
135
|
-
// suggest using template literals instead of string concatenation
|
|
136
|
-
// https://eslint.org/docs/rules/prefer-template
|
|
137
|
-
'prefer-template': 'error',
|
|
138
|
-
// disallow generator functions that do not have yield
|
|
139
|
-
// https://eslint.org/docs/rules/require-yield
|
|
140
|
-
'require-yield': 'error',
|
|
141
|
-
// import sorting
|
|
142
|
-
// https://eslint.org/docs/rules/sort-imports
|
|
143
|
-
'sort-imports': [
|
|
144
|
-
'off',
|
|
145
|
-
{
|
|
146
|
-
ignoreCase: false,
|
|
147
|
-
ignoreDeclarationSort: false,
|
|
148
|
-
ignoreMemberSort: false,
|
|
149
|
-
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
// require a Symbol description
|
|
153
|
-
// https://eslint.org/docs/rules/symbol-description
|
|
154
|
-
'symbol-description': 'error',
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
exports.default = es6Rules;
|
|
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"globals";var i,a,o=e((()=>{n(),i={name:`airbnb/config/es6`,files:t,languageOptions:{globals:{...r.es2015},parserOptions:{ecmaVersion:6,sourceType:`module`,ecmaFeatures:{generators:!1,objectLiteralDuplicateProperties:!1}}},rules:{"arrow-body-style":[`error`,`as-needed`,{requireReturnForObjectLiteral:!1}],"constructor-super":`error`,"no-class-assign":`error`,"no-const-assign":`error`,"no-dupe-class-members":`error`,"no-duplicate-imports":`off`,"no-restricted-exports":[`error`,{restrictedNamedExports:[`default`,`then`]}],"no-restricted-imports":`off`,"no-this-before-super":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":[`error`,{ignoreDestructuring:!1,ignoreImport:!1,ignoreExport:!1}],"no-var":`error`,"object-shorthand":[`error`,`always`,{ignoreConstructors:!1,avoidQuotes:!0}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`any`,ignoreReadBeforeAssign:!0}],"prefer-destructuring":[`error`,{VariableDeclarator:{array:!1,object:!0},AssignmentExpression:{array:!0,object:!1}},{enforceForRenamedProperties:!1}],"prefer-numeric-literals":`error`,"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"require-yield":`error`,"sort-imports":[`off`,{ignoreCase:!1,ignoreDeclarationSort:!1,ignoreMemberSort:!1,memberSyntaxSortOrder:[`none`,`all`,`multiple`,`single`]}],"symbol-description":`error`}},a=i}));o();export{a as default,o as init_es6};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`),n=require(`../helpers/getDevDepsList.cjs`);let r=require(`globals`);r=e.__toESM(r);var i,a,o=e.__esmMin((()=>{n.init_getDevDepsList(),t.init_utils(),i={name:`airbnb/config/import-x`,files:t.allFiles,languageOptions:{globals:{...r.default.es2015},parserOptions:{ecmaVersion:2018,sourceType:`module`}},rules:{"import-x/consistent-type-specifier-style":`off`,"import-x/default":`error`,"import-x/dynamic-import-chunkname":`off`,"import-x/export":`error`,"import-x/exports-last":`off`,"import-x/extensions":[`error`,`ignorePackages`,t.jsExtensionsRule],"import-x/first":`error`,"import-x/group-exports":`off`,"import-x/max-dependencies":`off`,"import-x/named":`error`,"import-x/namespace":`error`,"import-x/newline-after-import":`error`,"import-x/no-absolute-path":`error`,"import-x/no-amd":`error`,"import-x/no-anonymous-default-export":`off`,"import-x/no-commonjs":`off`,"import-x/no-cycle":[`error`,{maxDepth:`∞`}],"import-x/no-default-export":`off`,"import-x/no-deprecated":`off`,"import-x/no-duplicates":`error`,"import-x/no-dynamic-require":`error`,"import-x/no-empty-named-blocks":`error`,"import-x/no-extraneous-dependencies":[`error`,{devDependencies:n.default(t.jsExtensions.map(e=>e.slice(1)).join(`,`)),optionalDependencies:!1,peerDependencies:!0,bundledDependencies:!0}],"import-x/no-import-module-exports":[`error`,{exceptions:[]}],"import-x/no-internal-modules":`off`,"import-x/no-mutable-exports":`error`,"import-x/no-named-as-default-member":`error`,"import-x/no-named-as-default":`error`,"import-x/no-named-default":`error`,"import-x/no-named-export":`off`,"import-x/no-namespace":`off`,"import-x/no-nodejs-modules":`off`,"import-x/no-relative-packages":`error`,"import-x/no-relative-parent-imports":`off`,"import-x/no-rename-default":`warn`,"import-x/no-restricted-paths":`off`,"import-x/no-self-import":`error`,"import-x/no-unassigned-import":`off`,"import-x/no-unresolved":[`error`,{commonjs:!0,caseSensitive:!0}],"import-x/no-unused-modules":`off`,"import-x/no-useless-path-segments":[`error`,{noUselessIndex:!0,commonjs:!0}],"import-x/no-webpack-loader-syntax":`error`,"import-x/order":[`error`,{groups:[[`builtin`,`external`,`internal`]]}],"import-x/prefer-default-export":`error`,"import-x/prefer-namespace-import":`off`,"import-x/unambiguous":`off`}},a=i}));o(),exports.default=a,Object.defineProperty(exports,`init_imports`,{enumerable:!0,get:function(){return o}});
|
package/dist/rules/imports.js
CHANGED
|
@@ -1,202 +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
|
-
exports.deprecatedImportsRules = void 0;
|
|
7
|
-
const globals_1 = __importDefault(require("globals"));
|
|
8
|
-
const getDevDepsList_1 = __importDefault(require("../helpers/getDevDepsList"));
|
|
9
|
-
const utils_1 = require("../utils");
|
|
10
|
-
const importsRules = {
|
|
11
|
-
name: 'airbnb/config/import-x',
|
|
12
|
-
files: utils_1.allFiles,
|
|
13
|
-
languageOptions: {
|
|
14
|
-
globals: Object.assign({}, globals_1.default.es2015),
|
|
15
|
-
parserOptions: {
|
|
16
|
-
ecmaVersion: 2018,
|
|
17
|
-
sourceType: 'module',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
// enforce a consistent style for type specifiers (inline or top-level)
|
|
22
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md
|
|
23
|
-
'import-x/consistent-type-specifier-style': 'off',
|
|
24
|
-
// ensure default import coupled with default export
|
|
25
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/default.md#when-not-to-use-it
|
|
26
|
-
'import-x/default': 'error',
|
|
27
|
-
// dynamic imports require a leading comment with a webpackChunkName
|
|
28
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/dynamic-import-chunkname.md
|
|
29
|
-
'import-x/dynamic-import-chunkname': 'off',
|
|
30
|
-
// disallow invalid exports, e.g. multiple defaults
|
|
31
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/export.md
|
|
32
|
-
'import-x/export': 'error',
|
|
33
|
-
// This rule enforces that all exports are declared at the bottom of the file.
|
|
34
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/exports-last.md
|
|
35
|
-
'import-x/exports-last': 'off',
|
|
36
|
-
// Ensure consistent use of file extension within the import path
|
|
37
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/extensions.md
|
|
38
|
-
'import-x/extensions': ['error', 'ignorePackages', utils_1.jsExtensionsRule],
|
|
39
|
-
// disallow non-import statements appearing before import statements
|
|
40
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/first.md
|
|
41
|
-
'import-x/first': 'error',
|
|
42
|
-
// Reports when named exports are not grouped together in a single export declaration
|
|
43
|
-
// or when multiple assignments to CommonJS module.exports or exports object are present
|
|
44
|
-
// in a single file.
|
|
45
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
|
|
46
|
-
'import-x/group-exports': 'off',
|
|
47
|
-
// Forbid modules to have too many dependencies
|
|
48
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/max-dependencies.md
|
|
49
|
-
'import-x/max-dependencies': 'off',
|
|
50
|
-
// ensure named imports coupled with named exports
|
|
51
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/named.md#when-not-to-use-it
|
|
52
|
-
'import-x/named': 'error',
|
|
53
|
-
// Enforces names exist at the time they are dereferenced
|
|
54
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/namespace.md
|
|
55
|
-
'import-x/namespace': 'error',
|
|
56
|
-
// Require a newline after the last import/require in a group
|
|
57
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/newline-after-import.md
|
|
58
|
-
'import-x/newline-after-import': 'error',
|
|
59
|
-
// Forbid import of modules using absolute paths
|
|
60
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md
|
|
61
|
-
'import-x/no-absolute-path': 'error',
|
|
62
|
-
// disallow AMD require/define
|
|
63
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-amd.md
|
|
64
|
-
'import-x/no-amd': 'error',
|
|
65
|
-
// Reports if a module's default export is unnamed
|
|
66
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
|
|
67
|
-
'import-x/no-anonymous-default-export': 'off',
|
|
68
|
-
// disallow require()
|
|
69
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-commonjs.md
|
|
70
|
-
'import-x/no-commonjs': 'off',
|
|
71
|
-
// Forbid cyclical dependencies between modules
|
|
72
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-cycle.md
|
|
73
|
-
'import-x/no-cycle': ['error', { maxDepth: '∞' }],
|
|
74
|
-
// Prohibit default exports
|
|
75
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-default-export.md
|
|
76
|
-
'import-x/no-default-export': 'off',
|
|
77
|
-
// disallow use of jsdoc-marked-deprecated imports
|
|
78
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-deprecated.md
|
|
79
|
-
'import-x/no-deprecated': 'off',
|
|
80
|
-
// disallow duplicate imports
|
|
81
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
|
|
82
|
-
'import-x/no-duplicates': 'error',
|
|
83
|
-
// Forbid require() calls with expressions
|
|
84
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-dynamic-require.md
|
|
85
|
-
'import-x/no-dynamic-require': 'error',
|
|
86
|
-
// Reports the use of empty named import blocks.
|
|
87
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md
|
|
88
|
-
'import-x/no-empty-named-blocks': 'error',
|
|
89
|
-
// Forbid the use of extraneous packages
|
|
90
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-extraneous-dependencies.md
|
|
91
|
-
'import-x/no-extraneous-dependencies': [
|
|
92
|
-
'error',
|
|
93
|
-
{
|
|
94
|
-
devDependencies: (0, getDevDepsList_1.default)(utils_1.jsExtensions.map((ext) => ext.slice(1)).join(',')),
|
|
95
|
-
optionalDependencies: false,
|
|
96
|
-
peerDependencies: true,
|
|
97
|
-
bundledDependencies: true,
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
// Reports the use of import declarations with CommonJS exports in any module except for the main module.
|
|
101
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-import-module-exports.md
|
|
102
|
-
'import-x/no-import-module-exports': [
|
|
103
|
-
'error',
|
|
104
|
-
{
|
|
105
|
-
exceptions: [],
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
// prevent importing the submodules of other modules
|
|
109
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-internal-modules.md
|
|
110
|
-
'import-x/no-internal-modules': 'off',
|
|
111
|
-
// Forbid mutable exports
|
|
112
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-mutable-exports.md
|
|
113
|
-
'import-x/no-mutable-exports': 'error',
|
|
114
|
-
// warn on accessing default export property names that are also named exports
|
|
115
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default-member.md
|
|
116
|
-
'import-x/no-named-as-default-member': 'error',
|
|
117
|
-
// do not allow a default import name to match a named export
|
|
118
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default.md
|
|
119
|
-
'import-x/no-named-as-default': 'error',
|
|
120
|
-
// Prevent importing the default as if it were named
|
|
121
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-default.md
|
|
122
|
-
'import-x/no-named-default': 'error',
|
|
123
|
-
// Prohibit named exports. this is a terrible rule, do not use it.
|
|
124
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-export.md
|
|
125
|
-
'import-x/no-named-export': 'off',
|
|
126
|
-
// disallow namespace imports
|
|
127
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md
|
|
128
|
-
'import-x/no-namespace': 'off',
|
|
129
|
-
// No Node.js builtin modules
|
|
130
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-nodejs-modules.md
|
|
131
|
-
'import-x/no-nodejs-modules': 'off',
|
|
132
|
-
// Use this rule to prevent importing packages through relative paths.
|
|
133
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-packages.md
|
|
134
|
-
'import-x/no-relative-packages': 'error',
|
|
135
|
-
// Use this rule to prevent imports to folders in relative parent paths.
|
|
136
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-parent-imports.md
|
|
137
|
-
'import-x/no-relative-parent-imports': 'off',
|
|
138
|
-
// Prohibit importing a default export by another name.
|
|
139
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-rename-default.md
|
|
140
|
-
'import-x/no-rename-default': 'warn',
|
|
141
|
-
// Restrict which files can be imported in a given folder
|
|
142
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-restricted-paths.md
|
|
143
|
-
'import-x/no-restricted-paths': 'off',
|
|
144
|
-
// Forbid a module from importing itself
|
|
145
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-self-import.md
|
|
146
|
-
'import-x/no-self-import': 'error',
|
|
147
|
-
// Prevent unassigned imports
|
|
148
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unassigned-import.md
|
|
149
|
-
// importing for side effects is perfectly acceptable, if you need side effects.
|
|
150
|
-
'import-x/no-unassigned-import': 'off',
|
|
151
|
-
// ensure imports point to files/modules that can be resolved
|
|
152
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unresolved.md
|
|
153
|
-
'import-x/no-unresolved': [
|
|
154
|
-
'error',
|
|
155
|
-
{
|
|
156
|
-
commonjs: true,
|
|
157
|
-
caseSensitive: true,
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
// Reports modules without any exports, or with unused exports
|
|
161
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unused-modules.md
|
|
162
|
-
// No Common.js support
|
|
163
|
-
'import-x/no-unused-modules': 'off',
|
|
164
|
-
// Ensures that there are no useless path segments
|
|
165
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-useless-path-segments.md
|
|
166
|
-
'import-x/no-useless-path-segments': [
|
|
167
|
-
'error',
|
|
168
|
-
{
|
|
169
|
-
noUselessIndex: true,
|
|
170
|
-
commonjs: true,
|
|
171
|
-
},
|
|
172
|
-
],
|
|
173
|
-
// Forbid Webpack loader syntax in imports
|
|
174
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-webpack-loader-syntax.md
|
|
175
|
-
'import-x/no-webpack-loader-syntax': 'error',
|
|
176
|
-
// ensure absolute imports are above relative imports and that unassigned imports are ignored
|
|
177
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
|
|
178
|
-
'import-x/order': ['error', { groups: [['builtin', 'external', 'internal']] }],
|
|
179
|
-
// Require modules with a single export to use a default export
|
|
180
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-default-export.md
|
|
181
|
-
'import-x/prefer-default-export': 'error',
|
|
182
|
-
// Enforce using namespace imports for specific modules, like react/react-dom, etc.
|
|
183
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-namespace-import.md
|
|
184
|
-
'import-x/prefer-namespace-import': 'off',
|
|
185
|
-
// Warn if a module could be mistakenly parsed as a script by a consumer
|
|
186
|
-
// leveraging Unambiguous JavaScript Grammar
|
|
187
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/unambiguous.md
|
|
188
|
-
// this should not be enabled until this proposal has at least been *presented* to TC39.
|
|
189
|
-
// At the moment, it's not a thing.
|
|
190
|
-
'import-x/unambiguous': 'off',
|
|
191
|
-
},
|
|
192
|
-
};
|
|
193
|
-
exports.deprecatedImportsRules = {
|
|
194
|
-
name: 'airbnb/config/import-x/deprecated',
|
|
195
|
-
files: utils_1.allFiles,
|
|
196
|
-
rules: {
|
|
197
|
-
// disallow non-import statements appearing before import statements
|
|
198
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/imports-first.md
|
|
199
|
-
'import-x/imports-first': 'off',
|
|
200
|
-
},
|
|
201
|
-
};
|
|
202
|
-
exports.default = importsRules;
|
|
1
|
+
import{__esmMin as e}from"../_virtual/rolldown_runtime.js";import{allFiles as t,init_utils as n,jsExtensions as r,jsExtensionsRule as i}from"../utils/index.js";import a,{init_getDevDepsList as o}from"../helpers/getDevDepsList.js";import s from"globals";var c,l,u=e((()=>{o(),n(),c={name:`airbnb/config/import-x`,files:t,languageOptions:{globals:{...s.es2015},parserOptions:{ecmaVersion:2018,sourceType:`module`}},rules:{"import-x/consistent-type-specifier-style":`off`,"import-x/default":`error`,"import-x/dynamic-import-chunkname":`off`,"import-x/export":`error`,"import-x/exports-last":`off`,"import-x/extensions":[`error`,`ignorePackages`,i],"import-x/first":`error`,"import-x/group-exports":`off`,"import-x/max-dependencies":`off`,"import-x/named":`error`,"import-x/namespace":`error`,"import-x/newline-after-import":`error`,"import-x/no-absolute-path":`error`,"import-x/no-amd":`error`,"import-x/no-anonymous-default-export":`off`,"import-x/no-commonjs":`off`,"import-x/no-cycle":[`error`,{maxDepth:`∞`}],"import-x/no-default-export":`off`,"import-x/no-deprecated":`off`,"import-x/no-duplicates":`error`,"import-x/no-dynamic-require":`error`,"import-x/no-empty-named-blocks":`error`,"import-x/no-extraneous-dependencies":[`error`,{devDependencies:a(r.map(e=>e.slice(1)).join(`,`)),optionalDependencies:!1,peerDependencies:!0,bundledDependencies:!0}],"import-x/no-import-module-exports":[`error`,{exceptions:[]}],"import-x/no-internal-modules":`off`,"import-x/no-mutable-exports":`error`,"import-x/no-named-as-default-member":`error`,"import-x/no-named-as-default":`error`,"import-x/no-named-default":`error`,"import-x/no-named-export":`off`,"import-x/no-namespace":`off`,"import-x/no-nodejs-modules":`off`,"import-x/no-relative-packages":`error`,"import-x/no-relative-parent-imports":`off`,"import-x/no-rename-default":`warn`,"import-x/no-restricted-paths":`off`,"import-x/no-self-import":`error`,"import-x/no-unassigned-import":`off`,"import-x/no-unresolved":[`error`,{commonjs:!0,caseSensitive:!0}],"import-x/no-unused-modules":`off`,"import-x/no-useless-path-segments":[`error`,{noUselessIndex:!0,commonjs:!0}],"import-x/no-webpack-loader-syntax":`error`,"import-x/order":[`error`,{groups:[[`builtin`,`external`,`internal`]]}],"import-x/prefer-default-export":`error`,"import-x/prefer-namespace-import":`off`,"import-x/unambiguous":`off`}},l=c}));u();export{l as default,u as init_imports};
|
|
@@ -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/import-x/strict`,files:t.allFiles,rules:{"import-x/consistent-type-specifier-style":[`error`,`prefer-top-level`],"import-x/no-anonymous-default-export":[`error`,{allowArray:!0,allowObject:!0}],"import-x/no-namespace":`error`,"import-x/order":[`error`,{groups:[`builtin`,`external`,`internal`,[`parent`,`sibling`,`index`],`object`,[`unknown`,`type`]],pathGroups:[{pattern:`react`,group:`external`,position:`before`}],pathGroupsExcludedImportTypes:[`type`],distinctGroup:!0,"newlines-between":`always`,alphabetize:{order:`asc`,orderImportKind:`asc`,caseInsensitive:!0},named:{enabled:!0,import:!0,export:!0,require:!0,cjsExports:!0,types:`types-last`},warnOnUnassignedImports:!0,sortTypesGroup:!0,"newlines-between-types":`always`}]}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_importsStrict`,{enumerable:!0,get:function(){return i}});
|
|
@@ -1,66 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../utils");
|
|
4
|
-
const importsStrictRules = {
|
|
5
|
-
name: 'airbnb/config/import-x/strict',
|
|
6
|
-
files: utils_1.allFiles,
|
|
7
|
-
rules: {
|
|
8
|
-
// enforce a consistent style for type specifiers (inline or top-level)
|
|
9
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md
|
|
10
|
-
'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
|
11
|
-
// Reports if a module's default export is unnamed
|
|
12
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
|
|
13
|
-
'import-x/no-anonymous-default-export': [
|
|
14
|
-
'error',
|
|
15
|
-
{
|
|
16
|
-
allowArray: true,
|
|
17
|
-
allowObject: true,
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
// disallow namespace imports
|
|
21
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md
|
|
22
|
-
'import-x/no-namespace': 'error',
|
|
23
|
-
// ensure absolute imports are above relative imports and that unassigned imports are ignored
|
|
24
|
-
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
|
|
25
|
-
'import-x/order': [
|
|
26
|
-
'error',
|
|
27
|
-
{
|
|
28
|
-
groups: [
|
|
29
|
-
'builtin',
|
|
30
|
-
'external',
|
|
31
|
-
'internal',
|
|
32
|
-
['parent', 'sibling', 'index'],
|
|
33
|
-
'object',
|
|
34
|
-
['unknown', 'type'],
|
|
35
|
-
],
|
|
36
|
-
pathGroups: [
|
|
37
|
-
{
|
|
38
|
-
pattern: 'react',
|
|
39
|
-
group: 'external',
|
|
40
|
-
position: 'before',
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
pathGroupsExcludedImportTypes: ['type'],
|
|
44
|
-
distinctGroup: true,
|
|
45
|
-
'newlines-between': 'always',
|
|
46
|
-
alphabetize: {
|
|
47
|
-
order: 'asc',
|
|
48
|
-
orderImportKind: 'asc',
|
|
49
|
-
caseInsensitive: true,
|
|
50
|
-
},
|
|
51
|
-
named: {
|
|
52
|
-
enabled: true,
|
|
53
|
-
import: true,
|
|
54
|
-
export: true,
|
|
55
|
-
require: true,
|
|
56
|
-
cjsExports: true,
|
|
57
|
-
types: 'types-last',
|
|
58
|
-
},
|
|
59
|
-
warnOnUnassignedImports: true,
|
|
60
|
-
sortTypesGroup: true,
|
|
61
|
-
'newlines-between-types': 'always',
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
exports.default = importsStrictRules;
|
|
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/import-x/strict`,files:t,rules:{"import-x/consistent-type-specifier-style":[`error`,`prefer-top-level`],"import-x/no-anonymous-default-export":[`error`,{allowArray:!0,allowObject:!0}],"import-x/no-namespace":`error`,"import-x/order":[`error`,{groups:[`builtin`,`external`,`internal`,[`parent`,`sibling`,`index`],`object`,[`unknown`,`type`]],pathGroups:[{pattern:`react`,group:`external`,position:`before`}],pathGroupsExcludedImportTypes:[`type`],distinctGroup:!0,"newlines-between":`always`,alphabetize:{order:`asc`,orderImportKind:`asc`,caseInsensitive:!0},named:{enabled:!0,import:!0,export:!0,require:!0,cjsExports:!0,types:`types-last`},warnOnUnassignedImports:!0,sortTypesGroup:!0,"newlines-between-types":`always`}]}},i=r}));a();export{i as default,a as init_importsStrict};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../configs/next/config.cjs`),n=require(`../configs/node/config.cjs`),r=require(`../configs/base/configExtended.cjs`),i=require(`../configs/react/configExtended.cjs`),a=require(`../configs/typescript/configExtended.cjs`),o={get base(){return(r.init_configExtended(),e.__toCommonJS(r.configExtended_exports)).default},get node(){return(n.init_config(),e.__toCommonJS(n.config_exports)).default},get react(){return(i.init_configExtended(),e.__toCommonJS(i.configExtended_exports)).default},get next(){return(t.init_config(),e.__toCommonJS(t.config_exports)).default},get typescript(){return(a.init_configExtended(),e.__toCommonJS(a.configExtended_exports)).default}};var s=o;exports.default=s;
|
package/dist/rules/index.js
CHANGED
|
@@ -1,24 +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 rules = {
|
|
8
|
-
get base() {
|
|
9
|
-
return require('../configs/base/configExtended').default;
|
|
10
|
-
},
|
|
11
|
-
get node() {
|
|
12
|
-
return require('../configs/node/config').default;
|
|
13
|
-
},
|
|
14
|
-
get react() {
|
|
15
|
-
return require('../configs/react/configExtended').default;
|
|
16
|
-
},
|
|
17
|
-
get next() {
|
|
18
|
-
return require('../configs/next/config').default;
|
|
19
|
-
},
|
|
20
|
-
get typescript() {
|
|
21
|
-
return require('../configs/typescript/configExtended').default;
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
exports.default = rules;
|
|
1
|
+
import{__toCommonJS as e}from"../_virtual/rolldown_runtime.js";import{config_exports as t,init_config as n}from"../configs/next/config.js";import{config_exports as r,init_config as i}from"../configs/node/config.js";import{configExtended_exports as a,init_configExtended as o}from"../configs/base/configExtended.js";import{configExtended_exports as s,init_configExtended as c}from"../configs/react/configExtended.js";import{configExtended_exports as l,init_configExtended as u}from"../configs/typescript/configExtended.js";var d={get base(){return(o(),e(a)).default},get node(){return(i(),e(r)).default},get react(){return(c(),e(s)).default},get next(){return(n(),e(t)).default},get typescript(){return(u(),e(l)).default}};export{d as default};
|
|
@@ -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/next/base`,files:t.allFiles,rules:{"@next/next/google-font-display":`warn`,"@next/next/google-font-preconnect":`warn`,"@next/next/inline-script-id":`error`,"@next/next/next-script-for-ga":`warn`,"@next/next/no-assign-module-variable":`error`,"@next/next/no-async-client-component":`warn`,"@next/next/no-before-interactive-script-outside-document":`warn`,"@next/next/no-css-tags":`warn`,"@next/next/no-document-import-in-page":`error`,"@next/next/no-duplicate-head":`error`,"@next/next/no-head-element":`warn`,"@next/next/no-head-import-in-document":`error`,"@next/next/no-html-link-for-pages":`warn`,"@next/next/no-img-element":`warn`,"@next/next/no-page-custom-font":`warn`,"@next/next/no-script-component-in-head":`error`,"@next/next/no-styled-jsx-in-document":`warn`,"@next/next/no-sync-scripts":`warn`,"@next/next/no-title-in-document-head":`warn`,"@next/next/no-typos":`warn`,"@next/next/no-unwanted-polyfillio":`warn`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_nextBase`,{enumerable:!0,get:function(){return i}});
|
|
@@ -1,73 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../../utils");
|
|
4
|
-
const nextBaseRules = {
|
|
5
|
-
name: 'airbnb/config/next/base',
|
|
6
|
-
files: utils_1.allFiles,
|
|
7
|
-
rules: {
|
|
8
|
-
// Enforce font-display behavior with Google Fonts.
|
|
9
|
-
// https://nextjs.org/docs/messages/google-font-display
|
|
10
|
-
'@next/next/google-font-display': 'warn',
|
|
11
|
-
// Ensure preconnect is used with Google Fonts.
|
|
12
|
-
// https://nextjs.org/docs/messages/google-font-preconnect
|
|
13
|
-
'@next/next/google-font-preconnect': 'warn',
|
|
14
|
-
// Enforce id attribute on next/script components with inline content.
|
|
15
|
-
// https://nextjs.org/docs/messages/inline-script-id
|
|
16
|
-
'@next/next/inline-script-id': 'error',
|
|
17
|
-
// Prefer next/script component when using the inline script for Google Analytics.
|
|
18
|
-
// https://nextjs.org/docs/messages/next-script-for-ga
|
|
19
|
-
'@next/next/next-script-for-ga': 'warn',
|
|
20
|
-
// Prevent assignment to the module variable.
|
|
21
|
-
// https://nextjs.org/docs/messages/no-assign-module-variable
|
|
22
|
-
'@next/next/no-assign-module-variable': 'error',
|
|
23
|
-
// Prevent client components from being async functions.
|
|
24
|
-
// https://nextjs.org/docs/messages/no-async-client-component
|
|
25
|
-
'@next/next/no-async-client-component': 'warn',
|
|
26
|
-
// Prevent usage of next/script's beforeInteractive strategy outside of pages/_document.js.
|
|
27
|
-
// https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
|
|
28
|
-
'@next/next/no-before-interactive-script-outside-document': 'warn',
|
|
29
|
-
// Prevent manual stylesheet tags.
|
|
30
|
-
// https://nextjs.org/docs/messages/no-css-tags
|
|
31
|
-
'@next/next/no-css-tags': 'warn',
|
|
32
|
-
// Prevent importing next/document outside of pages/_document.js.
|
|
33
|
-
// https://nextjs.org/docs/messages/no-document-import-in-page
|
|
34
|
-
'@next/next/no-document-import-in-page': 'error',
|
|
35
|
-
// Prevent duplicate usage of <Head> in pages/_document.js.
|
|
36
|
-
// https://nextjs.org/docs/messages/no-duplicate-head
|
|
37
|
-
'@next/next/no-duplicate-head': 'error',
|
|
38
|
-
// Prevent usage of <head> element.
|
|
39
|
-
// https://nextjs.org/docs/messages/no-head-element
|
|
40
|
-
'@next/next/no-head-element': 'warn',
|
|
41
|
-
// Prevent usage of next/head in pages/_document.js.
|
|
42
|
-
// https://nextjs.org/docs/messages/no-head-import-in-document
|
|
43
|
-
'@next/next/no-head-import-in-document': 'error',
|
|
44
|
-
// Prevent usage of <a> elements to navigate to internal Next.js pages.
|
|
45
|
-
// https://nextjs.org/docs/messages/no-html-link-for-pages
|
|
46
|
-
'@next/next/no-html-link-for-pages': 'warn',
|
|
47
|
-
// Prevent usage of <img> element due to slower LCP and higher bandwidth.
|
|
48
|
-
// https://nextjs.org/docs/messages/no-img-element
|
|
49
|
-
'@next/next/no-img-element': 'warn',
|
|
50
|
-
// Prevent page-only custom fonts.
|
|
51
|
-
// https://nextjs.org/docs/messages/no-page-custom-font
|
|
52
|
-
'@next/next/no-page-custom-font': 'warn',
|
|
53
|
-
// Prevent usage of next/script in next/head component.
|
|
54
|
-
// https://nextjs.org/docs/messages/no-script-component-in-head
|
|
55
|
-
'@next/next/no-script-component-in-head': 'error',
|
|
56
|
-
// Prevent usage of styled-jsx in pages/_document.js.
|
|
57
|
-
// https://nextjs.org/docs/messages/no-styled-jsx-in-document
|
|
58
|
-
'@next/next/no-styled-jsx-in-document': 'warn',
|
|
59
|
-
// Prevent synchronous scripts.
|
|
60
|
-
// https://nextjs.org/docs/messages/no-sync-scripts
|
|
61
|
-
'@next/next/no-sync-scripts': 'warn',
|
|
62
|
-
// Prevent usage of <title> with Head component from next/document.
|
|
63
|
-
// https://nextjs.org/docs/messages/no-title-in-document-head
|
|
64
|
-
'@next/next/no-title-in-document-head': 'warn',
|
|
65
|
-
// Prevent common typos in Next.js's data fetching functions
|
|
66
|
-
// https://nextjs.org/docs/pages/building-your-application/data-fetching
|
|
67
|
-
'@next/next/no-typos': 'warn',
|
|
68
|
-
// Prevent duplicate polyfills from Polyfill.io.
|
|
69
|
-
// https://nextjs.org/docs/messages/no-unwanted-polyfillio
|
|
70
|
-
'@next/next/no-unwanted-polyfillio': 'warn',
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
exports.default = nextBaseRules;
|
|
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/next/base`,files:t,rules:{"@next/next/google-font-display":`warn`,"@next/next/google-font-preconnect":`warn`,"@next/next/inline-script-id":`error`,"@next/next/next-script-for-ga":`warn`,"@next/next/no-assign-module-variable":`error`,"@next/next/no-async-client-component":`warn`,"@next/next/no-before-interactive-script-outside-document":`warn`,"@next/next/no-css-tags":`warn`,"@next/next/no-document-import-in-page":`error`,"@next/next/no-duplicate-head":`error`,"@next/next/no-head-element":`warn`,"@next/next/no-head-import-in-document":`error`,"@next/next/no-html-link-for-pages":`warn`,"@next/next/no-img-element":`warn`,"@next/next/no-page-custom-font":`warn`,"@next/next/no-script-component-in-head":`error`,"@next/next/no-styled-jsx-in-document":`warn`,"@next/next/no-sync-scripts":`warn`,"@next/next/no-title-in-document-head":`warn`,"@next/next/no-typos":`warn`,"@next/next/no-unwanted-polyfillio":`warn`}},i=r}));a();export{i as default,a as init_nextBase};
|
|
@@ -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/next/core-web-vitals`,files:t.allFiles,rules:{"@next/next/no-html-link-for-pages":`error`,"@next/next/no-sync-scripts":`error`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_nextCoreWebVitals`,{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 nextCoreWebVitalsRules = {
|
|
5
|
-
name: 'airbnb/config/next/core-web-vitals',
|
|
6
|
-
files: utils_1.allFiles,
|
|
7
|
-
rules: {
|
|
8
|
-
// Prevent usage of <a> elements to navigate to internal Next.js pages.
|
|
9
|
-
// https://nextjs.org/docs/messages/no-html-link-for-pages
|
|
10
|
-
'@next/next/no-html-link-for-pages': 'error',
|
|
11
|
-
// Prevent synchronous scripts.
|
|
12
|
-
// https://nextjs.org/docs/messages/no-sync-scripts
|
|
13
|
-
'@next/next/no-sync-scripts': 'error',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
exports.default = nextCoreWebVitalsRules;
|
|
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/next/core-web-vitals`,files:t,rules:{"@next/next/no-html-link-for-pages":`error`,"@next/next/no-sync-scripts":`error`}},i=r}));a();export{i as default,a as init_nextCoreWebVitals};
|
|
@@ -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/node/base`,files:t.allFiles,rules:{"n/callback-return":`off`,"n/exports-style":[`error`,`module.exports`,{allowBatchAssign:!1}],"n/file-extension-in-import":`off`,"n/global-require":`error`,"n/handle-callback-err":`off`,"n/hashbang":`error`,"n/no-callback-literal":`off`,"n/no-deprecated-api":`error`,"n/no-exports-assign":`error`,"n/no-extraneous-import":`off`,"n/no-extraneous-require":`off`,"n/no-missing-import":`off`,"n/no-missing-require":`off`,"n/no-mixed-requires":`off`,"n/no-new-require":`error`,"n/no-path-concat":`error`,"n/no-process-env":`off`,"n/no-process-exit":`error`,"n/no-restricted-import":`off`,"n/no-restricted-require":`off`,"n/no-sync":[`error`,{allowAtRootLevel:!1,ignores:[]}],"n/no-top-level-await":`off`,"n/no-unpublished-bin":`error`,"n/no-unpublished-import":`off`,"n/no-unpublished-require":`off`,"n/prefer-node-protocol":`error`,"n/process-exit-as-throw":`error`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_nodeBase`,{enumerable:!0,get:function(){return i}});
|