-
Notifications
You must be signed in to change notification settings - Fork 30
/
.eslintrc.js
39 lines (37 loc) · 936 Bytes
/
.eslintrc.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
module.exports = {
root: true,
ignorePatterns: ["node_modules/**", "dist/**"],
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"next",
"prettier",
],
overrides : [
{ plugins: ["react", "@typescript-eslint"],
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
parser: "@typescript-eslint/parser",
rules: {
"react/no-direct-mutation-state": [
"error", // Keep the default as error
{
ignoreCallbacks: true, // Allow mutation within callbacks (optional)
mutators: ["this.setState"], // Allow mutation using this.setState (optional)
},
],
"react/no-unescaped-entities": "off",
"@next/next/no-page-custom-font": "off",
},}],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
};
// eslint-disable-next-line no-undef