-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.js
44 lines (43 loc) · 1.15 KB
/
eslint.config.js
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
import globals from "globals";
import pluginReact from "eslint-plugin-react";
import pluginReactHooks from "eslint-plugin-react-hooks";
import pluginPrettier from "eslint-plugin-prettier";
import prettierConfig from "./prettierrc.js";
import pluginReactRefresh from "eslint-plugin-react-refresh";
export default [
{
files: ["**/*.{js,mjs,cjs,jsx,ts,tsx}"],
ignores: ["dist/**", ".eslintrc.cjs"],
languageOptions: {
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
globals: globals.browser
},
plugins: {
react: pluginReact,
"react-hooks": pluginReactHooks,
prettier: pluginPrettier,
"react-refresh": pluginReactRefresh
},
settings: {
react: {
version: "18.2"
}
},
rules: {
"react/jsx-no-target-blank": "off",
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true }
],
quotes: ["error", "double"],
"no-console": ["warn", { allow: ["warn", "error", "info"] }],
"prettier/prettier": ["error", prettierConfig]
}
}
];