Skip to content

Instantly share code, notes, and snippets.

@naku-i386
Last active July 10, 2018 12:36
Show Gist options
  • Save naku-i386/1f2c04c3bb1b45d3dbdbcdf3494c7dda to your computer and use it in GitHub Desktop.
Save naku-i386/1f2c04c3bb1b45d3dbdbcdf3494c7dda to your computer and use it in GitHub Desktop.
ESLint with React - minimal config
// Packages installed:
// "eslint": "^4.19.1",
// "eslint-config-google": "^0.9.1",
// "eslint-plugin-react": "^7.8.2",
module.exports = {
"extends": [
"google", // Use google styleguide
"plugin:react/recommended" // Fix "Unused import" when using JSX and extend eslint with more options
],
"parserOptions": {
"ecmaVersion": 8, // ECMAScript 2017
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
// "parser": "babel-eslint", // Or install babel-eslint and use it instead of 'parserOptions' to get all new cool features enabled by default
"rules": {
"object-curly-spacing": 0,
"no-tabs": 0,
"require-jsdoc": 0,
"max-len": 0,
"comma-dangle": 0,
"react/no-deprecated": 0,
"react/prop-types": 0,
"valid-jsdoc": 0,
"no-throw-literal": 0,
"one-var": 0,
"no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": true }],
"camelcase": 0
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment