Skip to content

Commit 07bf082

Browse files
committed
Scope format and lint scripts to ./src
`npm run format` and `npm run lint:eslint` traverse the whole repo by default, which fails on systems where `test/environment/docker-dev-volumes` contains directories owned by container users (e.g. solr/data) and is not readable by the developer's UID. The pre-commit hook then aborts. Narrowing the globs to `./src` keeps the formatters and linters running on what we actually care about — application source — and lets the pre-commit hook succeed regardless of how container volumes are provisioned.
1 parent f29ad91 commit 07bf082

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"test:coverage": "jest --coverage -c jest.config.ts",
1717
"test:coverage:check": "jest --coverage --ci --config jest.config.ts",
1818
"lint": "npm run lint:eslint && npm run lint:prettier",
19-
"lint:fix": "eslint --fix --ext .ts ./src --ignore-path .gitignore .",
20-
"lint:eslint": "eslint --ignore-path .gitignore .",
19+
"lint:fix": "eslint --fix --ext .ts --ignore-path .gitignore ./src",
20+
"lint:eslint": "eslint --ignore-path .gitignore ./src",
2121
"lint:prettier": "prettier --check '**/*.(yml|json|md)'",
22-
"format": "prettier --write './**/*.{js,ts,md,json,yml,md}' --config ./.prettierrc",
22+
"format": "prettier --write './src/**/*.{js,ts,md,json,yml,md}' --config ./.prettierrc",
2323
"typecheck": "tsc --noEmit",
2424
"prepare": "husky"
2525
},

0 commit comments

Comments
 (0)