-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix parsing errors #1
Conversation
5eb48db
to
ae83e2b
Compare
ae83e2b
to
75ac5e7
Compare
@j0ashm Feel free to skim it to see the changes if ya have the time. I should've done a better job testing the plugin on our monorepo 😅. |
@bryan-hoang Out of curiosity, what kind of edge cases were missed? Reading the issue, I'm not quite sure where/why |
I do remember running the plug-in on the DCP monorepo and it didn't throw up any errors... maybe I had it misconfigured? |
@j0ashm If you're on the
After linking the plugin & config in, I essentially ran |
75ac5e7
to
c97e515
Compare
7021000
to
94a5072
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple nitpicks, but overall LGTM. Running without problems locally
94a5072
to
13221ea
Compare
Fixes lint issues & adds relevant links/examples.
In additional to switching to `messageId`, additional lint rules are also added and followed.
Encountered when trying to use the plugin on a large code base.
Updates the minimum node version to 18 to address the EOL for security updates of Node 16 on 2023-09-11. Commands ran to update the `package*.json` files: ```console npm pkg set engines.node='>=18' npm install --package-lock-only ``` Also fixed audit issues with `npm audit fix`. Refs: https://nodejs.dev/en/about/releases/
The forked version is maintained.
Mainly for a better DX.
Added a lot more test cases and refactored the custom rule to be based on the core `brace-style` rule from ESLint.
Makes it easier to configure the plugin.
In addition to adding the config, lint issues were addressed.
Make sure `package.json` is used as the single source of truth for the package's name & version.
The plugin uses `context.souceCode` which was only recently added in May this year. If the version of the peer dependency isn't satisfied, the plugin breaks when the property is undefined. Refs: https://eslint.org/blog/2023/05/eslint-v8.40.0-released/#highlights
13221ea
to
0a75b56
Compare
Good change with the link, it's minor but better IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right
I didn't thoroughly test the plugin on a large code base, which led to spurious errors from the plugin failing to parse edge cases (e.g., failing to parse
const path = require('node:path');
). To address the issues, I decided to improve the testing DX by switching frommocha
tovitest
before moving on to tackling the issues.In addition to adding multiple test cases and CI checks, I opted to use https://github.com/eslint/eslint/blob/main/lib/rules/brace-style.js as a reference to modify it to fit the brace style of the company's style guide.