You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running eslint --fix in lint-staged, the above becomes a single line. This does not happen when running lint in the terminal, nor does it happen on save so I suspect it's an issue that's tied to lint-staged, however lint-staged should be reading the same eslint config as VSCode.
The lint-staged command just runs eslint and stylelint (which shouldn't be linting <script></script>)
However, please also note that this is only a shared config where we can only make sure the default and recommended configs are working fine. We don't have the bandwidth to deal with custom configuration or rules conflicts. If you believe it's a bug in the rules, please create an issue to upstream plugins instead.
Thus, I am converting this to a discussion for now.
antfu
changed the title
Conflicts with lint-staged
Conflicts with lint-staged and stylelint
May 2, 2024
Repository owner
locked and limited conversation to collaborators
May 2, 2024
Describe the bug
Code gets re-formatted (incorrectly) when running lint-staged. Specifically, code that was broken onto multiple lines gets reformatted onto one line, causing
style/max-statements-per-line
errors.For example:
When running eslint --fix in lint-staged, the above becomes a single line. This does not happen when running lint in the terminal, nor does it happen on save so I suspect it's an issue that's tied to lint-staged, however lint-staged should be reading the same eslint config as VSCode.
The lint-staged command just runs eslint and stylelint (which shouldn't be linting <script></script>)
Reproduction
https://stackblitz.com/edit/github-yosb9t?file=app.vue,package.json,.husky%2Fpre-commit,.husky%2F_%2F.gitignore,.husky%2F_%2Fhusky.sh,eslint.config.js
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: