Skip to content

Instantly share code, notes, and snippets.

@brunosabot
Last active August 19, 2019 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunosabot/30ba8f8fc2ff8bf1a75d8f973b300578 to your computer and use it in GitHub Desktop.
Save brunosabot/30ba8f8fc2ff8bf1a75d8f973b300578 to your computer and use it in GitHub Desktop.
{
"parser": "babel-eslint",
"extends": ["react-app", "airbnb", "prettier"],
"env": {
"browser": true,
"jest": true
},
"plugins": ["react-hooks"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"jsx-a11y/label-has-for": [
2,
{
"components": ["label"],
"allowChildren": true
}
]
}
}
{
"extends": [
"stylelint-config-recommended",
"stylelint-prettier/recommended",
"stylelint-config-css-modules"
],
"plugins": ["stylelint-prettier", "stylelint-order"],
"rules": {
"prettier/prettier": true,
"order/properties-alphabetical-order": true
}
}
{
// ...
"scripts": {
"build": "react-scripts build",
"eject": "react-scripts eject",
"lint": "eslint --ext .js,.jsx .",
"start": "react-scripts start",
"test:lint-staged": "cross-env CI=true react-scripts test --findRelatedTests",
"test": "react-scripts test"
},
"lint-staged": {
"*.css": [
"prettier --write",
"stylelint --fix",
"git add"
],
"*.{js,jsx}": [
"yarn run test:lint-staged",
"eslint --ext .js,.jsx",
"prettier --write",
"git add"
],
"*.{json,md}": [
"prettier --write",
"git add"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
}
{
"printWidth": 100
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment