Questions tagged [lint-staged]

The tag has no usage guidance.

0
votes
0answers
3 views

lint-staged no stage files match

Used create-react-app template. Windows, OpenServer. package.json { "name": "league-finder", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.5.2", "react-dom": "^...
0
votes
0answers
17 views

Searching up a directory with micromatch globbing

I have my package.json in a subfolder /docroot/themes/custom/my_theme/package.json and I am using lint-staged to run some precommit git hooks, but I cant get the globber to find changes up a few ...
0
votes
0answers
24 views

Is this a right way to use husky + lint-staged?

I found numerous blogs (including the lint-staged doc) introducing such a way to use husky+ lint-staged as the following code defined in the package.json: { "scripts": { "precommit": "lint-...
8
votes
1answer
179 views

How to lint for Typescript compilation issues?

Take the following Typescript arrow function: /** * Returns a probably unique component name. * * @param baseName a suggested name to make unique. * @returns a probably unique name. */ export ...
4
votes
2answers
1k views

lint-staged not running on precommit

prettier is not running on precommit. This worked with the same configuration in other projects, so I'm baffled why it's not working this time. This is the relevant section of my package.json file: ...
0
votes
0answers
368 views

Prettier Husky lint-staged trying to remove all semicolons

Oh it's working now. don't know why it didn't work. It's resolved For those looking for an answer, try yarn run prettier first before git add . git commit -m "abc" I'll leave this as a reference for ...
5
votes
1answer
213 views

How to use lint-staged with jest --collectCoverageFrom

I'm using lint-staged with Jest testing framework to test only changed files from last commit as described in this blog. My configuration is as below: "src/**/*.{ts}": [ "prettier --write", "...
2
votes
0answers
421 views

lint-staged and tslint “warning” severity

In my project I use tslint with "defaultSeverity": "warning" option. Is there a way to configure lint-staged to catch warnings too and abort commit if they occurs? My lint-staged configuration: "...
3
votes
2answers
2k views

Husky giving error SyntaxError: Use of const in strict mode

I am using Husky with Lint-staged and Stylelint "scripts": { "precommit": "lint-staged", }, "lint-staged": { "*.scss": ["stylelint --syntax scss" ] }, OS - Latest OSX Node - 6....