diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0dd14ca7e60b8b6dc81de06b705925d72125b761..e04e4dd7f84e0aa95fa4a4c4e87bcb9a440442b3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,22 +6,20 @@ repos: hooks: - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + - repo: local hooks: - - id: prettier - additional_dependencies: - - prettier@3.2.5 - - repo: https://github.com/pre-commit/mirrors-eslint - rev: v8.56.0 - hooks: - - id: eslint - entry: eslint --fix - additional_dependencies: - - eslint@^8.55.0 - - eslint-config-react-app@^7.0.1 - - eslint-config-prettier@^9.1.0 - - eslint-plugin-import@^2.29.0 - - eslint-plugin-react@^7.33.2 - - eslint-plugin-cypress@^2.15.1 - - eslint-formatter-gitlab@^4.0.0 + - id: prettier-check + name: prettier-check + entry: npm run prettier:fix + language: node + pass_filenames: false + - id: lint-fix + name: lint and fix + entry: npm run lint:fix + language: node + pass_filenames: false + - id: lint + name: lint + entry: npm run lint + language: node + pass_filenames: false diff --git a/package.json b/package.json index 12265ddff0061e764e40c16df1f8affb4d18be41..a8b18c0803ed8155bc65f5cf6a54f079d0aa0101 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,10 @@ "code-quality": "eslint src --ext .js -o eslint/quality -f gitlab", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", - "lint": "npx eslint src", - "lint:fix": "npm run lint -- --fix", + "check-types": "tsc --noemit", + "eslint": "npx eslint src", + "lint": "npm run check-types && npm run eslint", + "lint:fix": "npm run eslint -- --fix", "prettier": "npx prettier src --check", "prettier:fix": "npm run prettier -- --write", "format": "npm run prettier:fix && npm run lint:fix",