-
Notifications
You must be signed in to change notification settings - Fork 75
/
.eslintrc.js
36 lines (36 loc) · 912 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
module.exports = {
root: true,
ignorePatterns: ["node_modules/**", "dist/**"],
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"next",
"prettier",
],
file: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
plugins: ["react", "@typescript-eslint"],
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",
},
};
// eslint-disable-next-line no-undef