chore: lint staged configuration

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
mirlan.maksitaliev 6 years ago
parent 11008d279d
commit 71886fc333
  1. 12
      package.json

@ -6,7 +6,8 @@
"prestart ": "yarn generate", "prestart ": "yarn generate",
"start": "react-scripts start", "start": "react-scripts start",
"build": "GENERATE_SOURCEMAP=false react-scripts build && gzipper --verbose ./build", "build": "GENERATE_SOURCEMAP=false react-scripts build && gzipper --verbose ./build",
"test": "react-scripts test --passWithNoTests --watchAll=false", "test": "react-scripts test --testMatch '**/__tests__/*' --passWithNoTests --watchAll=false",
"test:watch": "react-scripts test --testMatch '**/__tests__/*'",
"eject": "react-scripts eject", "eject": "react-scripts eject",
"generate": "graphql-codegen --config codegen.yml", "generate": "graphql-codegen --config codegen.yml",
"lint": "eslint 'src/**/*.{ts,tsx}'" "lint": "eslint 'src/**/*.{ts,tsx}'"
@ -50,6 +51,7 @@
"eslint-plugin-typescript-sort-keys": "^1.2.0", "eslint-plugin-typescript-sort-keys": "^1.2.0",
"gzipper": "^3.7.0", "gzipper": "^3.7.0",
"husky": "^4.2.5", "husky": "^4.2.5",
"lint-staged": "^10.2.7",
"typescript": "^3.9.3" "typescript": "^3.9.3"
}, },
"config": { "config": {
@ -59,10 +61,16 @@
}, },
"husky": { "husky": {
"hooks": { "hooks": {
"pre-commit": "npm test", "pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
} }
}, },
"lint-staged": {
"src/**/*.{ts,tsx}": [
"npm run lint -- --max-warnings 0",
"npm run test -- --findRelatedTests"
]
},
"browserslist": { "browserslist": {
"production": [ "production": [
">0.2%", ">0.2%",

Loading…
Cancel
Save