This repository was archived by the owner on Apr 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.js
59 lines (57 loc) · 1.65 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 = {
env: {
node: true,
es6: true,
},
extends: ["eslint:recommended", "prettier"],
rules: {
"no-var": "error",
eqeqeq: ["error", "always"],
"no-template-curly-in-string": "error",
},
overrides: [
{
files: ["**/*.ts", "**/*.tsx"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
project: "./tsconfig.json",
},
plugins: ["@typescript-eslint"],
rules: {
// These ESLint rules are known to cause issues with typescript-eslint
// See https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended.json
camelcase: "off",
indent: "off",
"no-array-constructor": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-angle-bracket-type-assertion": "warn",
"@typescript-eslint/no-array-constructor": "warn",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
args: "none",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/camelcase": "warn",
"@typescript-eslint/no-use-before-define": "warn",
},
},
{
files: ["**/__tests__/**/*", "**/__mocks__/**/*"],
plugins: ["jest"],
env: {
// Bugged, see https://github.com/jest-community/eslint-plugin-jest/issues/128
// "jest/globals": true,
// This list isn't as complete but should work for now
jest: true,
},
rules: {
"no-console": "off",
},
},
],
};