-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc
36 lines (36 loc) · 1.24 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
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},
"globals": {
"Babel": true,
"React": true
},
"plugins": [
"react"
],
"rules": {
"global-require": "off", // 关闭require语句需要放置在组件的最上面
"import/no-unresolved": "off",
"no-console": "off", // 关闭对console的检测
"no-debugger": "error",// 关闭no debugger
"no-underscore-dangle": "off",// 关闭命名的下划线检测
"no-new-func": "off",// 关闭new Function的使用检测
"no-param-reassign": "off",// 关闭函数参数的修改检测
"react/prefer-stateless-function": "off",// 关闭无状态函数的检测
"react/no-multi-comp": "off",// 关闭多个组件在一个文件的检测
"react/jsx-no-bind": "off",// 关闭使用bind方法的检测
"react/jsx-indent": "off",// 关闭对空格和tab键的检测
"react/jsx-first-prop-new-line": "off",// 关闭第一个属性另起一行的检测
"react/jsx-filename-extension": "off",// 关闭对文件名后缀的检测
"no-restricted-syntax": "off" //关闭对特定语法使用的检测
},
"settings": {
"import/resolver": {
"webpack": { "config": "webpack.config.dev.js" }
}
}
}