Skip to content

Instantly share code, notes, and snippets.

@juandc
Last active March 15, 2022 02:22
Show Gist options
  • Save juandc/9f11c0d315f0ad9ccf3115a9effa7b55 to your computer and use it in GitHub Desktop.
Save juandc/9f11c0d315f0ad9ccf3115a9effa7b55 to your computer and use it in GitHub Desktop.
ESLint + Prettier + Lint Staged config file
{
"parser": "babel-eslint",
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["prettier"],
"env": {
"browser": true,
"node": true
},
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js"] }],
"no-use-before-define": [
"error",
{
"classes": false,
"functions": false,
"variables": true
}
],
"prettier/prettier": [
"error",
{
"singleQuote": true,
"printWidth": 100,
"trailingComma": "all"
}
]
}
}
{
"*.js": ["eslint --fix", "git add"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment