This repository was archived by the owner on Sep 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
59 lines (59 loc) · 1.86 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
54
55
56
57
58
59
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
project: "./tsconfig.json",
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
es6: true,
},
plugins: ["@typescript-eslint", "react-hooks"],
extends: [
"react-app",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
],
rules: {
// Not needed, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/typedef.md#when-not-to-use-it
"@typescript-eslint/typedef": "off",
"import/no-default-export": "error",
"import/no-unresolved": "off",
// Fixes this warning for TS, https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
"no-unused-vars": "off",
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
"no-undef": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-filename-extension": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
},
overrides: [
{
files: ["**/*.ts", "**/*.tsx"],
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
},
},
],
settings: {
react: {
version: "detect",
},
},
};