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
feat(linter): add support for workspace rules #6859
feat(linter): add support for workspace rules #6859
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/4zYEakep3DoVM3r42AgRQ5AesGos |
Nx Cloud ReportCI ran the following commands for commit 0689800. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch Sent with 💌 from NxCloud. |
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.
Webstorm doesn't seem to be picking up when I make changes to the local rule 🤔
This is really great to see! Right now we've been writing custom eslint rules as a library, but it's kind of clunky to wire it up to eslint. With this way it doesn't look like there's a way to write tests for custom lint rules though, is this something that could be added? (the same problem exists for writing custom generators) |
Thanks @mattlewis92 it's a good call out, most workspaces will want to be able to test their lint rules programmatically as well as manually. @FrozenPandaz and I discussed it and I have extended the PR to have the eslint-rules be a full project on the project-graph and generate a valid jest test target, as well as generate a spec for every rule that is generated. |
Build failing because of #6900, not related to this PR |
Amazing, thank you so much!! 🙌 |
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.
Can we also add an e2e
test for this please?
packages/linter/src/generators/workspace-rules-project/workspace-rules-project.ts
Outdated
Show resolved
Hide resolved
packages/linter/src/generators/workspace-rule/workspace-rule.ts
Outdated
Show resolved
Hide resolved
Thanks @FrozenPandaz, ready for another look |
* feat(linter): add support for workspace rules * chore(linter): move deps to correct package * feat(linter): workspace-lint-rules as project with test target * chore(linter): tiny clean up * fix(linter): update generators.json after refactor * chore(linter): implement e2e test and PR feedback * docs(linter): update generator docs * docs(linter): update generator docs * docs(linter): update generator docs
* feat(linter): add support for workspace rules * chore(linter): move deps to correct package * feat(linter): workspace-lint-rules as project with test target * chore(linter): tiny clean up * fix(linter): update generators.json after refactor * chore(linter): implement e2e test and PR feedback * docs(linter): update generator docs * docs(linter): update generator docs * docs(linter): update generator docs
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #