Open spmonahan opened 2 months ago
thank you for report ! this is indeed a bug/limitation of our linting setup.
This is failing because workspace-plugin
uses type aware rules, which are turned off during commit checks that run lint-staged
.
ATM our only mechanism is to imperatively register type-aware rules within eslint-plugin or per package config ( which implies using javascript for eslint configuration which we wanna avoid ) https://github.com/microsoft/fluentui/blob/5a20835e6e952c80aa18c83531db494dd85b2def/packages/eslint-plugin/src/utils/configHelpers.js#L178-L179
How to Fix this:
Quick fix is to migrate tools eslint to .js
Long term fix:
pre-push
instead pre-comit
Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
no
Reproduction
Make a change in /tools, run
git commit
Bug Description
Actual Behavior
Linting during
git commit
fails when changing a file in/tools
.Make a (valid) change to a file in /tools:
Save then run
git commit
Expected Behavior
Valid changes should not fail linting during commit. This can be worked around by using the
--no-verify
flag ongit commit
.Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations