eslint-config-everything 0.0.0 → 0.0.9
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-3FZ6L4HR.js +3020 -0
- package/dist/chunk-3FZ6L4HR.js.map +1 -0
- package/dist/chunk-7D4SUZUM.js +38 -0
- package/dist/chunk-7D4SUZUM.js.map +1 -0
- package/dist/chunk-DXW5F5KT.js +25 -0
- package/dist/chunk-DXW5F5KT.js.map +1 -0
- package/dist/chunk-GVUZG6ZQ.js +12 -0
- package/dist/chunk-GVUZG6ZQ.js.map +1 -0
- package/dist/chunk-OJFGJEKX.js +10 -0
- package/dist/chunk-OJFGJEKX.js.map +1 -0
- package/dist/chunk-QFM54EV3.js +16 -0
- package/dist/chunk-QFM54EV3.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-UL5LGKQ4.js +15 -0
- package/dist/chunk-UL5LGKQ4.js.map +1 -0
- package/dist/chunk-VRSMQDZC.js +436 -0
- package/dist/chunk-VRSMQDZC.js.map +1 -0
- package/dist/configs/javascript.d.ts +133 -0
- package/dist/configs/javascript.js +13 -0
- package/dist/configs/javascript.js.map +1 -0
- package/dist/configs/next.d.ts +10 -0
- package/dist/configs/next.js +7697 -0
- package/dist/configs/next.js.map +1 -0
- package/dist/configs/react-internal.d.ts +9 -0
- package/dist/configs/react-internal.js +53 -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 +21 -0
- package/dist/configs/typescript.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/objects/base.d.ts +125 -0
- package/dist/objects/base.js +9 -0
- package/dist/objects/base.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/dist/objects/perfectionist.d.ts +5 -0
- package/dist/objects/perfectionist.js +8 -0
- package/dist/objects/perfectionist.js.map +1 -0
- package/dist/prettier.d.ts +8 -0
- package/dist/prettier.js +8 -0
- package/dist/prettier.js.map +1 -0
- package/dist/rules/base.d.ts +437 -0
- package/dist/rules/base.js +8 -0
- package/dist/rules/base.js.map +1 -0
- package/dist/rules/typescript.d.ts +108 -0
- package/dist/rules/typescript.js +126 -0
- package/dist/rules/typescript.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 @@
|
|
1
|
+
{"version":3,"sources":["../../src/rules/typescript.ts"],"sourcesContent":["export const typescriptRules = {\n \"@typescript-eslint/adjacent-overload-signatures\": \"error\",\n \"@typescript-eslint/array-type\": \"error\",\n \"@typescript-eslint/await-thenable\": \"error\",\n \"@typescript-eslint/ban-ts-comment\": [\n \"error\",\n { minimumDescriptionLength: 10 },\n ],\n \"@typescript-eslint/ban-tslint-comment\": \"error\",\n \"@typescript-eslint/class-literal-property-style\": \"error\",\n \"@typescript-eslint/consistent-generic-constructors\": \"error\",\n \"@typescript-eslint/consistent-indexed-object-style\": \"error\",\n \"@typescript-eslint/consistent-type-assertions\": \"error\",\n \"@typescript-eslint/consistent-type-definitions\": \"error\",\n \"@typescript-eslint/dot-notation\": \"error\",\n \"@typescript-eslint/no-array-constructor\": \"error\",\n \"@typescript-eslint/no-array-delete\": \"error\",\n \"@typescript-eslint/no-base-to-string\": \"error\",\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"error\",\n \"@typescript-eslint/no-confusing-void-expression\": \"error\",\n \"@typescript-eslint/no-deprecated\": \"error\",\n \"@typescript-eslint/no-duplicate-enum-values\": \"error\",\n \"@typescript-eslint/no-duplicate-type-constituents\": \"error\",\n \"@typescript-eslint/no-dynamic-delete\": \"error\",\n \"@typescript-eslint/no-empty-function\": \"error\",\n \"@typescript-eslint/no-empty-object-type\": \"error\",\n \"@typescript-eslint/no-explicit-any\": \"error\",\n \"@typescript-eslint/no-extra-non-null-assertion\": \"error\",\n \"@typescript-eslint/no-extraneous-class\": \"error\",\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-for-in-array\": \"error\",\n \"@typescript-eslint/no-implied-eval\": \"error\",\n \"@typescript-eslint/no-inferrable-types\": \"error\",\n \"@typescript-eslint/no-invalid-void-type\": \"error\",\n \"@typescript-eslint/no-meaningless-void-operator\": \"error\",\n \"@typescript-eslint/no-misused-new\": \"error\",\n \"@typescript-eslint/no-misused-promises\": \"error\",\n \"@typescript-eslint/no-mixed-enums\": \"error\",\n \"@typescript-eslint/no-namespace\": \"error\",\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n \"@typescript-eslint/no-redundant-type-constituents\": \"error\",\n \"@typescript-eslint/no-require-imports\": \"error\",\n \"@typescript-eslint/no-this-alias\": \"error\",\n \"@typescript-eslint/no-unnecessary-boolean-literal-compare\": \"error\",\n \"@typescript-eslint/no-unnecessary-condition\": \"error\",\n \"@typescript-eslint/no-unnecessary-template-expression\": \"error\",\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"error\",\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n \"@typescript-eslint/no-unnecessary-type-parameters\": \"error\",\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"error\",\n \"@typescript-eslint/no-unsafe-enum-comparison\": \"error\",\n \"@typescript-eslint/no-unsafe-function-type\": \"error\",\n \"@typescript-eslint/no-unsafe-unary-minus\": \"error\",\n \"@typescript-eslint/no-unused-expressions\": \"error\",\n \"@typescript-eslint/no-unused-vars\": [\n \"error\",\n {\n args: \"after-used\",\n argsIgnorePattern: \"^_\",\n ignoreRestSiblings: false,\n vars: \"all\",\n varsIgnorePattern: \"^_\",\n },\n ],\n \"@typescript-eslint/no-useless-constructor\": \"error\",\n \"@typescript-eslint/no-wrapper-object-types\": \"error\",\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"error\",\n \"@typescript-eslint/only-throw-error\": \"error\",\n \"@typescript-eslint/prefer-as-const\": \"error\",\n \"@typescript-eslint/prefer-find\": \"error\",\n \"@typescript-eslint/prefer-for-of\": \"error\",\n \"@typescript-eslint/prefer-function-type\": \"error\",\n \"@typescript-eslint/prefer-includes\": \"error\",\n \"@typescript-eslint/prefer-literal-enum-member\": \"error\",\n \"@typescript-eslint/prefer-namespace-keyword\": \"error\",\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n \"@typescript-eslint/prefer-promise-reject-errors\": \"error\",\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"error\",\n \"@typescript-eslint/prefer-regexp-exec\": \"error\",\n \"@typescript-eslint/prefer-return-this-type\": \"error\",\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n \"@typescript-eslint/related-getter-setter-pairs\": \"error\",\n \"@typescript-eslint/require-await\": \"error\",\n \"@typescript-eslint/restrict-plus-operands\": [\n \"error\",\n {\n allowAny: false,\n allowBoolean: false,\n allowNullish: false,\n allowNumberAndString: false,\n allowRegExp: false,\n },\n ],\n \"@typescript-eslint/restrict-template-expressions\": [\n \"error\",\n {\n allowAny: false,\n allowBoolean: false,\n allowNever: false,\n allowNullish: false,\n allowNumber: false,\n allowRegExp: false,\n },\n ],\n \"@typescript-eslint/return-await\": [\n \"error\",\n \"error-handling-correctness-only\",\n ],\n \"@typescript-eslint/triple-slash-reference\": \"error\",\n \"@typescript-eslint/unbound-method\": \"error\",\n \"@typescript-eslint/unified-signatures\": \"error\",\n \"@typescript-eslint/use-unknown-in-catch-callback-variable\": \"error\",\n \"dot-notation\": \"off\",\n \"no-empty-function\": \"off\",\n} as const;\n"],"mappings":";;;AAAO,IAAM,kBAAkB;AAAA,EAC7B,mDAAmD;AAAA,EACnD,iCAAiC;AAAA,EACjC,qCAAqC;AAAA,EACrC,qCAAqC;AAAA,IACnC;AAAA,IACA,EAAE,0BAA0B,GAAG;AAAA,EACjC;AAAA,EACA,yCAAyC;AAAA,EACzC,mDAAmD;AAAA,EACnD,sDAAsD;AAAA,EACtD,sDAAsD;AAAA,EACtD,iDAAiD;AAAA,EACjD,kDAAkD;AAAA,EAClD,mCAAmC;AAAA,EACnC,2CAA2C;AAAA,EAC3C,sCAAsC;AAAA,EACtC,wCAAwC;AAAA,EACxC,sDAAsD;AAAA,EACtD,mDAAmD;AAAA,EACnD,oCAAoC;AAAA,EACpC,+CAA+C;AAAA,EAC/C,qDAAqD;AAAA,EACrD,wCAAwC;AAAA,EACxC,wCAAwC;AAAA,EACxC,2CAA2C;AAAA,EAC3C,sCAAsC;AAAA,EACtC,kDAAkD;AAAA,EAClD,0CAA0C;AAAA,EAC1C,2CAA2C;AAAA,EAC3C,sCAAsC;AAAA,EACtC,sCAAsC;AAAA,EACtC,0CAA0C;AAAA,EAC1C,2CAA2C;AAAA,EAC3C,mDAAmD;AAAA,EACnD,qCAAqC;AAAA,EACrC,0CAA0C;AAAA,EAC1C,qCAAqC;AAAA,EACrC,mCAAmC;AAAA,EACnC,8DAA8D;AAAA,EAC9D,0DAA0D;AAAA,EAC1D,4CAA4C;AAAA,EAC5C,qDAAqD;AAAA,EACrD,yCAAyC;AAAA,EACzC,oCAAoC;AAAA,EACpC,6DAA6D;AAAA,EAC7D,+CAA+C;AAAA,EAC/C,yDAAyD;AAAA,EACzD,oDAAoD;AAAA,EACpD,oDAAoD;AAAA,EACpD,qDAAqD;AAAA,EACrD,qDAAqD;AAAA,EACrD,oDAAoD;AAAA,EACpD,gDAAgD;AAAA,EAChD,8CAA8C;AAAA,EAC9C,4CAA4C;AAAA,EAC5C,4CAA4C;AAAA,EAC5C,qCAAqC;AAAA,IACnC;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,MAAM;AAAA,MACN,mBAAmB;AAAA,IACrB;AAAA,EACF;AAAA,EACA,6CAA6C;AAAA,EAC7C,8CAA8C;AAAA,EAC9C,wDAAwD;AAAA,EACxD,uCAAuC;AAAA,EACvC,sCAAsC;AAAA,EACtC,kCAAkC;AAAA,EAClC,oCAAoC;AAAA,EACpC,2CAA2C;AAAA,EAC3C,sCAAsC;AAAA,EACtC,iDAAiD;AAAA,EACjD,+CAA+C;AAAA,EAC/C,gDAAgD;AAAA,EAChD,4CAA4C;AAAA,EAC5C,mDAAmD;AAAA,EACnD,mDAAmD;AAAA,EACnD,yCAAyC;AAAA,EACzC,8CAA8C;AAAA,EAC9C,qDAAqD;AAAA,EACrD,kDAAkD;AAAA,EAClD,oCAAoC;AAAA,EACpC,6CAA6C;AAAA,IAC3C;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,cAAc;AAAA,MACd,cAAc;AAAA,MACd,sBAAsB;AAAA,MACtB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,oDAAoD;AAAA,IAClD;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,aAAa;AAAA,MACb,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,mCAAmC;AAAA,IACjC;AAAA,IACA;AAAA,EACF;AAAA,EACA,6CAA6C;AAAA,EAC7C,qCAAqC;AAAA,EACrC,yCAAyC;AAAA,EACzC,6DAA6D;AAAA,EAC7D,gBAAgB;AAAA,EAChB,qBAAqB;AACvB;","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.9",
|
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
|
-
]);
|