-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
33 lines (30 loc) · 957 Bytes
/
.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
/**
* rules: https://eslint.bootcss.com/docs/rules
*/
module.exports = {
root: true,
env: {
es6: true,
browser: true,
node: true,
},
extends: ["eslint:recommended", "plugin:prettier/recommended"],
parser: "@babel/eslint-parser",
parserOptions: {
requireConfigFile: false, // for @babel/eslint-parser
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
},
},
rules: {
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
"comma-spacing": ["error", { before: false, after: true }],
"array-bracket-spacing": ["error", "never"],
"no-constant-condition": "off",
"no-undef": "warn",
"no-unused-vars": "warn",
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
},
};