-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
74 lines (60 loc) · 1.99 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
module.exports = {
// https://github.com/typescript-eslint/typescript-eslint
parser: "@typescript-eslint/parser",
env: {
es6: true,
"jest/globals": true,
},
plugins: [
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-default-export.md
"import",
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
"@typescript-eslint",
// https://github.com/prettier/eslint-plugin-prettier
"prettier",
// https://github.com/jest-community/eslint-plugin-jest
"jest",
],
// Prettier is enforcing code-style (formatting)
// StandardJs is enforcing code-quality
// The order below matters !!
extends: [
// https://github.com/standard/eslint-config-standard
"standard",
// Use the recommended Typescript config
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
"plugin:@typescript-eslint/recommended",
// Use the recommended Jest config
// https://github.com/jest-community/eslint-plugin-jest#recommended
"plugin:jest/recommended",
// Use the recommended Prettier config
// https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
"plugin:prettier/recommended",
// Turn-off code-styles (prettier is handling that)
// https://github.com/prettier/eslint-config-prettier
"prettier/standard",
"prettier/@typescript-eslint",
],
parserOptions: {
sourceType: "module",
ecmaVersion: 6,
ecmaFeatures: {
impliedStrict: true,
},
},
rules: {
// https://humanwhocodes.com/blog/2019/01/stop-using-default-exports-javascript-module
// https://basarat.gitbook.io/typescript/main-1/defaultisbad
"import/no-default-export": "error",
},
overrides: [
{
files: ["*.ts"],
rules: {
"no-useless-constructor": "off",
"no-dupe-class-members": "off",
"@typescript-eslint/no-unused-vars": [2, { args: "none" }],
},
},
],
};