eslint-config-everything 0.0.0 → 0.0.8
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.
Potentially problematic release.
This version of eslint-config-everything might be problematic. Click here for more details.
- package/LICENSE +21 -201
- package/README.md +3 -185
- package/dist/chunk-7D4SUZUM.js +38 -0
- package/dist/chunk-7D4SUZUM.js.map +1 -0
- package/dist/chunk-BETPHOUV.js +3039 -0
- package/dist/chunk-BETPHOUV.js.map +1 -0
- package/dist/chunk-GVUZG6ZQ.js +12 -0
- package/dist/chunk-GVUZG6ZQ.js.map +1 -0
- package/dist/chunk-R4EOV26M.js +9 -0
- package/dist/chunk-R4EOV26M.js.map +1 -0
- package/dist/chunk-S5OOXTIG.js +347 -0
- package/dist/chunk-S5OOXTIG.js.map +1 -0
- package/dist/chunk-V6W3BDFE.js +450 -0
- package/dist/chunk-V6W3BDFE.js.map +1 -0
- package/dist/configs/next.d.ts +10 -0
- package/dist/configs/next.js +7693 -0
- package/dist/configs/next.js.map +1 -0
- package/dist/configs/react-internal.d.ts +9 -0
- package/dist/configs/react-internal.js +49 -0
- package/dist/configs/react-internal.js.map +1 -0
- package/dist/configs/turbo.d.ts +10 -0
- package/dist/configs/turbo.js +39 -0
- package/dist/configs/turbo.js.map +1 -0
- package/dist/configs/typescript.d.ts +10 -0
- package/dist/configs/typescript.js +18 -0
- package/dist/configs/typescript.js.map +1 -0
- package/dist/objects/ignores.d.ts +5 -0
- package/dist/objects/ignores.js +8 -0
- package/dist/objects/ignores.js.map +1 -0
- package/dist/objects/onlyWarn.d.ts +7 -0
- package/dist/objects/onlyWarn.js +8 -0
- package/dist/objects/onlyWarn.js.map +1 -0
- package/package.json +51 -32
- package/.editorconfig +0 -10
- package/.gitattributes +0 -4
- package/.prettierrc +0 -6
- package/.yarn/sdks/integrations.yml +0 -5
- package/.yarn/sdks/prettier/bin/prettier.cjs +0 -32
- package/.yarn/sdks/prettier/index.cjs +0 -32
- package/.yarn/sdks/prettier/package.json +0 -7
- package/.yarnrc.yml +0 -1
- package/eslint.config.js +0 -198
@@ -0,0 +1,49 @@
|
|
1
|
+
import {
|
2
|
+
javascript,
|
3
|
+
require_globals
|
4
|
+
} from "../chunk-BETPHOUV.js";
|
5
|
+
import {
|
6
|
+
require_src
|
7
|
+
} from "../chunk-S5OOXTIG.js";
|
8
|
+
import "../chunk-V6W3BDFE.js";
|
9
|
+
import "../chunk-R4EOV26M.js";
|
10
|
+
import "../chunk-GVUZG6ZQ.js";
|
11
|
+
import {
|
12
|
+
__toESM
|
13
|
+
} from "../chunk-7D4SUZUM.js";
|
14
|
+
|
15
|
+
// src/configs/react-internal.js
|
16
|
+
var import_js = __toESM(require_src(), 1);
|
17
|
+
var import_globals = __toESM(require_globals(), 1);
|
18
|
+
import pluginReact from "eslint-plugin-react";
|
19
|
+
import pluginReactHooks from "eslint-plugin-react-hooks";
|
20
|
+
import tseslint from "typescript-eslint";
|
21
|
+
var config = [
|
22
|
+
...javascript,
|
23
|
+
...tseslint.configs.recommended,
|
24
|
+
pluginReact.configs.flat.recommended,
|
25
|
+
{
|
26
|
+
languageOptions: {
|
27
|
+
...pluginReact.configs.flat.recommended.languageOptions,
|
28
|
+
globals: {
|
29
|
+
...import_globals.default.serviceworker,
|
30
|
+
...import_globals.default.browser
|
31
|
+
}
|
32
|
+
}
|
33
|
+
},
|
34
|
+
{
|
35
|
+
plugins: {
|
36
|
+
"react-hooks": pluginReactHooks
|
37
|
+
},
|
38
|
+
rules: {
|
39
|
+
...pluginReactHooks.configs.recommended.rules,
|
40
|
+
// React scope no longer necessary with new JSX transform.
|
41
|
+
"react/react-in-jsx-scope": "off"
|
42
|
+
},
|
43
|
+
settings: { react: { version: "detect" } }
|
44
|
+
}
|
45
|
+
];
|
46
|
+
export {
|
47
|
+
config
|
48
|
+
};
|
49
|
+
//# sourceMappingURL=react-internal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/configs/react-internal.js"],"sourcesContent":["import js from \"@eslint/js\";\nimport pluginReact from \"eslint-plugin-react\";\nimport pluginReactHooks from \"eslint-plugin-react-hooks\";\nimport globals from \"globals\";\nimport tseslint from \"typescript-eslint\";\n\nimport { javascript } from \"./javascript.js\";\n\n/**\n * A custom ESLint configuration for libraries that use React.\n *\n * @type {import(\"eslint\").Linter.Config[]} */\nexport const config = [\n ...javascript,\n ...tseslint.configs.recommended,\n pluginReact.configs.flat.recommended,\n {\n languageOptions: {\n ...pluginReact.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n },\n {\n plugins: {\n \"react-hooks\": pluginReactHooks,\n },\n rules: {\n ...pluginReactHooks.configs.recommended.rules,\n // React scope no longer necessary with new JSX transform.\n \"react/react-in-jsx-scope\": \"off\",\n },\n settings: { react: { version: \"detect\" } },\n },\n];\n"],"mappings":";;;;;;;;;;;;;;;AAAA,gBAAe;AAGf,qBAAoB;AAFpB,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAE7B,OAAO,cAAc;AAQd,IAAM,SAAS;AAAA,EACpB,GAAG;AAAA,EACH,GAAG,SAAS,QAAQ;AAAA,EACpB,YAAY,QAAQ,KAAK;AAAA,EACzB;AAAA,IACE,iBAAiB;AAAA,MACf,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,MACxC,SAAS;AAAA,QACP,GAAG,eAAAA,QAAQ;AAAA,QACX,GAAG,eAAAA,QAAQ;AAAA,MACb;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,SAAS;AAAA,MACP,eAAe;AAAA,IACjB;AAAA,IACA,OAAO;AAAA,MACL,GAAG,iBAAiB,QAAQ,YAAY;AAAA;AAAA,MAExC,4BAA4B;AAAA,IAC9B;AAAA,IACA,UAAU,EAAE,OAAO,EAAE,SAAS,SAAS,EAAE;AAAA,EAC3C;AACF;","names":["globals"]}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import {
|
2
|
+
require_src
|
3
|
+
} from "../chunk-S5OOXTIG.js";
|
4
|
+
import {
|
5
|
+
__toESM
|
6
|
+
} from "../chunk-7D4SUZUM.js";
|
7
|
+
|
8
|
+
// src/configs/turbo.js
|
9
|
+
var import_js = __toESM(require_src(), 1);
|
10
|
+
import onlyWarn from "eslint-plugin-only-warn";
|
11
|
+
import perfectionist from "eslint-plugin-perfectionist";
|
12
|
+
import turboPlugin from "eslint-plugin-turbo";
|
13
|
+
import tseslint from "typescript-eslint";
|
14
|
+
var config = [
|
15
|
+
import_js.default.configs.recommended,
|
16
|
+
...tseslint.configs.strict,
|
17
|
+
...tseslint.configs.stylistic,
|
18
|
+
perfectionist.configs["recommended-natural"],
|
19
|
+
{
|
20
|
+
plugins: {
|
21
|
+
turbo: turboPlugin
|
22
|
+
},
|
23
|
+
rules: {
|
24
|
+
"turbo/no-undeclared-env-vars": "warn"
|
25
|
+
}
|
26
|
+
},
|
27
|
+
{
|
28
|
+
plugins: {
|
29
|
+
onlyWarn
|
30
|
+
}
|
31
|
+
},
|
32
|
+
{
|
33
|
+
ignores: ["dist/**"]
|
34
|
+
}
|
35
|
+
];
|
36
|
+
export {
|
37
|
+
config
|
38
|
+
};
|
39
|
+
//# sourceMappingURL=turbo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/configs/turbo.js"],"sourcesContent":["import js from \"@eslint/js\";\nimport onlyWarn from \"eslint-plugin-only-warn\";\nimport perfectionist from \"eslint-plugin-perfectionist\";\nimport turboPlugin from \"eslint-plugin-turbo\";\nimport tseslint from \"typescript-eslint\";\n\n/**\n * A shared ESLint configuration for the repository.\n *\n * @type {import(\"eslint\").Linter.Config[]}\n * */\nexport const config = [\n js.configs.recommended,\n ...tseslint.configs.strict,\n ...tseslint.configs.stylistic,\n perfectionist.configs[\"recommended-natural\"],\n {\n plugins: {\n turbo: turboPlugin,\n },\n rules: {\n \"turbo/no-undeclared-env-vars\": \"warn\",\n },\n },\n {\n plugins: {\n onlyWarn,\n },\n },\n {\n ignores: [\"dist/**\"],\n },\n];\n"],"mappings":";;;;;;;;AAAA,gBAAe;AACf,OAAO,cAAc;AACrB,OAAO,mBAAmB;AAC1B,OAAO,iBAAiB;AACxB,OAAO,cAAc;AAOd,IAAM,SAAS;AAAA,EACpB,UAAAA,QAAG,QAAQ;AAAA,EACX,GAAG,SAAS,QAAQ;AAAA,EACpB,GAAG,SAAS,QAAQ;AAAA,EACpB,cAAc,QAAQ,qBAAqB;AAAA,EAC3C;AAAA,IACE,SAAS;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA,OAAO;AAAA,MACL,gCAAgC;AAAA,IAClC;AAAA,EACF;AAAA,EACA;AAAA,IACE,SAAS;AAAA,MACP;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,SAAS,CAAC,SAAS;AAAA,EACrB;AACF;","names":["js"]}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import {
|
2
|
+
base,
|
3
|
+
perfectionist
|
4
|
+
} from "../chunk-V6W3BDFE.js";
|
5
|
+
import {
|
6
|
+
ignores
|
7
|
+
} from "../chunk-R4EOV26M.js";
|
8
|
+
import {
|
9
|
+
onlyWarn
|
10
|
+
} from "../chunk-GVUZG6ZQ.js";
|
11
|
+
import "../chunk-7D4SUZUM.js";
|
12
|
+
|
13
|
+
// src/configs/typescript.js
|
14
|
+
var typescript = [base, ...perfectionist, onlyWarn, ignores];
|
15
|
+
export {
|
16
|
+
typescript
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=typescript.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/configs/typescript.js"],"sourcesContent":["import { base } from \"../objects/base.js\";\nimport { ignores } from \"../objects/ignores.js\";\nimport { onlyWarn } from \"../objects/onlyWarn.js\";\nimport { perfectionist } from \"../objects/perfectionist.js\";\n\n/**\n * A shared ESLint configuration for the repository.\n *\n * @type {import(\"eslint\").Linter.Config[]}\n * */\nexport const typescript = [base, ...perfectionist, onlyWarn, ignores];\n"],"mappings":";;;;;;;;;;;;;AAUO,IAAM,aAAa,CAAC,MAAM,GAAG,eAAe,UAAU,OAAO;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
@@ -1,33 +1,52 @@
|
|
1
|
-
{
|
2
|
-
"name": "eslint-config-everything",
|
3
|
-
"version": "0.0.
|
4
|
-
"
|
5
|
-
"
|
6
|
-
|
7
|
-
|
8
|
-
"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
"
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
"
|
23
|
-
"eslint": "^
|
24
|
-
"eslint-
|
25
|
-
"eslint-
|
26
|
-
"eslint-plugin-
|
27
|
-
"eslint-plugin-
|
28
|
-
"
|
29
|
-
"prettier": "^
|
30
|
-
"
|
31
|
-
"
|
32
|
-
|
1
|
+
{
|
2
|
+
"name": "eslint-config-everything",
|
3
|
+
"version": "0.0.8",
|
4
|
+
"description": "A fully featured, opinionated ESLint configuration.",
|
5
|
+
"keywords": [
|
6
|
+
"eslint",
|
7
|
+
"eslint-config",
|
8
|
+
"eslint-config-vigilance"
|
9
|
+
],
|
10
|
+
"license": "MIT",
|
11
|
+
"author": "Nathan Drake <nathan@drakewest.dev>",
|
12
|
+
"type": "module",
|
13
|
+
"exports": {
|
14
|
+
".": "./dist/index.js"
|
15
|
+
},
|
16
|
+
"main": "./dist/index.js",
|
17
|
+
"types": "./dist/index.d.ts",
|
18
|
+
"files": [
|
19
|
+
"dist"
|
20
|
+
],
|
21
|
+
"dependencies": {
|
22
|
+
"eslint": "^9.17.0",
|
23
|
+
"eslint-plugin-only-warn": "^1.1.0",
|
24
|
+
"eslint-plugin-perfectionist": "^4.3.0",
|
25
|
+
"eslint-plugin-react": "^7.37.2",
|
26
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
27
|
+
"eslint-plugin-turbo": "^2.3.3",
|
28
|
+
"prettier": "^3.4.2",
|
29
|
+
"prettier-plugin-packagejson": "^2.5.6",
|
30
|
+
"prettier-plugin-sort-json": "^4.0.0",
|
31
|
+
"prettier-plugin-tailwindcss": "^0.6.9",
|
32
|
+
"typescript-eslint": "^8.18.1"
|
33
|
+
},
|
34
|
+
"devDependencies": {
|
35
|
+
"@arethetypeswrong/cli": "^0.17.1",
|
36
|
+
"@changesets/cli": "^2.27.11",
|
37
|
+
"@next/eslint-plugin-next": "^15.1.1",
|
38
|
+
"globals": "^15.14.0",
|
39
|
+
"jiti": "^2.4.2",
|
40
|
+
"tsup": "^8.3.5"
|
41
|
+
},
|
42
|
+
"scripts": {
|
43
|
+
"build": "tsup",
|
44
|
+
"bump": "changeset version",
|
45
|
+
"changeset": "changeset",
|
46
|
+
"check-exports": "attw --pack .",
|
47
|
+
"format": "prettier --write .",
|
48
|
+
"format:check": "prettier --check .",
|
49
|
+
"local-release": "changeset version && changeset publish",
|
50
|
+
"release": "changeset publish"
|
51
|
+
}
|
33
52
|
}
|
package/.editorconfig
DELETED
package/.gitattributes
DELETED
package/.prettierrc
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
|
3
|
-
const {existsSync} = require(`fs`);
|
4
|
-
const {createRequire, register} = require(`module`);
|
5
|
-
const {resolve} = require(`path`);
|
6
|
-
const {pathToFileURL} = require(`url`);
|
7
|
-
|
8
|
-
const relPnpApiPath = "../../../../.pnp.cjs";
|
9
|
-
|
10
|
-
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
11
|
-
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
|
12
|
-
const absRequire = createRequire(absPnpApiPath);
|
13
|
-
|
14
|
-
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
15
|
-
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
16
|
-
|
17
|
-
if (existsSync(absPnpApiPath)) {
|
18
|
-
if (!process.versions.pnp) {
|
19
|
-
// Setup the environment to be able to require prettier/bin/prettier.cjs
|
20
|
-
require(absPnpApiPath).setup();
|
21
|
-
if (isPnpLoaderEnabled && register) {
|
22
|
-
register(pathToFileURL(absPnpLoaderPath));
|
23
|
-
}
|
24
|
-
}
|
25
|
-
}
|
26
|
-
|
27
|
-
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
|
28
|
-
? exports => absRequire(absUserWrapperPath)(exports)
|
29
|
-
: exports => exports;
|
30
|
-
|
31
|
-
// Defer to the real prettier/bin/prettier.cjs your application uses
|
32
|
-
module.exports = wrapWithUserWrapper(absRequire(`prettier/bin/prettier.cjs`));
|
@@ -1,32 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
|
3
|
-
const {existsSync} = require(`fs`);
|
4
|
-
const {createRequire, register} = require(`module`);
|
5
|
-
const {resolve} = require(`path`);
|
6
|
-
const {pathToFileURL} = require(`url`);
|
7
|
-
|
8
|
-
const relPnpApiPath = "../../../.pnp.cjs";
|
9
|
-
|
10
|
-
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
11
|
-
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
|
12
|
-
const absRequire = createRequire(absPnpApiPath);
|
13
|
-
|
14
|
-
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
15
|
-
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
16
|
-
|
17
|
-
if (existsSync(absPnpApiPath)) {
|
18
|
-
if (!process.versions.pnp) {
|
19
|
-
// Setup the environment to be able to require prettier
|
20
|
-
require(absPnpApiPath).setup();
|
21
|
-
if (isPnpLoaderEnabled && register) {
|
22
|
-
register(pathToFileURL(absPnpLoaderPath));
|
23
|
-
}
|
24
|
-
}
|
25
|
-
}
|
26
|
-
|
27
|
-
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
|
28
|
-
? exports => absRequire(absUserWrapperPath)(exports)
|
29
|
-
: exports => exports;
|
30
|
-
|
31
|
-
// Defer to the real prettier your application uses
|
32
|
-
module.exports = wrapWithUserWrapper(absRequire(`prettier`));
|
package/.yarnrc.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
nodeLinker: pnp
|
package/eslint.config.js
DELETED
@@ -1,198 +0,0 @@
|
|
1
|
-
import { FlatCompat } from '@eslint/eslintrc';
|
2
|
-
import js from '@eslint/js';
|
3
|
-
import eslint from '@eslint/js';
|
4
|
-
import importPlugin from 'eslint-plugin-import';
|
5
|
-
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
6
|
-
import react from 'eslint-plugin-react';
|
7
|
-
import globals from 'globals';
|
8
|
-
import path from 'node:path';
|
9
|
-
import { fileURLToPath } from 'node:url';
|
10
|
-
import { defineConfig } from 'eslint/config';
|
11
|
-
import tseslint from 'typescript-eslint';
|
12
|
-
|
13
|
-
const __filename = fileURLToPath(import.meta.url);
|
14
|
-
const __dirname = path.dirname(__filename);
|
15
|
-
const compat = new FlatCompat({
|
16
|
-
baseDirectory: __dirname,
|
17
|
-
recommendedConfig: js.configs.recommended,
|
18
|
-
allConfig: js.configs.all,
|
19
|
-
});
|
20
|
-
|
21
|
-
export default defineConfig([
|
22
|
-
tseslint.configs.recommended,
|
23
|
-
eslint.configs.recommended,
|
24
|
-
{
|
25
|
-
languageOptions: {
|
26
|
-
parserOptions: {
|
27
|
-
allowDefaultProject: true,
|
28
|
-
projectService: true,
|
29
|
-
tsconfigRootDir: import.meta.dirname,
|
30
|
-
},
|
31
|
-
},
|
32
|
-
files: ['**/*.{ts,tsx}'], // TypeScript 파일에만 적용
|
33
|
-
rules: {
|
34
|
-
'no-undef': 'off', // no-undef 규칙 비활성화
|
35
|
-
'no-unused-vars': 'off',
|
36
|
-
'@typescript-eslint/no-unused-vars': [
|
37
|
-
'error',
|
38
|
-
{
|
39
|
-
args: 'all',
|
40
|
-
argsIgnorePattern: '^_',
|
41
|
-
caughtErrors: 'all',
|
42
|
-
caughtErrorsIgnorePattern: '^_',
|
43
|
-
destructuredArrayIgnorePattern: '^_',
|
44
|
-
varsIgnorePattern: '^_',
|
45
|
-
ignoreRestSiblings: true,
|
46
|
-
},
|
47
|
-
],
|
48
|
-
},
|
49
|
-
},
|
50
|
-
|
51
|
-
{
|
52
|
-
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
|
53
|
-
...react.configs.flat.recommended,
|
54
|
-
plugins: {
|
55
|
-
react,
|
56
|
-
},
|
57
|
-
languageOptions: {
|
58
|
-
parserOptions: {
|
59
|
-
ecmaFeatures: {
|
60
|
-
jsx: true,
|
61
|
-
},
|
62
|
-
ecmaVersion: 'latest',
|
63
|
-
sourceType: 'module',
|
64
|
-
},
|
65
|
-
globals: {
|
66
|
-
...globals.browser,
|
67
|
-
...globals.serviceworker,
|
68
|
-
},
|
69
|
-
},
|
70
|
-
rules: {
|
71
|
-
'no-undef': 'off', // no-undef 규칙 비활성화
|
72
|
-
'react/react-in-jsx-scope': 'off', // JSX 쓸 때 React import 안 해도 되게
|
73
|
-
'react/jsx-uses-react': 'off',
|
74
|
-
// Prevent missing displayName in a React component definition
|
75
|
-
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
|
76
|
-
'react/display-name': ['off', { ignoreTranspilerName: false }],
|
77
|
-
// Forbid certain props on DOM Nodes
|
78
|
-
// https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md
|
79
|
-
'react/forbid-dom-props': ['off', { forbid: [] }],
|
80
|
-
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
|
81
|
-
'react/no-unstable-nested-components': ['off', { allowAsProps: true }],
|
82
|
-
},
|
83
|
-
},
|
84
|
-
{
|
85
|
-
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
|
86
|
-
plugins: {
|
87
|
-
'jsx-a11y': jsxA11y,
|
88
|
-
},
|
89
|
-
languageOptions: {
|
90
|
-
parserOptions: {
|
91
|
-
ecmaFeatures: {
|
92
|
-
jsx: true,
|
93
|
-
},
|
94
|
-
},
|
95
|
-
},
|
96
|
-
rules: {
|
97
|
-
// ensure emoji are accessible
|
98
|
-
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md
|
99
|
-
// disabled; rule is deprecated
|
100
|
-
'jsx-a11y/accessible-emoji': 'off',
|
101
|
-
|
102
|
-
// Enforce that all elements that require alternative text have meaningful information
|
103
|
-
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md
|
104
|
-
'jsx-a11y/alt-text': [
|
105
|
-
'error',
|
106
|
-
{
|
107
|
-
elements: ['img', 'object', 'area', 'input[type="image"]'],
|
108
|
-
img: [],
|
109
|
-
object: [],
|
110
|
-
area: [],
|
111
|
-
'input[type="image"]': [],
|
112
|
-
},
|
113
|
-
],
|
114
|
-
// require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress
|
115
|
-
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md
|
116
|
-
'jsx-a11y/click-events-have-key-events': 'error',
|
117
|
-
},
|
118
|
-
},
|
119
|
-
{
|
120
|
-
extends: compat.extends('eslint:recommended', 'prettier'),
|
121
|
-
plugins: {
|
122
|
-
import: importPlugin,
|
123
|
-
},
|
124
|
-
files: ['**/*.{js,mjs,cjs}'],
|
125
|
-
languageOptions: {
|
126
|
-
ecmaVersion: 'latest',
|
127
|
-
sourceType: 'module',
|
128
|
-
globals: {
|
129
|
-
...globals.browser,
|
130
|
-
...globals.mocha,
|
131
|
-
...globals.node,
|
132
|
-
},
|
133
|
-
parserOptions: {},
|
134
|
-
},
|
135
|
-
|
136
|
-
rules: {
|
137
|
-
'no-unused-vars': 'off',
|
138
|
-
'no-nested-ternary': 'off', // 중첩 삼항 연산자 가능
|
139
|
-
'arrow-body-style': ['error', 'as-needed'], // 화살표 함수 블록 스타일 자유롭게 허용
|
140
|
-
'no-shadow': 'off', // 변수 이름 중복 허용
|
141
|
-
'implicit-arrow-linebreak': 'off', // 암시적 화살표 함수 줄바꿈 자유롭게 허용
|
142
|
-
'operator-linebreak': 'off', // 연산자 줄바꿈 자유롭게 허용
|
143
|
-
'import/order': [
|
144
|
-
'error',
|
145
|
-
{
|
146
|
-
groups: [
|
147
|
-
['builtin', 'external'],
|
148
|
-
'internal',
|
149
|
-
'parent',
|
150
|
-
'sibling',
|
151
|
-
'index',
|
152
|
-
'object',
|
153
|
-
'type',
|
154
|
-
],
|
155
|
-
pathGroups: [
|
156
|
-
{
|
157
|
-
pattern: 'react',
|
158
|
-
group: 'external',
|
159
|
-
position: 'before',
|
160
|
-
},
|
161
|
-
{
|
162
|
-
pattern: '@mui/**',
|
163
|
-
group: 'external',
|
164
|
-
position: 'before',
|
165
|
-
},
|
166
|
-
{
|
167
|
-
pattern: '@storybook/**',
|
168
|
-
group: 'external',
|
169
|
-
position: 'after',
|
170
|
-
},
|
171
|
-
{
|
172
|
-
pattern: '@internal/**',
|
173
|
-
group: 'internal',
|
174
|
-
position: 'after',
|
175
|
-
},
|
176
|
-
],
|
177
|
-
pathGroupsExcludedImportTypes: ['react', '@mui'],
|
178
|
-
alphabetize: {
|
179
|
-
order: 'asc',
|
180
|
-
caseInsensitive: true,
|
181
|
-
},
|
182
|
-
},
|
183
|
-
],
|
184
|
-
},
|
185
|
-
},
|
186
|
-
{
|
187
|
-
settings: {
|
188
|
-
'import/resolver': {
|
189
|
-
node: {
|
190
|
-
extensions: ['.js', '.jsx', '.ts', '.tsx', 'd.ts'],
|
191
|
-
},
|
192
|
-
typescript: {
|
193
|
-
tsconfigRootDir: import.meta.dirname,
|
194
|
-
},
|
195
|
-
},
|
196
|
-
},
|
197
|
-
},
|
198
|
-
]);
|