1 | {
|
2 | // 使用 AirBnb 编码规范
|
3 | "extends": "eslint-config-airbnb",
|
4 | "env": {
|
5 | "es6": true
|
6 | },
|
7 | // 支持 ES7
|
8 | "parser": "babel-eslint",
|
9 | "rules": {
|
10 | // 允许在 JS 文件中使用 JSX
|
11 | "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
|
12 | // 允许类的非静态方法不使用 `this`;
|
13 | "class-methods-use-this": 0,
|
14 | // 允许引用未在 package.json 中写入依赖的包
|
15 | "import/no-extraneous-dependencies": 0,
|
16 | // 允许引用指定的而路径不存在的包
|
17 | "import/no-unresolved": [2, { "ignore": ["NavigatorNavigationBar"] }],
|
18 | "jsx-a11y/href-no-hash": "off",
|
19 | "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
|
20 | "react/prefer-stateless-function": 0,
|
21 | "no-plusplus": [0, { "allowForLoopAfterthoughts": true }],
|
22 | "no-unused-vars": [0, { "varsIgnorePattern": "[iI]gnored" }],
|
23 | "no-param-reassign": [0],
|
24 | "react/forbid-prop-types": [0],
|
25 | "no-underscore-dangle": [0],
|
26 | "max-len": [0],
|
27 | "react/sort-comp": [0],
|
28 | "no-return-assign": 0,
|
29 | "no-unused-expressions": 0,
|
30 | "react/no-multi-comp": 0,
|
31 | "react/no-array-index-key": 0,
|
32 | "react/no-unused-prop-types": 0,
|
33 | "no-unused-expressions": [0]
|
34 | }
|
35 | }
|