Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface unhandled ESLint errors #838

Merged
merged 2 commits into from
Jun 19, 2023
Merged

Surface unhandled ESLint errors #838

merged 2 commits into from
Jun 19, 2023

Conversation

mrm007
Copy link
Contributor

@mrm007 mrm007 commented Jun 19, 2023

Provide more context when ESLint reports an error. Because this isn't very helpful:

Linting
Running Vocab compile
Checking code with TypeScript compiler
Path: /some/path
Checking code with Prettier
Paths: **/*.{ts,cts,mts,tsx,js,cjs,mjs,jsx,md,less,css}
Checking code with ESLint
Paths: .
error Command failed with exit code 1.

It doesn't say what the error is.

@mrm007 mrm007 requested a review from a team as a code owner June 19, 2023 01:48
@changeset-bot
Copy link

changeset-bot bot commented Jun 19, 2023

🦋 Changeset detected

Latest commit: 8745b9a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sku Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines +62 to +63
console.warn(yellow('ESLint encountered an error:'));
console.log(e.message);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to console.error here instead of just warn/log?

Copy link
Contributor Author

@mrm007 mrm007 Jun 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy for it to be either, but console.log isn't as noisy (red) and it's easier to read the error.

@mrm007 mrm007 enabled auto-merge (squash) June 19, 2023 03:28
@mrm007 mrm007 merged commit 2148313 into master Jun 19, 2023
3 of 4 checks passed
@mrm007 mrm007 deleted the eslint-errors branch June 19, 2023 03:46
@seek-oss-ci seek-oss-ci mentioned this pull request Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants