Skip to content

Instantly share code, notes, and snippets.

@nikgraf
Last active July 12, 2019 19:11
Show Gist options
  • Save nikgraf/db4a063c6a1100e323c5e95e92b13525 to your computer and use it in GitHub Desktop.
Save nikgraf/db4a063c6a1100e323c5e95e92b13525 to your computer and use it in GitHub Desktop.
Prettier / Eslint Setup
module.exports = {
root: true, // make to not take in any user specified rules in parent folders
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/flowtype', 'prettier/react'],
env: {
browser: true,
node: true,
jest: true,
},
plugins: ['flowtype'],
rules: {
'react/prop-types': 0,
'react/jsx-filename-extension': 0,
},
}
{
"scripts": {
"precommit": "lint-staged"
},
"lint-staged": {
"*.js": ["eslint"],
"*.{js,css}": ["prettier-eslint --list-different"]
},
"devDependencies": {
"babel-core": "^6.17.0",
"babel-eslint": "^8.0.1",
"eslint": "^4.8.0",
"eslint-config-airbnb": "^16.0.0",
"eslint-config-prettier": "^2.6.0",
"eslint-plugin-flowtype": "^2.39.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"husky": "^0.14.3",
"lint-staged": "^4.2.3",
"prettier-eslint": "^8.2.0",
"prettier-eslint-cli": "^4.4.0"
}
}
module.exports = {
semi: false,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment