shineYao

react-eslintrc

{
  "extends": ["eslint:recommended"],
  "plugins": [
    "react"
  ],
  "env": {
    "browser": true,
    "node": true,
    "es6": true
  },
  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaFeatures": { // 使用额外的语言特性
      "jsx": true // 启用JSX
    }
  },
  "rules": {
    "comma-dangle": [
      "error",
      "always-multiline"
    ],
    "semi": [2],
    "react/react-in-jsx-scope": [0],
    "react/jsx-uses-react": [2],
    "react/jsx-uses-vars": [2]
  },
  "globals": {
    "React": true
  }
}

posted on 2017-12-11 21:41  shineYao  阅读(743)  评论(0编辑  收藏  举报

导航