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

[compiler][eslint] Use logger callback instead of exceptions to report eslint diagnostics #30336

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

mofeiZ
Copy link
Contributor

@mofeiZ mofeiZ commented Jul 15, 2024

Stack from ghstack (oldest at bottom):


  • panicThreshold: all_errors -> none
  • inject an error logger through compiler config (instead of using exceptions)

We currently report at most one lint warning per file, this lets us exhaustively report all available ones (see new
test fixture for example)

Copy link

vercel bot commented Jul 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 9:46pm

mofeiZ added a commit that referenced this pull request Jul 15, 2024
…t eslint diagnostics

ghstack-source-id: 68f82c6dc45455c4c7343dc703d4a211650c25ab
Pull Request resolved: #30336
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jul 15, 2024
…ns to report eslint diagnostics"

[ghstack-poisoned]
Comment on lines +176 to +179
{
message:
"Mutating component props or hook arguments is not allowed. Consider using a local variable instead",
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previous to this PR, the second error would not be reported

@mofeiZ mofeiZ requested a review from poteto July 15, 2024 21:16
Copy link
Member

@poteto poteto left a comment

Choose a reason for hiding this comment

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

Nice!

…ns to report eslint diagnostics"

---
* panicThreshold: `all_errors` -> `none`
* inject an error logger through compiler config (instead of using exceptions)

We currently report at most one lint warning per file, this lets us exhaustively report all available ones (see new
test fixture for example)

[ghstack-poisoned]
@mofeiZ mofeiZ merged commit 988a87b into gh/mofeiZ/11/base Jul 15, 2024
36 checks passed
mofeiZ added a commit that referenced this pull request Jul 15, 2024
…t eslint diagnostics

---
* panicThreshold: `all_errors` -> `none`
* inject an error logger through compiler config (instead of using exceptions)

We currently report at most one lint warning per file, this lets us exhaustively report all available ones (see new
test fixture for example)

ghstack-source-id: 5299315574d11929efc39ee8f6033e3035d1e378
Pull Request resolved: #30336
@mofeiZ mofeiZ deleted the gh/mofeiZ/11/head branch July 15, 2024 21:56
@josephsavona
Copy link
Contributor

nice!

felixshiftellecon added a commit to felixshiftellecon/react that referenced this pull request Jul 24, 2024
…t eslint diagnostics

---
* panicThreshold: `all_errors` -> `none`
* inject an error logger through compiler config (instead of using exceptions)

We currently report at most one lint warning per file, this lets us exhaustively report all available ones (see new
test fixture for example)

ghstack-source-id: 5299315574d11929efc39ee8f6033e3035d1e378
Pull Request resolved: facebook#30336
felixshiftellecon added a commit to felixshiftellecon/react that referenced this pull request Jul 24, 2024
…t eslint diagnostics

---
* panicThreshold: `all_errors` -> `none`
* inject an error logger through compiler config (instead of using exceptions)

We currently report at most one lint warning per file, this lets us exhaustively report all available ones (see new
test fixture for example)

ghstack-source-id: 5299315574d11929efc39ee8f6033e3035d1e378
Pull Request resolved: facebook#30336
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants