UNPKG

996 BPlain TextView Raw
1{
2 // 基于 airbnb 规则
3 "extends": "airbnb",
4 // 使用 babel 解析器,支持一些还没有进入 ES6+ 标准的特性。比如 class property
5 "parser": "babel-eslint",
6 // 解析 webpack alias 中的模块名
7 "settings": {
8 "import/resolver": "webpack"
9 },
10 "env": {
11 "browser": true
12 },
13 "rules": {
14 "no-plusplus": [
15 "error",
16 {
17 // 允许 for 循环中的 i++
18 "allowForLoopAfterthoughts": true
19 }
20 ],
21 "no-param-reassign": [
22 "error",
23 {
24 // 允许修改参数的属性
25 "props": false
26 }
27 ],
28 // 允许在循环里使用 await
29 "no-await-in-loop": 0,
30 // 允许在一个表达式里使用多种操作符,否则与 prettier 冲突
31 // see https://github.com/prettier/eslint-config-prettier#no-mixed-operators
32 "no-mixed-operators": 0,
33 // 允许在 jsx 中使用 bind
34 "react/jsx-no-bind": 0,
35 // 允许所有类型的 proptype
36 "react/forbid-prop-types": 0
37 }
38}
\No newline at end of file