This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc
74 lines (61 loc) · 1.94 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
// vim: syntax=json
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"mocha": true
},
// Start with rules from eslint recommended setting, and override below.
"extends": "airbnb",
// Linting rules are enforced based on the following levels:
// (Reference: http://eslint.org/docs/user-guide/configuring)
// 0: turn the rule off
// 1: turn the rule on as a warning (doesn't affect exit code)
// 2: turn the rule on as an error (exit code is 1 when triggered)
"rules": {
// Use 2 spaces for indentation,
"indent": [2, 2, { "SwitchCase": 1 }],
// Require single quotes for strings.
"quotes": [2, "single", "avoid-escape"],
// Allow 'while (true), do something, break' pattern.
"no-constant-condition": 0,
// Require semicolons where they should be.
"semi": [2, "always"],
// Disallow littering with unused variables (except function args).
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
// Don't enforce newline at the end of file.
"eol-last": [0],
// Don't enforce disallowing mixing regular variable and require declarations
"no-mixed-requires": [0],
// Don't enforce disallowing dangling underscores in identifiers
"no-underscore-dangle": [0],
// Prevent variables used in JSX to be incorrectly marked as unused
"react/jsx-uses-vars": 1,
// Prevent React to be incorrectly marked as unused
"react/jsx-uses-react": 1,
// disable forcing .jsx extension
"react/jsx-filename-extension": 0,
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/test/**/*",
"**/playground/**/*",
"webpack.**",
"rollup.**"
]
}
]
},
{
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
}
},
"plugins": [
"react"
]
}