-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
53 lines (53 loc) · 1.41 KB
/
.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
node: true,
es2024: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:sonarjs/recommended",
"plugin:mdx/recommended",
"next",
"next/core-web-vitals",
],
plugins: ["@typescript-eslint", "sonarjs", "jsx-expressions"],
rules: {
// Disable prop-types as we use TypeScript for type checking
"@typescript-eslint/explicit-function-return-type": "off",
// (thuang): Allow args prefixed with `_`
// example: https://eslint.org/docs/rules/no-unused-vars#argsignorepattern
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "after-used",
argsIgnorePattern: "^_",
ignoreRestSiblings: false,
vars: "all",
},
],
"jsx-expressions/strict-logical-expressions": "error",
"react-hooks/exhaustive-deps": "error",
// React Hooks
"react-hooks/rules-of-hooks": "error",
"react/jsx-no-target-blank": 0,
"react/prop-types": "off",
},
parser: "@typescript-eslint/parser",
parserOptions: {
createDefaultProgram: true,
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
// Allows for the use of imports
project: "./tsconfig.json",
// Allows for the parsing of modern ECMAScript features
sourceType: "module",
},
};