This repository has been archived by the owner on Jan 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
74 lines (72 loc) · 1.8 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const path = require("path");
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["react", "react-hooks", "@typescript-eslint", "jsx-a11y"],
env: {
browser: true,
jest: true,
es6: true
},
extends: [
"@hipo/eslint-config-base",
"@hipo/eslint-config-react",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"prettier/@typescript-eslint",
"prettier/react",
"prettier"
],
parserOptions: {
project: path.resolve(__dirname, "./tsconfig.json"),
tsconfigRootDir: __dirname,
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true
},
createDefaultProgram: true
},
settings: {
react: {
// Tells eslint-plugin-react to automatically detect the version of React to use
version: "detect"
}
},
globals: {
__dirname: true,
module: true,
BUILD_TYPE: true,
TARGET_ENV_TYPE: true,
API_BASE_URL: true
},
overrides: [
{
files: ["*.config.js"],
rules: {
"@typescript-eslint/no-var-requires": "off"
}
},
{
files: ["*.d.ts"],
rules: {
"newline-after-var": "off"
}
}
],
rules: {
// 👇🏻 `@typescript-eslint` overrides
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/ban-ts-comment": 1,
// tsc already catches these kind of errors
"no-undef": 0
}
};