forked from ResearchHub/researchhub-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
44 lines (44 loc) · 1.28 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"node": true,
"es2021": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:import/warnings",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["import", "react", "@typescript-eslint"],
"rules": {
"import/no-unresolved": "error",
"no-console": "warn",
"no-unused-vars": "warn",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-var-requires": 0 // this is specifically used for ck editor
},
"settings": {
"parser": { "@typescript-eslint/parser": [".ts", ".tsx"] },
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`yarn add -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
"project": ["./tsconfig.json"]
}
}
},
"ignorePatterns": ["next.config.js"]
}