create-airbnb-x-config 2.0.0 → 2.1.1
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 +12 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/constants/index.js +7 -1
- package/dist/helpers/getArgs.d.ts +5 -1
- package/dist/helpers/getArgs.js +12 -0
- package/dist/helpers/getConfigUrl.d.ts +1 -1
- package/dist/helpers/getConfigUrl.js +9 -1
- package/dist/helpers/program.d.ts +1 -1
- package/dist/helpers/program.js +4 -1
- package/dist/index.js +54 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/templates/next/js/strict/import/eslint.config.mjs +52 -0
- package/templates/next/js/strict/import-react/eslint.config.mjs +54 -0
- package/templates/next/js/strict/react/eslint.config.mjs +52 -0
- package/templates/next/prettier/js/strict/import/eslint.config.mjs +74 -0
- package/templates/next/prettier/js/strict/import-react/eslint.config.mjs +76 -0
- package/templates/next/prettier/js/strict/react/eslint.config.mjs +74 -0
- package/templates/next/prettier/ts/strict/import/eslint.config.mjs +85 -0
- package/templates/next/prettier/ts/strict/import-react/eslint.config.mjs +87 -0
- package/templates/next/prettier/ts/strict/import-react-typescript/eslint.config.mjs +89 -0
- package/templates/next/prettier/ts/strict/import-typescript/eslint.config.mjs +87 -0
- package/templates/next/prettier/ts/strict/react/eslint.config.mjs +85 -0
- package/templates/next/prettier/ts/strict/react-typescript/eslint.config.mjs +87 -0
- package/templates/next/prettier/ts/strict/typescript/eslint.config.mjs +85 -0
- package/templates/next/ts/strict/import/eslint.config.mjs +63 -0
- package/templates/next/ts/strict/import-react/eslint.config.mjs +65 -0
- package/templates/next/ts/strict/import-react-typescript/eslint.config.mjs +67 -0
- package/templates/next/ts/strict/import-typescript/eslint.config.mjs +65 -0
- package/templates/next/ts/strict/react/eslint.config.mjs +63 -0
- package/templates/next/ts/strict/react-typescript/eslint.config.mjs +65 -0
- package/templates/next/ts/strict/typescript/eslint.config.mjs +63 -0
- package/templates/node/js/strict/import/eslint.config.mjs +46 -0
- package/templates/node/prettier/js/strict/import/eslint.config.mjs +68 -0
- package/templates/node/prettier/ts/strict/import/eslint.config.mjs +77 -0
- package/templates/node/prettier/ts/strict/import-typescript/eslint.config.mjs +79 -0
- package/templates/node/prettier/ts/strict/typescript/eslint.config.mjs +77 -0
- package/templates/node/ts/strict/import/eslint.config.mjs +55 -0
- package/templates/node/ts/strict/import-typescript/eslint.config.mjs +57 -0
- package/templates/node/ts/strict/typescript/eslint.config.mjs +55 -0
- package/templates/react/js/strict/import/eslint.config.mjs +50 -0
- package/templates/react/js/strict/import-react/eslint.config.mjs +52 -0
- package/templates/react/js/strict/react/eslint.config.mjs +50 -0
- package/templates/react/prettier/js/strict/import/eslint.config.mjs +72 -0
- package/templates/react/prettier/js/strict/import-react/eslint.config.mjs +74 -0
- package/templates/react/prettier/js/strict/react/eslint.config.mjs +72 -0
- package/templates/react/prettier/ts/strict/import/eslint.config.mjs +83 -0
- package/templates/react/prettier/ts/strict/import-react/eslint.config.mjs +85 -0
- package/templates/react/prettier/ts/strict/import-react-typescript/eslint.config.mjs +87 -0
- package/templates/react/prettier/ts/strict/import-typescript/eslint.config.mjs +85 -0
- package/templates/react/prettier/ts/strict/react/eslint.config.mjs +83 -0
- package/templates/react/prettier/ts/strict/react-typescript/eslint.config.mjs +85 -0
- package/templates/react/prettier/ts/strict/typescript/eslint.config.mjs +83 -0
- package/templates/react/ts/strict/import/eslint.config.mjs +61 -0
- package/templates/react/ts/strict/import-react/eslint.config.mjs +63 -0
- package/templates/react/ts/strict/import-react-typescript/eslint.config.mjs +65 -0
- package/templates/react/ts/strict/import-typescript/eslint.config.mjs +63 -0
- package/templates/react/ts/strict/react/eslint.config.mjs +61 -0
- package/templates/react/ts/strict/react-typescript/eslint.config.mjs +63 -0
- package/templates/react/ts/strict/typescript/eslint.config.mjs +61 -0
- /package/templates/legacy/base/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/base/prettier/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/base/prettier/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/base/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/react/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/react/prettier/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/react/prettier/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/react/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/react-hooks/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/react-hooks/prettier/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/react-hooks/prettier/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/legacy/react-hooks/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/next/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/next/prettier/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/next/prettier/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/next/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/node/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/node/prettier/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/node/prettier/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/node/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/react/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/react/prettier/js/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/react/prettier/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
- /package/templates/react/ts/{eslint.config.mjs → default/eslint.config.mjs} +0 -0
package/README.md
CHANGED
|
@@ -90,6 +90,18 @@ Options:
|
|
|
90
90
|
|
|
91
91
|
Include the Remix/React Router specific ESLint configuration.
|
|
92
92
|
|
|
93
|
+
--strict-import-config
|
|
94
|
+
|
|
95
|
+
Include the strict Import ESLint configuration.
|
|
96
|
+
|
|
97
|
+
--strict-react-config
|
|
98
|
+
|
|
99
|
+
Include the strict React ESLint configuration.
|
|
100
|
+
|
|
101
|
+
--strict-typescript-config
|
|
102
|
+
|
|
103
|
+
Include the strict TypeScript ESLint configuration.
|
|
104
|
+
|
|
93
105
|
--legacy-base-config
|
|
94
106
|
|
|
95
107
|
Include the legacy Base ESLint configuration.
|
|
@@ -4,6 +4,11 @@ export declare const languages: {
|
|
|
4
4
|
readonly NODE: "node";
|
|
5
5
|
readonly OTHER: "other";
|
|
6
6
|
};
|
|
7
|
+
export declare const strictConfigs: {
|
|
8
|
+
readonly IMPORT: "import";
|
|
9
|
+
readonly REACT: "react";
|
|
10
|
+
readonly TYPESCRIPT: "typescript";
|
|
11
|
+
};
|
|
7
12
|
export declare const configs: {
|
|
8
13
|
readonly BASE: "base";
|
|
9
14
|
readonly NODE: "node";
|
|
@@ -19,6 +24,7 @@ export declare const defaults: {
|
|
|
19
24
|
readonly configType: "extended";
|
|
20
25
|
readonly typescript: true;
|
|
21
26
|
readonly prettier: true;
|
|
27
|
+
readonly strictConfig: false;
|
|
22
28
|
readonly legacyReactHooks: true;
|
|
23
29
|
readonly createESLintFile: true;
|
|
24
30
|
readonly skipInstall: false;
|
package/dist/constants/index.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.legacyLanguages = exports.legacyConfigs = exports.packageManagers = exports.defaults = exports.configTypes = exports.configs = exports.languages = void 0;
|
|
3
|
+
exports.legacyLanguages = exports.legacyConfigs = exports.packageManagers = exports.defaults = exports.configTypes = exports.configs = exports.strictConfigs = exports.languages = void 0;
|
|
4
4
|
exports.languages = {
|
|
5
5
|
REACT: 'react',
|
|
6
6
|
NEXT: 'next',
|
|
7
7
|
NODE: 'node',
|
|
8
8
|
OTHER: 'other',
|
|
9
9
|
};
|
|
10
|
+
exports.strictConfigs = {
|
|
11
|
+
IMPORT: 'import',
|
|
12
|
+
REACT: 'react',
|
|
13
|
+
TYPESCRIPT: 'typescript',
|
|
14
|
+
};
|
|
10
15
|
exports.configs = {
|
|
11
16
|
BASE: 'base',
|
|
12
17
|
NODE: 'node',
|
|
@@ -22,6 +27,7 @@ exports.defaults = {
|
|
|
22
27
|
configType: exports.configTypes.EXTENDED,
|
|
23
28
|
typescript: true,
|
|
24
29
|
prettier: true,
|
|
30
|
+
strictConfig: false,
|
|
25
31
|
legacyReactHooks: true,
|
|
26
32
|
createESLintFile: true,
|
|
27
33
|
skipInstall: false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { configs, configTypes, languages, packageManagers } from '../constants';
|
|
1
|
+
import { configs, configTypes, languages, packageManagers, strictConfigs } from '../constants';
|
|
2
2
|
import type { ValueOf } from '../utils/types';
|
|
3
3
|
export declare const configHelp = "\n/**\n * Configuration Rules:\n * 1. Either Base or Node config should be included (choose one).\n * 2. React config can be used with either Next or Remix/React Router (choose one).\n * 3. Including all configs together is not recommended and may lead to conflicts.\n *\n * Summary:\n * - One from: Base | Node\n * - One from: React + (Next | Remix/React Router)\n * - Avoid selecting all configs at once.\n */";
|
|
4
4
|
type GetConfig = (opts: Partial<ProgramOpts>) => GetArgsOutput['config'];
|
|
@@ -18,6 +18,9 @@ export interface ProgramOpts {
|
|
|
18
18
|
reactConfig: true;
|
|
19
19
|
nextConfig: true;
|
|
20
20
|
reactRouterConfig: true;
|
|
21
|
+
strictImportConfig: true;
|
|
22
|
+
strictReactConfig: true;
|
|
23
|
+
strictTypescriptConfig: true;
|
|
21
24
|
legacyBaseConfig: true;
|
|
22
25
|
legacyReactConfig: true;
|
|
23
26
|
legacyReactHooksConfig: true;
|
|
@@ -37,6 +40,7 @@ export interface GetArgsOutput {
|
|
|
37
40
|
configType: ValueOf<typeof configTypes> | null;
|
|
38
41
|
typescript: boolean | null;
|
|
39
42
|
prettier: boolean | null;
|
|
43
|
+
strictConfig: ValueOf<typeof strictConfigs>[] | null;
|
|
40
44
|
language: ValueOf<typeof languages> | null;
|
|
41
45
|
config: ValueOf<typeof configs>[] | null;
|
|
42
46
|
legacyConfig: GetArgsLegacyConfig | null;
|
package/dist/helpers/getArgs.js
CHANGED
|
@@ -32,6 +32,17 @@ const getTypescript = (opts) => {
|
|
|
32
32
|
return false;
|
|
33
33
|
return null;
|
|
34
34
|
};
|
|
35
|
+
const getStrictConfig = (opts) => {
|
|
36
|
+
const { strictImportConfig, strictReactConfig, strictTypescriptConfig } = opts;
|
|
37
|
+
const strictConfig = [];
|
|
38
|
+
if (strictImportConfig)
|
|
39
|
+
strictConfig.push(constants_1.strictConfigs.IMPORT);
|
|
40
|
+
if (strictReactConfig)
|
|
41
|
+
strictConfig.push(constants_1.strictConfigs.REACT);
|
|
42
|
+
if (strictTypescriptConfig)
|
|
43
|
+
strictConfig.push(constants_1.strictConfigs.TYPESCRIPT);
|
|
44
|
+
return strictConfig.length > 0 ? strictConfig : null;
|
|
45
|
+
};
|
|
35
46
|
// Config Help
|
|
36
47
|
exports.configHelp = `
|
|
37
48
|
/**
|
|
@@ -122,6 +133,7 @@ const getArgs = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
122
133
|
configType: getConfigType(opts),
|
|
123
134
|
typescript: getTypescript(opts),
|
|
124
135
|
prettier: opts.prettier ? true : null,
|
|
136
|
+
strictConfig: getStrictConfig(opts),
|
|
125
137
|
language: getLanguage(opts),
|
|
126
138
|
config: (0, exports.getConfig)(opts),
|
|
127
139
|
legacyConfig: getLegacyConfig(opts),
|
|
@@ -5,6 +5,6 @@ interface GetConfigUrlOutput {
|
|
|
5
5
|
path: string;
|
|
6
6
|
url: string;
|
|
7
7
|
}
|
|
8
|
-
export type GetConfigUrl = (args: Pick<NonNullableArgsOutput, 'configType' | 'typescript' | 'prettier' | 'language' | 'legacyConfig'>) => GetConfigUrlOutput | null;
|
|
8
|
+
export type GetConfigUrl = (args: Pick<NonNullableArgsOutput, 'configType' | 'typescript' | 'prettier' | 'strictConfig' | 'language' | 'legacyConfig'>) => GetConfigUrlOutput | null;
|
|
9
9
|
declare const getConfigUrl: GetConfigUrl;
|
|
10
10
|
export default getConfigUrl;
|
|
@@ -6,10 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.baseGithubUrl = exports.eslintConfigName = void 0;
|
|
7
7
|
const picocolors_1 = __importDefault(require("picocolors"));
|
|
8
8
|
const constants_1 = require("../constants");
|
|
9
|
+
const constants_2 = require("../lib/templates/constants");
|
|
9
10
|
exports.eslintConfigName = 'eslint.config.mjs';
|
|
10
11
|
exports.baseGithubUrl = 'https://github.com/NishargShah/eslint-config-airbnb-extended/tree/master/packages/create-airbnb-x-config/templates';
|
|
11
12
|
const getConfigUrl = (args) => {
|
|
12
|
-
const { configType, typescript, prettier, language, legacyConfig } = args;
|
|
13
|
+
const { configType, typescript, prettier, strictConfig, language, legacyConfig } = args;
|
|
13
14
|
const isLegacy = configType === constants_1.configTypes.LEGACY;
|
|
14
15
|
if (!isLegacy && language === constants_1.languages.OTHER)
|
|
15
16
|
return null;
|
|
@@ -26,10 +27,17 @@ const getConfigUrl = (args) => {
|
|
|
26
27
|
return constants_1.legacyLanguages.REACT_HOOKS;
|
|
27
28
|
return null;
|
|
28
29
|
})();
|
|
30
|
+
const strictOrDefaultText = (() => {
|
|
31
|
+
if (!strictConfig || strictConfig.length === 0)
|
|
32
|
+
return [constants_2.subFolders.DEFAULT];
|
|
33
|
+
const strictFolder = strictConfig.sort((a, b) => a.localeCompare(b)).join('-');
|
|
34
|
+
return [constants_2.subFolders.STRICT, strictFolder];
|
|
35
|
+
})();
|
|
29
36
|
const path = [
|
|
30
37
|
...(isLegacy ? [constants_1.configTypes.LEGACY, legacyLanguage] : [language]),
|
|
31
38
|
prettierText,
|
|
32
39
|
tsOrJsText,
|
|
40
|
+
...strictOrDefaultText,
|
|
33
41
|
exports.eslintConfigName,
|
|
34
42
|
]
|
|
35
43
|
.filter(Boolean)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
/**
|
|
3
3
|
* Program Command
|
|
4
|
-
* @example: pnpm cli:start --extended --legacy --ts --js --prettier --react --remix --next --node --base-config --node-config --react-config --remix-config --
|
|
4
|
+
* @example: pnpm cli:start --extended --legacy --ts --js --prettier --react --remix --next --node --base-config --node-config --react-config --next-config --remix-config --strict-import-config --strict-react-config --strict-typescript-config --legacy-base-config --legacy-react-config --legacy-react-hooks-config --use-npm --use-yarn --use-pnpm --use-bun --create-eslint-file --skip-install
|
|
5
5
|
*/
|
|
6
6
|
declare const program: Command;
|
|
7
7
|
export default program;
|
package/dist/helpers/program.js
CHANGED
|
@@ -5,7 +5,7 @@ const getConfigUrl_1 = require("../helpers/getConfigUrl");
|
|
|
5
5
|
const package_json_1 = require("../package.json");
|
|
6
6
|
/**
|
|
7
7
|
* Program Command
|
|
8
|
-
* @example: pnpm cli:start --extended --legacy --ts --js --prettier --react --remix --next --node --base-config --node-config --react-config --remix-config --
|
|
8
|
+
* @example: pnpm cli:start --extended --legacy --ts --js --prettier --react --remix --next --node --base-config --node-config --react-config --next-config --remix-config --strict-import-config --strict-react-config --strict-typescript-config --legacy-base-config --legacy-react-config --legacy-react-hooks-config --use-npm --use-yarn --use-pnpm --use-bun --create-eslint-file --skip-install
|
|
9
9
|
*/
|
|
10
10
|
const program = new commander_1.Command()
|
|
11
11
|
.name(package_json_1.name)
|
|
@@ -25,6 +25,9 @@ const program = new commander_1.Command()
|
|
|
25
25
|
.option('--react-config', 'Include the React specific ESLint configuration.')
|
|
26
26
|
.option('--next-config', 'Include the Next.js specific ESLint configuration.')
|
|
27
27
|
.option('--remix-config, --react-router-config', 'Include the Remix/React Router specific ESLint configuration.')
|
|
28
|
+
.option('--strict-import-config', 'Include the strict Import ESLint configuration.')
|
|
29
|
+
.option('--strict-react-config', 'Include the strict React ESLint configuration.')
|
|
30
|
+
.option('--strict-typescript-config', 'Include the strict TypeScript ESLint configuration.')
|
|
28
31
|
.option('--legacy-base-config', 'Include the legacy Base ESLint configuration.')
|
|
29
32
|
.option('--legacy-react-config', 'Include the legacy React ESLint configuration.')
|
|
30
33
|
.option('--legacy-react-hooks-config', 'Include the legacy React Hooks ESLint configuration.')
|
package/dist/index.js
CHANGED
|
@@ -194,6 +194,60 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
194
194
|
args = Object.assign(Object.assign({}, args), { config: [] });
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
+
if (!args.strictConfig) {
|
|
198
|
+
const { hasStrictConfig } = yield (0, prompts_1.default)({
|
|
199
|
+
type: 'toggle',
|
|
200
|
+
name: 'hasStrictConfig',
|
|
201
|
+
message: `Do you want to add ${picocolors_1.default.cyan('strict')} configs?`,
|
|
202
|
+
initial: constants_1.defaults.strictConfig,
|
|
203
|
+
active: 'Yes',
|
|
204
|
+
inactive: 'No',
|
|
205
|
+
onState: utils_1.onPromptState,
|
|
206
|
+
}, {
|
|
207
|
+
onCancel: utils_1.onCancel,
|
|
208
|
+
});
|
|
209
|
+
if (hasStrictConfig) {
|
|
210
|
+
const { strictConfig } = yield (0, prompts_1.default)({
|
|
211
|
+
type: 'multiselect',
|
|
212
|
+
name: 'strictConfig',
|
|
213
|
+
message: 'Select Strict Configs:',
|
|
214
|
+
min: 1,
|
|
215
|
+
choices: [
|
|
216
|
+
{
|
|
217
|
+
title: 'Import',
|
|
218
|
+
description: picocolors_1.default.yellowBright('Strict Import config'),
|
|
219
|
+
value: constants_1.strictConfigs.IMPORT,
|
|
220
|
+
},
|
|
221
|
+
...(args.language &&
|
|
222
|
+
[constants_1.languages.REACT, constants_1.languages.NEXT].includes(args.language)
|
|
223
|
+
? [
|
|
224
|
+
{
|
|
225
|
+
title: 'React',
|
|
226
|
+
description: picocolors_1.default.cyanBright('Strict React config'),
|
|
227
|
+
value: constants_1.strictConfigs.REACT,
|
|
228
|
+
},
|
|
229
|
+
]
|
|
230
|
+
: []),
|
|
231
|
+
...(args.typescript
|
|
232
|
+
? [
|
|
233
|
+
{
|
|
234
|
+
title: 'TypeScript',
|
|
235
|
+
description: picocolors_1.default.blueBright('Strict TypeScript config'),
|
|
236
|
+
value: constants_1.strictConfigs.TYPESCRIPT,
|
|
237
|
+
},
|
|
238
|
+
]
|
|
239
|
+
: []),
|
|
240
|
+
],
|
|
241
|
+
onState: utils_1.onPromptState,
|
|
242
|
+
}, {
|
|
243
|
+
onCancel: utils_1.onCancel,
|
|
244
|
+
});
|
|
245
|
+
args = Object.assign(Object.assign({}, args), { strictConfig });
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
args = Object.assign(Object.assign({}, args), { strictConfig: [] });
|
|
249
|
+
}
|
|
250
|
+
}
|
|
197
251
|
}
|
|
198
252
|
if (args.configType === constants_1.configTypes.LEGACY) {
|
|
199
253
|
if (!args.legacyConfig || args.legacyConfig.base === null || args.legacyConfig.react === null) {
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS AUTO-GENERATED.
|
|
3
|
+
* PLEASE DO NOT EDIT IT MANUALLY.
|
|
4
|
+
* ===============================
|
|
5
|
+
* IF YOU'RE COPYING THIS INTO AN ESLINT CONFIG, REMOVE THIS COMMENT BLOCK.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
|
|
10
|
+
import { includeIgnoreFile } from '@eslint/compat';
|
|
11
|
+
import js from '@eslint/js';
|
|
12
|
+
import { configs, plugins, rules } from 'eslint-config-airbnb-extended';
|
|
13
|
+
|
|
14
|
+
const gitignorePath = path.resolve('.', '.gitignore');
|
|
15
|
+
|
|
16
|
+
const jsConfig = [
|
|
17
|
+
// ESLint Recommended Rules
|
|
18
|
+
{
|
|
19
|
+
name: 'js/config',
|
|
20
|
+
...js.configs.recommended,
|
|
21
|
+
},
|
|
22
|
+
// Stylistic Plugin
|
|
23
|
+
plugins.stylistic,
|
|
24
|
+
// Import X Plugin
|
|
25
|
+
plugins.importX,
|
|
26
|
+
// Airbnb Base Recommended Config
|
|
27
|
+
...configs.base.recommended,
|
|
28
|
+
// Strict Import Config
|
|
29
|
+
rules.base.importsStrict,
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const nextConfig = [
|
|
33
|
+
// React Plugin
|
|
34
|
+
plugins.react,
|
|
35
|
+
// React Hooks Plugin
|
|
36
|
+
plugins.reactHooks,
|
|
37
|
+
// React JSX A11y Plugin
|
|
38
|
+
plugins.reactA11y,
|
|
39
|
+
// Next Plugin
|
|
40
|
+
plugins.next,
|
|
41
|
+
// Airbnb Next Recommended Config
|
|
42
|
+
...configs.next.recommended,
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
export default [
|
|
46
|
+
// Ignore .gitignore files/folder in eslint
|
|
47
|
+
includeIgnoreFile(gitignorePath),
|
|
48
|
+
// Javascript Config
|
|
49
|
+
...jsConfig,
|
|
50
|
+
// Next Config
|
|
51
|
+
...nextConfig,
|
|
52
|
+
];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS AUTO-GENERATED.
|
|
3
|
+
* PLEASE DO NOT EDIT IT MANUALLY.
|
|
4
|
+
* ===============================
|
|
5
|
+
* IF YOU'RE COPYING THIS INTO AN ESLINT CONFIG, REMOVE THIS COMMENT BLOCK.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
|
|
10
|
+
import { includeIgnoreFile } from '@eslint/compat';
|
|
11
|
+
import js from '@eslint/js';
|
|
12
|
+
import { configs, plugins, rules } from 'eslint-config-airbnb-extended';
|
|
13
|
+
|
|
14
|
+
const gitignorePath = path.resolve('.', '.gitignore');
|
|
15
|
+
|
|
16
|
+
const jsConfig = [
|
|
17
|
+
// ESLint Recommended Rules
|
|
18
|
+
{
|
|
19
|
+
name: 'js/config',
|
|
20
|
+
...js.configs.recommended,
|
|
21
|
+
},
|
|
22
|
+
// Stylistic Plugin
|
|
23
|
+
plugins.stylistic,
|
|
24
|
+
// Import X Plugin
|
|
25
|
+
plugins.importX,
|
|
26
|
+
// Airbnb Base Recommended Config
|
|
27
|
+
...configs.base.recommended,
|
|
28
|
+
// Strict Import Config
|
|
29
|
+
rules.base.importsStrict,
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const nextConfig = [
|
|
33
|
+
// React Plugin
|
|
34
|
+
plugins.react,
|
|
35
|
+
// React Hooks Plugin
|
|
36
|
+
plugins.reactHooks,
|
|
37
|
+
// React JSX A11y Plugin
|
|
38
|
+
plugins.reactA11y,
|
|
39
|
+
// Next Plugin
|
|
40
|
+
plugins.next,
|
|
41
|
+
// Airbnb Next Recommended Config
|
|
42
|
+
...configs.next.recommended,
|
|
43
|
+
// Strict React Config
|
|
44
|
+
rules.react.strict,
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
export default [
|
|
48
|
+
// Ignore .gitignore files/folder in eslint
|
|
49
|
+
includeIgnoreFile(gitignorePath),
|
|
50
|
+
// Javascript Config
|
|
51
|
+
...jsConfig,
|
|
52
|
+
// Next Config
|
|
53
|
+
...nextConfig,
|
|
54
|
+
];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS AUTO-GENERATED.
|
|
3
|
+
* PLEASE DO NOT EDIT IT MANUALLY.
|
|
4
|
+
* ===============================
|
|
5
|
+
* IF YOU'RE COPYING THIS INTO AN ESLINT CONFIG, REMOVE THIS COMMENT BLOCK.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
|
|
10
|
+
import { includeIgnoreFile } from '@eslint/compat';
|
|
11
|
+
import js from '@eslint/js';
|
|
12
|
+
import { configs, plugins, rules } from 'eslint-config-airbnb-extended';
|
|
13
|
+
|
|
14
|
+
const gitignorePath = path.resolve('.', '.gitignore');
|
|
15
|
+
|
|
16
|
+
const jsConfig = [
|
|
17
|
+
// ESLint Recommended Rules
|
|
18
|
+
{
|
|
19
|
+
name: 'js/config',
|
|
20
|
+
...js.configs.recommended,
|
|
21
|
+
},
|
|
22
|
+
// Stylistic Plugin
|
|
23
|
+
plugins.stylistic,
|
|
24
|
+
// Import X Plugin
|
|
25
|
+
plugins.importX,
|
|
26
|
+
// Airbnb Base Recommended Config
|
|
27
|
+
...configs.base.recommended,
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
const nextConfig = [
|
|
31
|
+
// React Plugin
|
|
32
|
+
plugins.react,
|
|
33
|
+
// React Hooks Plugin
|
|
34
|
+
plugins.reactHooks,
|
|
35
|
+
// React JSX A11y Plugin
|
|
36
|
+
plugins.reactA11y,
|
|
37
|
+
// Next Plugin
|
|
38
|
+
plugins.next,
|
|
39
|
+
// Airbnb Next Recommended Config
|
|
40
|
+
...configs.next.recommended,
|
|
41
|
+
// Strict React Config
|
|
42
|
+
rules.react.strict,
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
export default [
|
|
46
|
+
// Ignore .gitignore files/folder in eslint
|
|
47
|
+
includeIgnoreFile(gitignorePath),
|
|
48
|
+
// Javascript Config
|
|
49
|
+
...jsConfig,
|
|
50
|
+
// Next Config
|
|
51
|
+
...nextConfig,
|
|
52
|
+
];
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS AUTO-GENERATED.
|
|
3
|
+
* PLEASE DO NOT EDIT IT MANUALLY.
|
|
4
|
+
* ===============================
|
|
5
|
+
* IF YOU'RE COPYING THIS INTO AN ESLINT CONFIG, REMOVE THIS COMMENT BLOCK.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
|
|
10
|
+
import { includeIgnoreFile } from '@eslint/compat';
|
|
11
|
+
import js from '@eslint/js';
|
|
12
|
+
import { configs, plugins, rules } from 'eslint-config-airbnb-extended';
|
|
13
|
+
import { rules as prettierConfigRules } from 'eslint-config-prettier';
|
|
14
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
15
|
+
|
|
16
|
+
const gitignorePath = path.resolve('.', '.gitignore');
|
|
17
|
+
|
|
18
|
+
const jsConfig = [
|
|
19
|
+
// ESLint Recommended Rules
|
|
20
|
+
{
|
|
21
|
+
name: 'js/config',
|
|
22
|
+
...js.configs.recommended,
|
|
23
|
+
},
|
|
24
|
+
// Stylistic Plugin
|
|
25
|
+
plugins.stylistic,
|
|
26
|
+
// Import X Plugin
|
|
27
|
+
plugins.importX,
|
|
28
|
+
// Airbnb Base Recommended Config
|
|
29
|
+
...configs.base.recommended,
|
|
30
|
+
// Strict Import Config
|
|
31
|
+
rules.base.importsStrict,
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
const nextConfig = [
|
|
35
|
+
// React Plugin
|
|
36
|
+
plugins.react,
|
|
37
|
+
// React Hooks Plugin
|
|
38
|
+
plugins.reactHooks,
|
|
39
|
+
// React JSX A11y Plugin
|
|
40
|
+
plugins.reactA11y,
|
|
41
|
+
// Next Plugin
|
|
42
|
+
plugins.next,
|
|
43
|
+
// Airbnb Next Recommended Config
|
|
44
|
+
...configs.next.recommended,
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
const prettierConfig = [
|
|
48
|
+
// Prettier Plugin
|
|
49
|
+
{
|
|
50
|
+
name: 'prettier/plugin/config',
|
|
51
|
+
plugins: {
|
|
52
|
+
prettier: prettierPlugin,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
// Prettier Config
|
|
56
|
+
{
|
|
57
|
+
name: 'prettier/config',
|
|
58
|
+
rules: {
|
|
59
|
+
...prettierConfigRules,
|
|
60
|
+
'prettier/prettier': 'error',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
export default [
|
|
66
|
+
// Ignore .gitignore files/folder in eslint
|
|
67
|
+
includeIgnoreFile(gitignorePath),
|
|
68
|
+
// Javascript Config
|
|
69
|
+
...jsConfig,
|
|
70
|
+
// Next Config
|
|
71
|
+
...nextConfig,
|
|
72
|
+
// Prettier Config
|
|
73
|
+
...prettierConfig,
|
|
74
|
+
];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS AUTO-GENERATED.
|
|
3
|
+
* PLEASE DO NOT EDIT IT MANUALLY.
|
|
4
|
+
* ===============================
|
|
5
|
+
* IF YOU'RE COPYING THIS INTO AN ESLINT CONFIG, REMOVE THIS COMMENT BLOCK.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
|
|
10
|
+
import { includeIgnoreFile } from '@eslint/compat';
|
|
11
|
+
import js from '@eslint/js';
|
|
12
|
+
import { configs, plugins, rules } from 'eslint-config-airbnb-extended';
|
|
13
|
+
import { rules as prettierConfigRules } from 'eslint-config-prettier';
|
|
14
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
15
|
+
|
|
16
|
+
const gitignorePath = path.resolve('.', '.gitignore');
|
|
17
|
+
|
|
18
|
+
const jsConfig = [
|
|
19
|
+
// ESLint Recommended Rules
|
|
20
|
+
{
|
|
21
|
+
name: 'js/config',
|
|
22
|
+
...js.configs.recommended,
|
|
23
|
+
},
|
|
24
|
+
// Stylistic Plugin
|
|
25
|
+
plugins.stylistic,
|
|
26
|
+
// Import X Plugin
|
|
27
|
+
plugins.importX,
|
|
28
|
+
// Airbnb Base Recommended Config
|
|
29
|
+
...configs.base.recommended,
|
|
30
|
+
// Strict Import Config
|
|
31
|
+
rules.base.importsStrict,
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
const nextConfig = [
|
|
35
|
+
// React Plugin
|
|
36
|
+
plugins.react,
|
|
37
|
+
// React Hooks Plugin
|
|
38
|
+
plugins.reactHooks,
|
|
39
|
+
// React JSX A11y Plugin
|
|
40
|
+
plugins.reactA11y,
|
|
41
|
+
// Next Plugin
|
|
42
|
+
plugins.next,
|
|
43
|
+
// Airbnb Next Recommended Config
|
|
44
|
+
...configs.next.recommended,
|
|
45
|
+
// Strict React Config
|
|
46
|
+
rules.react.strict,
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const prettierConfig = [
|
|
50
|
+
// Prettier Plugin
|
|
51
|
+
{
|
|
52
|
+
name: 'prettier/plugin/config',
|
|
53
|
+
plugins: {
|
|
54
|
+
prettier: prettierPlugin,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
// Prettier Config
|
|
58
|
+
{
|
|
59
|
+
name: 'prettier/config',
|
|
60
|
+
rules: {
|
|
61
|
+
...prettierConfigRules,
|
|
62
|
+
'prettier/prettier': 'error',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
export default [
|
|
68
|
+
// Ignore .gitignore files/folder in eslint
|
|
69
|
+
includeIgnoreFile(gitignorePath),
|
|
70
|
+
// Javascript Config
|
|
71
|
+
...jsConfig,
|
|
72
|
+
// Next Config
|
|
73
|
+
...nextConfig,
|
|
74
|
+
// Prettier Config
|
|
75
|
+
...prettierConfig,
|
|
76
|
+
];
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS AUTO-GENERATED.
|
|
3
|
+
* PLEASE DO NOT EDIT IT MANUALLY.
|
|
4
|
+
* ===============================
|
|
5
|
+
* IF YOU'RE COPYING THIS INTO AN ESLINT CONFIG, REMOVE THIS COMMENT BLOCK.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
|
|
10
|
+
import { includeIgnoreFile } from '@eslint/compat';
|
|
11
|
+
import js from '@eslint/js';
|
|
12
|
+
import { configs, plugins, rules } from 'eslint-config-airbnb-extended';
|
|
13
|
+
import { rules as prettierConfigRules } from 'eslint-config-prettier';
|
|
14
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
15
|
+
|
|
16
|
+
const gitignorePath = path.resolve('.', '.gitignore');
|
|
17
|
+
|
|
18
|
+
const jsConfig = [
|
|
19
|
+
// ESLint Recommended Rules
|
|
20
|
+
{
|
|
21
|
+
name: 'js/config',
|
|
22
|
+
...js.configs.recommended,
|
|
23
|
+
},
|
|
24
|
+
// Stylistic Plugin
|
|
25
|
+
plugins.stylistic,
|
|
26
|
+
// Import X Plugin
|
|
27
|
+
plugins.importX,
|
|
28
|
+
// Airbnb Base Recommended Config
|
|
29
|
+
...configs.base.recommended,
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const nextConfig = [
|
|
33
|
+
// React Plugin
|
|
34
|
+
plugins.react,
|
|
35
|
+
// React Hooks Plugin
|
|
36
|
+
plugins.reactHooks,
|
|
37
|
+
// React JSX A11y Plugin
|
|
38
|
+
plugins.reactA11y,
|
|
39
|
+
// Next Plugin
|
|
40
|
+
plugins.next,
|
|
41
|
+
// Airbnb Next Recommended Config
|
|
42
|
+
...configs.next.recommended,
|
|
43
|
+
// Strict React Config
|
|
44
|
+
rules.react.strict,
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
const prettierConfig = [
|
|
48
|
+
// Prettier Plugin
|
|
49
|
+
{
|
|
50
|
+
name: 'prettier/plugin/config',
|
|
51
|
+
plugins: {
|
|
52
|
+
prettier: prettierPlugin,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
// Prettier Config
|
|
56
|
+
{
|
|
57
|
+
name: 'prettier/config',
|
|
58
|
+
rules: {
|
|
59
|
+
...prettierConfigRules,
|
|
60
|
+
'prettier/prettier': 'error',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
export default [
|
|
66
|
+
// Ignore .gitignore files/folder in eslint
|
|
67
|
+
includeIgnoreFile(gitignorePath),
|
|
68
|
+
// Javascript Config
|
|
69
|
+
...jsConfig,
|
|
70
|
+
// Next Config
|
|
71
|
+
...nextConfig,
|
|
72
|
+
// Prettier Config
|
|
73
|
+
...prettierConfig,
|
|
74
|
+
];
|