Skip to content

Instantly share code, notes, and snippets.

@zi6xuan
Created March 1, 2018 00:09
Show Gist options
  • Save zi6xuan/a55bcea2b6f3e7f8b9679b7394e16678 to your computer and use it in GitHub Desktop.
Save zi6xuan/a55bcea2b6f3e7f8b9679b7394e16678 to your computer and use it in GitHub Desktop.
vscode eslint 配置文件参考
module.exports = {
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"plugins": [
"react",
"react-native"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true,
"experimentalObjectRestSpread": true
}
},
"rules": {
"react/no-deprecated":"warn",
"react/no-direct-mutation-state":"warn",
"no-undef":["off","console"],
"no-console":"off",
"no-unused-vars": "warn",
"react/prop-types":"warn",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react-native/no-unused-styles":"warn",
"react-native/split-platform-components": 2
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment