-
Notifications
You must be signed in to change notification settings - Fork 19
ES Lint
Adam Doe edited this page Jan 5, 2023
·
4 revisions
- When running a package, you should see the problems panel (next to the terminal) populate with problems that need fixing. You can filter this down so that the
./dist
and./node_modules
folders aren’t showing issues using the following in the upper right filter input:
!**/node_modules, !**/dist
- Use
// eslint-disable-line
and// eslint-disable-next-line
sparingly. You might also want to consider ignoring a single rule instead of everything
ie. // eslint-disable-next-line [rule name here]
- Additionally, you can run a dry run to see the same output using:
npx eslint --fix-dry-run [file_pattern]
- If you don’t see any errors in the files you're commiting, you should be able to commit without any issues. The husky checks for prettier and eslint should turn green, and your code will be formatted and pushed to Github.