Skip to content

Instantly share code, notes, and snippets.

@shotasenga
Created March 25, 2018 18:29
Show Gist options
  • Save shotasenga/6e170651f9b2342667200da9ca865673 to your computer and use it in GitHub Desktop.
Save shotasenga/6e170651f9b2342667200da9ca865673 to your computer and use it in GitHub Desktop.
ESLint + Prettier configuration for React Application
{
"parser": "babel-eslint",
"env": {
"browser": true
},
"extends": [
"airbnb",
"prettier"
],
"settings": {
"import/resolver": {
"webpack": {
"config": "webpack.config.js"
}
}
}
}
{
"scripts": {
"precommit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix",
"prettier --write",
"git add"
],
"*.{css,scss}": [
"prettier --write",
"git add"
]
},
"browserslist": "last 2 versions, ie 9",
"babel": {
"presets": [
"babel-preset-env",
"babel-preset-stage-2",
"babel-preset-react"
]
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-loader": "^7.1.2",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-import-resolver-webpack": "^0.8.4",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"eslint": "^4.19.1",
"husky": "^0.14.3",
"lint-staged": "^7.0.0",
"prettier": "1.11.1",
"webpack": "^3.11.0"
},
"dependencies": {
"prop-types": "^15.6.0",
"react": "^16.2.0",
"react-dom": "^16.2.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment