Closed r100-stack closed 1 year ago
When committing changes of files that are ignored by eslint like the below three .js files, it gives the below error and prevents a commit.
.js
As discussed with Mayank, one recommendation Mayank gave was to not run eslint for jsx, js files.
jsx, js
So something similar to replacing:
https://github.com/iTwin/iTwinUI-react/blob/5be110de87ce7c719d27c137f882200dc9cc01d7/apps/storybook/package.json#L46-L50
with
"*.{tsx,ts,jsx,js}": [ "prettier --write", "node ../configs/copyrightLinter.js --fix" ], "*.{tsx,ts}": [ "eslint --max-warnings=0 --fix" ]
Should not block commits when eslint ignored files are changed.
To reproduce this, we can edit eslint ignored files, like any of the three files mentioned in the screenshot above.
I encountered this when merging the latest main branch (v2.0.1) with the old rohan/table-ctrl-shift-click-1 branch of my PR #888
main
v2.0.1
rohan/table-ctrl-shift-click-1
Describe the bug (actual behavior)
When committing changes of files that are ignored by eslint like the below three
.js
files, it gives the below error and prevents a commit.Possible solution
As discussed with Mayank, one recommendation Mayank gave was to not run eslint for
jsx, js
files.So something similar to replacing:
https://github.com/iTwin/iTwinUI-react/blob/5be110de87ce7c719d27c137f882200dc9cc01d7/apps/storybook/package.json#L46-L50
with
Expected behavior
Should not block commits when eslint ignored files are changed.
Steps to reproduce
To reproduce this, we can edit eslint ignored files, like any of the three files mentioned in the screenshot above.
Additional information
I encountered this when merging the latest
main
branch (v2.0.1
) with the oldrohan/table-ctrl-shift-click-1
branch of my PR #888