Created
March 1, 2018 00:09
-
-
Save zi6xuan/a55bcea2b6f3e7f8b9679b7394e16678 to your computer and use it in GitHub Desktop.
vscode eslint 配置文件参考
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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