-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy patheslintrc.ts
77 lines (75 loc) · 1.54 KB
/
eslintrc.ts
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import type { Linter } from "eslint";
const config: Linter.Config = {
env: {
browser: true,
es2021: true,
"jest/globals": true,
node: true,
},
extends: [
"plugin:testing-library/react",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsdoc/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"prettier",
"plugin:sonarjs/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
tsconfigRootDir: __dirname,
ecmaVersion: "latest",
project: "./tsconfig.json",
sourceType: "module",
},
plugins: [
"testing-library",
"react",
"@typescript-eslint",
"eslint-plugin-tsdoc",
"jsdoc",
"jest",
"prettier",
"sonarjs",
],
settings: {
react: {
version: "detect",
},
},
rules: {
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
"max-params": ["error", 1],
"@typescript-eslint/no-inferrable-types": "off",
"no-invalid-this": "error",
"react/react-in-jsx-scope": "off",
"no-console": "warn",
"react-hooks/exhaustive-deps": "off",
"no-nested-ternary": "off",
},
overrides: [
{
files: ["*.js"],
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
{
files: ["*.ts", "*.tsx"],
rules: {
"@typescript-eslint/no-unused-vars": "off",
},
},
],
};
export default config;