eslint-config-airbnb-extended 0.9.0 → 0.9.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/dist/@types/index.d.ts +16 -16
- package/dist/configs/base/config.js +4 -0
- package/dist/configs/base/recommended.js +1 -1
- package/dist/configs/base/typescript.js +15 -1
- package/dist/configs/index.js +13 -11
- package/dist/configs/react/typescript.js +2 -2
- package/dist/plugins/index.js +22 -17
- package/dist/plugins/nextPlugin.js +0 -1
- package/dist/rules/index.js +16 -16
- package/dist/rules/typescript/typescriptImports.js +0 -7
- package/package.json +3 -2
package/dist/@types/index.d.ts
CHANGED
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
* Direct export not allowed, it will increase the size of d.ts
|
|
3
3
|
*/
|
|
4
4
|
export declare const rules: {
|
|
5
|
-
base: Record<
|
|
6
|
-
node: Record<"globals" | "base" | "promises" | "noUnsupportedFeatures", import("eslint").Linter.Config>;
|
|
7
|
-
react: Record<"react" | "reactJsxA11y" | "reactHooks", import("eslint").Linter.Config>;
|
|
8
|
-
next: Record<"base" | "coreWebVitals", import("eslint").Linter.Config>;
|
|
9
|
-
typescript: Record<"imports" | "base" | "typescriptEslint", import("eslint").Linter.Config>;
|
|
5
|
+
readonly base: Record<keyof typeof import("./configs/base/config").extendedBaseConfig, import("eslint").Linter.Config>;
|
|
6
|
+
readonly node: Record<"globals" | "base" | "promises" | "noUnsupportedFeatures", import("eslint").Linter.Config>;
|
|
7
|
+
readonly react: Record<"react" | "reactJsxA11y" | "reactHooks", import("eslint").Linter.Config>;
|
|
8
|
+
readonly next: Record<"base" | "coreWebVitals", import("eslint").Linter.Config>;
|
|
9
|
+
readonly typescript: Record<"imports" | "base" | "typescriptEslint", import("eslint").Linter.Config>;
|
|
10
10
|
};
|
|
11
11
|
export declare const configs: {
|
|
12
|
-
base: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
|
|
13
|
-
react: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
|
|
14
|
-
next: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
|
|
15
|
-
node: Record<"recommended", import("eslint").Linter.Config[]>;
|
|
12
|
+
readonly base: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
|
|
13
|
+
readonly react: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
|
|
14
|
+
readonly next: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
|
|
15
|
+
readonly node: Record<"recommended", import("eslint").Linter.Config[]>;
|
|
16
16
|
};
|
|
17
17
|
export declare const plugins: {
|
|
18
|
-
importX: import("eslint").Linter.Config;
|
|
19
|
-
node: import("eslint").Linter.Config;
|
|
20
|
-
react: import("eslint").Linter.Config;
|
|
21
|
-
reactA11y: import("eslint").Linter.Config;
|
|
22
|
-
reactHooks: import("eslint").Linter.Config;
|
|
23
|
-
next: import("eslint").Linter.Config;
|
|
24
|
-
typescriptEslint: import("eslint").Linter.Config;
|
|
18
|
+
readonly importX: import("eslint").Linter.Config;
|
|
19
|
+
readonly node: import("eslint").Linter.Config;
|
|
20
|
+
readonly react: import("eslint").Linter.Config;
|
|
21
|
+
readonly reactA11y: import("eslint").Linter.Config;
|
|
22
|
+
readonly reactHooks: import("eslint").Linter.Config;
|
|
23
|
+
readonly next: import("eslint").Linter.Config;
|
|
24
|
+
readonly typescriptEslint: import("eslint").Linter.Config;
|
|
25
25
|
};
|
|
@@ -3,10 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.extendedBaseConfig = void 0;
|
|
6
7
|
const best_practices_1 = __importDefault(require("../../rules/best-practices"));
|
|
7
8
|
const errors_1 = __importDefault(require("../../rules/errors"));
|
|
8
9
|
const es6_1 = __importDefault(require("../../rules/es6"));
|
|
9
10
|
const imports_1 = __importDefault(require("../../rules/imports"));
|
|
11
|
+
const importsStrict_1 = __importDefault(require("../../rules/importsStrict"));
|
|
12
|
+
const reactStrict_1 = __importDefault(require("../../rules/reactStrict"));
|
|
10
13
|
const strict_1 = __importDefault(require("../../rules/strict"));
|
|
11
14
|
const style_1 = __importDefault(require("../../rules/style"));
|
|
12
15
|
const stylistic_1 = __importDefault(require("../../rules/stylistic"));
|
|
@@ -21,4 +24,5 @@ const baseConfig = {
|
|
|
21
24
|
stylistic: stylistic_1.default,
|
|
22
25
|
variables: variables_1.default,
|
|
23
26
|
};
|
|
27
|
+
exports.extendedBaseConfig = Object.assign(Object.assign({}, baseConfig), { importsStrict: importsStrict_1.default, reactStrict: reactStrict_1.default });
|
|
24
28
|
exports.default = baseConfig;
|
|
@@ -7,7 +7,7 @@ const config_1 = __importDefault(require("../../configs/base/config"));
|
|
|
7
7
|
const baseRecommendedConfig = [
|
|
8
8
|
...Object.values(config_1.default),
|
|
9
9
|
{
|
|
10
|
-
name: 'airbnb/config/language-configurations',
|
|
10
|
+
name: 'airbnb/config/base-language-configurations',
|
|
11
11
|
languageOptions: {
|
|
12
12
|
parserOptions: {
|
|
13
13
|
ecmaVersion: 2018,
|
|
@@ -3,6 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const eslint_import_resolver_typescript_1 = require("eslint-import-resolver-typescript");
|
|
6
7
|
const config_1 = __importDefault(require("../../configs/typescript/config"));
|
|
7
|
-
const baseTypescriptConfig =
|
|
8
|
+
const baseTypescriptConfig = [
|
|
9
|
+
...Object.values(config_1.default),
|
|
10
|
+
{
|
|
11
|
+
name: 'airbnb/config/base-typescript-import-x',
|
|
12
|
+
settings: {
|
|
13
|
+
// Import Resolver for import-x package
|
|
14
|
+
'import-x/resolver-next': [
|
|
15
|
+
(0, eslint_import_resolver_typescript_1.createTypeScriptImportResolver)({
|
|
16
|
+
alwaysTryTypes: true,
|
|
17
|
+
}),
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
];
|
|
8
22
|
exports.default = baseTypescriptConfig;
|
package/dist/configs/index.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-require-imports, unicorn/prefer-module */
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const base_1 = __importDefault(require("../configs/base"));
|
|
7
|
-
const next_1 = __importDefault(require("../configs/next"));
|
|
8
|
-
const node_1 = __importDefault(require("../configs/node"));
|
|
9
|
-
const react_1 = __importDefault(require("../configs/react"));
|
|
10
4
|
/**
|
|
11
5
|
* as is given due to less size of index.d.ts
|
|
12
6
|
*/
|
|
13
7
|
const configs = {
|
|
14
|
-
base
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
get base() {
|
|
9
|
+
return require('../configs/base').default;
|
|
10
|
+
},
|
|
11
|
+
get react() {
|
|
12
|
+
return require('../configs/react').default;
|
|
13
|
+
},
|
|
14
|
+
get next() {
|
|
15
|
+
return require('../configs/next').default;
|
|
16
|
+
},
|
|
17
|
+
get node() {
|
|
18
|
+
return require('../configs/node').default;
|
|
19
|
+
},
|
|
18
20
|
};
|
|
19
21
|
exports.default = configs;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const utils_1 = require("../../utils");
|
|
4
4
|
const reactTypescriptConfig = [
|
|
5
5
|
{
|
|
6
|
-
name: 'airbnb/config/typescript-react',
|
|
6
|
+
name: 'airbnb/config/react-typescript-react',
|
|
7
7
|
rules: {
|
|
8
8
|
// only .jsx and .tsx files may have JSX
|
|
9
9
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
|
|
@@ -16,7 +16,7 @@ const reactTypescriptConfig = [
|
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
name: 'airbnb/config/typescript-import-x',
|
|
19
|
+
name: 'airbnb/config/react-typescript-import-x',
|
|
20
20
|
settings: {
|
|
21
21
|
'import-x/resolver': {
|
|
22
22
|
node: {
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-require-imports, unicorn/prefer-module */
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const importXPlugin_1 = __importDefault(require("../plugins/importXPlugin"));
|
|
7
|
-
const nextPlugin_1 = __importDefault(require("../plugins/nextPlugin"));
|
|
8
|
-
const nodePlugin_1 = __importDefault(require("../plugins/nodePlugin"));
|
|
9
|
-
const reactA11yPlugin_1 = __importDefault(require("../plugins/reactA11yPlugin"));
|
|
10
|
-
const reactHooksPlugin_1 = __importDefault(require("../plugins/reactHooksPlugin"));
|
|
11
|
-
const reactPlugin_1 = __importDefault(require("../plugins/reactPlugin"));
|
|
12
|
-
const typescriptEslintPlugin_1 = __importDefault(require("../plugins/typescriptEslintPlugin"));
|
|
13
4
|
/**
|
|
14
5
|
* as is given due to less size of index.d.ts
|
|
15
6
|
*/
|
|
16
7
|
const plugins = {
|
|
17
|
-
importX
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
get importX() {
|
|
9
|
+
return require('../plugins/importXPlugin').default;
|
|
10
|
+
},
|
|
11
|
+
get node() {
|
|
12
|
+
return require('../plugins/nodePlugin').default;
|
|
13
|
+
},
|
|
14
|
+
get react() {
|
|
15
|
+
return require('../plugins/reactPlugin').default;
|
|
16
|
+
},
|
|
17
|
+
get reactA11y() {
|
|
18
|
+
return require('../plugins/reactA11yPlugin').default;
|
|
19
|
+
},
|
|
20
|
+
get reactHooks() {
|
|
21
|
+
return require('../plugins/reactHooksPlugin').default;
|
|
22
|
+
},
|
|
23
|
+
get next() {
|
|
24
|
+
return require('../plugins/nextPlugin').default;
|
|
25
|
+
},
|
|
26
|
+
get typescriptEslint() {
|
|
27
|
+
return require('../plugins/typescriptEslintPlugin').default;
|
|
28
|
+
},
|
|
24
29
|
};
|
|
25
30
|
exports.default = plugins;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// @ts-expect-error eslint-plugin-import not working in import
|
|
4
3
|
// eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
|
|
5
4
|
const plugin = require('@next/eslint-plugin-next');
|
|
6
5
|
const nextPlugin = {
|
package/dist/rules/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-require-imports, unicorn/prefer-module */
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const config_1 = __importDefault(require("../configs/base/config"));
|
|
7
|
-
const config_2 = __importDefault(require("../configs/next/config"));
|
|
8
|
-
const config_3 = __importDefault(require("../configs/node/config"));
|
|
9
|
-
const config_4 = __importDefault(require("../configs/react/config"));
|
|
10
|
-
const config_5 = __importDefault(require("../configs/typescript/config"));
|
|
11
|
-
const importsStrict_1 = __importDefault(require("../rules/importsStrict"));
|
|
12
|
-
const reactStrict_1 = __importDefault(require("../rules/reactStrict"));
|
|
13
|
-
const baseRules = Object.assign(Object.assign({}, config_1.default), { importsStrict: importsStrict_1.default, reactStrict: reactStrict_1.default });
|
|
14
4
|
/**
|
|
15
5
|
* as is given due to less size of index.d.ts
|
|
16
6
|
*/
|
|
17
7
|
const rules = {
|
|
18
|
-
base
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
get base() {
|
|
9
|
+
return require('../configs/base/config').extendedBaseConfig;
|
|
10
|
+
},
|
|
11
|
+
get node() {
|
|
12
|
+
return require('../configs/node/config').default;
|
|
13
|
+
},
|
|
14
|
+
get react() {
|
|
15
|
+
return require('../configs/react/config').default;
|
|
16
|
+
},
|
|
17
|
+
get next() {
|
|
18
|
+
return require('../configs/next/config').default;
|
|
19
|
+
},
|
|
20
|
+
get typescript() {
|
|
21
|
+
return require('../configs/typescript/config').default;
|
|
22
|
+
},
|
|
23
23
|
};
|
|
24
24
|
exports.default = rules;
|
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const eslint_import_resolver_typescript_1 = require("eslint-import-resolver-typescript");
|
|
7
6
|
const getDevDepsList_1 = __importDefault(require("../../helpers/getDevDepsList"));
|
|
8
7
|
const utils_1 = require("../../utils");
|
|
9
8
|
/**
|
|
@@ -22,12 +21,6 @@ const typescriptImportsRules = {
|
|
|
22
21
|
extensions: [...utils_1.jsExtensionsResolver, ...utils_1.tsExtensionsResolver],
|
|
23
22
|
},
|
|
24
23
|
},
|
|
25
|
-
// Import Resolver for import-x package
|
|
26
|
-
'import-x/resolver-next': [
|
|
27
|
-
(0, eslint_import_resolver_typescript_1.createTypeScriptImportResolver)({
|
|
28
|
-
alwaysTryTypes: true,
|
|
29
|
-
}),
|
|
30
|
-
],
|
|
31
24
|
// Append 'ts' extensions to Airbnb 'import-x/extensions' setting
|
|
32
25
|
'import-x/extensions': [...utils_1.jsExtensionsWithReact, ...utils_1.tsExtensionsWithReactDTS],
|
|
33
26
|
// Resolve type definition packages
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-airbnb-extended",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Eslint Airbnb Config Extended",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -36,11 +36,12 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
39
|
+
"@types/node": "^22.14.1",
|
|
39
40
|
"ts-node": "^10.9.2",
|
|
40
41
|
"tsc-alias": "^1.8.15",
|
|
41
42
|
"tsconfig-paths": "^4.2.0",
|
|
42
43
|
"typescript": "^5.8.3",
|
|
43
|
-
"typescript-eslint": "^8.
|
|
44
|
+
"typescript-eslint": "^8.30.1"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"@next/eslint-plugin-next": "^15.2.4",
|