forked from USStateDept/State-TalentMAP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
114 lines (114 loc) · 3.04 KB
/
.eslintrc
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Use this file as a starting point for your project"s .eslintrc.
// Copy this file, and add rule overrides as needed.
// the base style guide for this project is Airbnb
// see: https://github.com/airbnb/javascript
{
"extends": [
"airbnb"
],
"env": {
"es6": true,
"jasmine": true,
"jest": true
},
"globals": {
"window": true,
"document": true,
"localStorage": true,
"sessionStorage": true,
"Blob": true,
"Image": true,
"System": true,
"__COMMIT_HASH__": "readonly"
},
"parser": "babel-eslint",
"parserOptions": {
"allowImportExportEverywhere": true,
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"paths": ["src"],
"moduleDirectory": [
"node_modules",
"src/js"
]
}
}
},
"plugins": [
"no-loops"
],
// overrides to the Airbnb style follow
"rules": {
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"react/jsx-filename-extension": 0,
"no-loops/no-loops": 2,
"sort-imports": ["error", {
"ignoreDeclarationSort": true
}],
"max-len": [0],
"linebreak-style": [0],
"react/jsx-uses-react": [0],
"react/react-in-jsx-scope": [0],
"arrow-parens": [0],
"camelcase": [0], // only because of UNSAFE_ react lifecycle methods
"react/jsx-no-target-blank": [0],
"react/prop-types": ["warn"],
"template-curly-spacing" : "off",
"indent": ["error", 2, { "ignoredNodes": ["JSXAttribute", "JSXSpreadAttribute", "TemplateLiteral"], "SwitchCase": 1 }],
"react/jsx-indent": [0],
"react/jsx-indent-props": ["error", 2],
"complexity": ["warn", { "max": 40 }],
"no-confusing-arrow": [0],
// allow names to be the same as the default for Redux container testing
"import/no-named-as-default": [0],
// allow test files to import packages in devDependencies
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
"import/no-extraneous-dependencies": ["error", {
"devDependencies": [
"**/*.test.js?(x)",
"/src/testUtilities/**/*"
]
}]
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/ban-ts-comment": [0],
"react/prop-types": [0],
"@typescript-eslint/no-var-requires": [0],
"no-use-before-define": [0],
"@typescript-eslint/no-use-before-define": ["error"]
},
"plugins": ["react", "@typescript-eslint"],
},
{
"files": ["**/*.js", "**/*.jsx"],
"rules": {
"@typescript-eslint/*": "off"
}
}
]
}