-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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): Support --print-config feature of ESLint #18260
feat(linter): Support --print-config feature of ESLint #18260
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
6fdb51a
to
1b6cb44
Compare
1b6cb44
to
11d35b1
Compare
Hi @tonyganchev, Thank you for creating this PR. The purpose of Printing out configuration doesn't need any of that and you can easily run it as Why would you need this as a parameter in the executor? |
@meeroslav looking at the code I was under the impression that the nx plugin is invoking the ESLint API directly in In any case I have been hitting issues where running eslint on the command line yields different results from running nx lint e.g. some files don't seem to be selected in nx-orchestrated lint. I needed a way to determine if nx was modifying the ESLint configuration / ruleset or there was a different issue. Turns out the issue was incorrect file selection in the lint target definition in the project.json which I could only spot through manual inspection i.e. looked at the config and miraculously I spotted it :) Providing access to all capabilities of the orchestrated tools should be critical in helping developers troubleshoot integration issues, learn the nx tooling and therefore trust it. Best |
747881d
to
ff4dbd1
Compare
Thank you, @tonyganchev, for clarifying that. It makes more sense now, why one would need this flag supported in our executor. And yes, you are right; we use API, not CLI (that was a typo on my side, sorry for the confusion). |
Can you also add an E2E test, please, to https://github.com/tonyganchev/nx/blob/topic/tonyganchev/linter-print-config/e2e/linter/src/linter.test.ts that would test this flag? |
ff4dbd1
to
4b42029
Compare
7cb9040
to
28477e5
Compare
28477e5
to
12d1809
Compare
dc42b58
to
8b1a7a6
Compare
8b1a7a6
to
94d1bfe
Compare
94d1bfe
to
42cd1fc
Compare
Certainly. The latest version now includes a test for this. |
The change introduces a new option to the linter plugin schema: `printConfig`, accepting a file name for which the plugin to output its applicable ESLint configuration. !fixup feat(linter): re-submitting documentation
42cd1fc
to
dca8c39
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.
Looks good to me. Thanks!
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. |
The change introduces a new option to the linter plugin schema:
printConfig
, accepting a file name for which the plugin to output its applicable ESLint configuration.Current Behavior
There is no support for
--print-config
.Expected Behavior
When
--printConfig
is passed on the command line as a parameter tonx lint ...
orprintConfig
is specified in the project.json the linter will show the effective ESLint configuration applicable to the specified file and not proceed with linting the project. Operation would complete successfully.Related Issue(s)
none
Fixes #