forked from coinToday/FrontEnd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
53 lines (51 loc) · 1.44 KB
/
eslint.config.js
File metadata and controls
53 lines (51 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import airbnb from "eslint-config-airbnb";
/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
languageOptions: {
globals: globals.browser,
},
},
{
env: {
browser: true,
es2021: true,
},
parser: "@typescript-eslint/parser", // TypeScript parser 추가
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 15,
sourceType: "module",
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
airbnb, // Airbnb 설정 추가
...airbnbHooks, // 추가적인 airbnb 설정이 있을 경우
{
plugins: ["react", "@typescript-eslint", "prettier"], // Prettier 플러그인 추가
extends: [
"plugin:react/recommended",
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended", // Prettier 설정 추가
],
rules: {
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [
1,
{ extensions: [".js", ".jsx", ".ts", ".tsx"] },
],
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"prettier/prettier": "error", // Prettier 규칙을 ESLint 규칙으로 처리
},
},
];