This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
68 lines (68 loc) · 2.08 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
module.exports = {
extends: [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"plugin:promise/recommended",
"plugin:compat/recommended",
"plugin:prettier/recommended",
],
env: {
browser: true,
node: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-explicit-any": "off",
// not working well with TypeScript
"react/require-default-props": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-props-no-spreading": "off",
"react/no-unused-prop-types": "off",
"react-hooks/exhaustive-deps": "off",
"react/function-component-definition": [
"error",
{
namedComponents: ["arrow-function"],
unnamedComponents: ["arrow-function"],
},
],
// A temporary hack related to IDE not resolving correct package.json
"import/no-extraneous-dependencies": "off",
// not useful for iterative software development
"import/prefer-default-export": "off",
"import/no-import-module-exports": "off",
// allow console for debugging
"no-console": "off",
"no-await-in-loop": "off",
"no-restricted-syntax": "off",
"no-underscore-dangle": "off",
"no-continue": "off",
"consistent-return": "off",
"no-param-reassign": ["error", { props: false }],
"no-constant-condition": ["error", { checkLoops: false }],
},
settings: {
"import/resolver": {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
node: {},
webpack: {
config: require.resolve("./.erb/configs/webpack.config.eslint.ts"),
},
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
},
};