-
Notifications
You must be signed in to change notification settings - Fork 38
/
.eslintrc.json
65 lines (65 loc) · 2.17 KB
/
.eslintrc.json
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
{
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2018,
"lib": ["es6", "dom"],
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "jsdoc", "jest"],
"rules": {
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
"react/jsx-no-duplicate-props": ["error", { "ignoreCase": false }],
"react/require-default-props": "off",
"comma-dangle": ["error", "always-multiline"],
"import/first": "off",
"import/extensions": "off",
"newline-per-chained-call": ["error"],
"no-console": "off",
"no-shadow": "off",
"no-unused-vars": "off",
"no-useless-return": "off",
"semi": [2, "never"],
"sort-imports": ["error", { "ignoreDeclarationSort": true }],
"jsdoc/require-description-complete-sentence": "error",
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
"import/no-cycle": "off",
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/test/end-to-end/**", "**/test/integration/**", "**/*.test.ts"]}]
},
"env": {
"browser": true,
"jest": true
},
"settings": {
"import/resolver": {
"alias": {
"map": [
["^~", "./src/client"],
["^@assets", "./src/client/app/assets/gov"],
["^\\$components", "./src/client/scss/components"]
],
"extensions": [".jsx", ".js", ".tsx", ".ts", ".scss", ".css", ".png", ".svg"]
}
}
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
// Disabling `no-undef` lint rule in favor of Typescript checking
// https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.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"
}
}
]
}