Skip to content

Instantly share code, notes, and snippets.

@zi6xuan
Created May 1, 2020 01:34
Show Gist options
  • Save zi6xuan/b69c49716f2edb32a7c4181b513993f3 to your computer and use it in GitHub Desktop.
Save zi6xuan/b69c49716f2edb32a7c4181b513993f3 to your computer and use it in GitHub Desktop.
module.exports = {
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier",
"prettier/react"
],
"plugins": [
"react",
"react-native",
"prettier"
],
"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,
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx"
]
}
],
"prettier/prettier": [
"error",
{
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100
}
]
}
};
@zi6xuan
Copy link
Author

zi6xuan commented May 1, 2020

vscdeo user settings

    "svn.ignoreMissingSvnWarning": true,
    "javascript.validate.enable": false,
    "[javascript]": {
        "editor.formatOnSave": false,
    },
    // available through eslint plugin in vscode
    "eslint.alwaysShowStatus": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
yarn add eslint -g
yarn add eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react -g
yarn add prettier eslint-config-prettier eslint-plugin-prettier -g

Not use prettier plugin in the vscode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment