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

feat(linter): add support for workspace rules #6859

Merged
merged 11 commits into from Sep 1, 2021

Conversation

JamesHenry
Copy link
Collaborator

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Aug 26, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/4zYEakep3DoVM3r42AgRQ5AesGos
✅ Preview: https://nx-dev-git-fork-jameshenry-nx-local-workspace-lint-rules-nrwl.vercel.app

@JamesHenry JamesHenry marked this pull request as ready for review August 26, 2021 19:33
Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a 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 🤔

@mattlewis92
Copy link
Contributor

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)

@JamesHenry
Copy link
Collaborator Author

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.

@JamesHenry
Copy link
Collaborator Author

Build failing because of #6900, not related to this PR

@mattlewis92
Copy link
Contributor

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.

Amazing, thank you so much!! 🙌

Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a 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?

@JamesHenry
Copy link
Collaborator Author

Thanks @FrozenPandaz, ready for another look

docs/map.json Outdated Show resolved Hide resolved
@FrozenPandaz FrozenPandaz merged commit bafabb3 into nrwl:master Sep 1, 2021
sumitparakh pushed a commit to sumitparakh/nx that referenced this pull request Sep 1, 2021
* 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
@JamesHenry JamesHenry deleted the nx-local-workspace-lint-rules branch September 2, 2021 16:17
ManojBahuguna pushed a commit to ManojBahuguna/nx that referenced this pull request Sep 16, 2021
* 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
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants