Advertisement
Guest User

Untitled

a guest
Nov 18th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. {
  2. "extends": [
  3. "eslint:recommended",
  4. "plugin:import/errors",
  5. "plugin:import/warnings"
  6. ],
  7.  
  8. # 设置ESLint的解析器,默认使用Espree。
  9. "parser": "babel-eslint",
  10.  
  11. # 使用第三方插件,可以省略eslint-plugin-前缀,本地安装的ESLint不仅可以使用本地安装的插件还可以使用全局安装的插件。
  12. "plugins": [
  13. "react"
  14. ],
  15.  
  16. # 设置解析器选项
  17. "parserOptions": {
  18.  
  19. # 指定想要使用的ECMAScript版本
  20. "ecmaVersion": 6,
  21.  
  22. # 默认是script,如果代码是ECMAScript模块的话使用module
  23. "sourceType": "module",
  24.  
  25. # 想使用的额外的语言特性。
  26. "ecmaFeatures": {
  27. "jsx": true
  28. }
  29. },
  30.  
  31. # 定义全局变量
  32. "env": {
  33. "es6": true,
  34. "browser": true,
  35. "node": true,
  36. "jquery": true,
  37. "mocha": true
  38. },
  39.  
  40. # 规则,0/off:关闭规则; 1/warn:开启规则,使用警告级别的错误,不会导致程序退出; 2/error: 开启规则,使用错误级别的错误,当触发的时候,程序会退出。
  41. "rules": {
  42. "quotes": 0,
  43. "no-console": 1,
  44. "no-debugger": 1,
  45. "no-var": 1,
  46. "import/named": 0,
  47. "import/no-named-as-default": 0,
  48. "semi": [1, "always"],
  49. "no-trailing-spaces": 0,
  50. "eol-last": 0,
  51. "no-underscore-dangle": 0,
  52. "no-alert": 0,
  53. "no-lone-blocks": 0,
  54. "jsx-quotes": 1,
  55. "react/display-name": [ 1, {"ignoreTranspilerName": false }],
  56. "react/forbid-prop-types": [1, {"forbid": ["any"]}],
  57. "react/jsx-boolean-value": 0,
  58. "react/jsx-closing-bracket-location": 0,
  59. "react/jsx-curly-spacing": 1,
  60. "react/jsx-indent-props": 0,
  61. "react/jsx-key": 1,
  62. "react/jsx-max-props-per-line": 0,
  63. "react/jsx-no-bind": 0,
  64. "react/jsx-no-duplicate-props": 1,
  65. "react/jsx-no-literals": 0,
  66. "react/jsx-no-undef": 1,
  67. "react/jsx-pascal-case": 1,
  68. "react/jsx-sort-prop-types": 0,
  69. "react/jsx-sort-props": 0,
  70. "react/jsx-uses-react": 1,
  71. "react/jsx-uses-vars": 1,
  72. "react/no-danger": 1,
  73. "react/no-did-mount-set-state": 1,
  74. "react/no-did-update-set-state": 1,
  75. "react/no-direct-mutation-state": 1,
  76. "react/no-multi-comp": 1,
  77. "react/no-set-state": 0,
  78. "react/no-unknown-property": 1,
  79. "react/prefer-es6-class": 1,
  80. "react/prop-types": 1,
  81. "react/react-in-jsx-scope": 1,
  82. "react/require-extension": 1,
  83. "react/self-closing-comp": 1,
  84. "react/sort-comp": 1,
  85. "react/wrap-multilines": 1
  86. },
  87. "globals": {
  88. }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement