-
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
fix(linter): Generator creating .eslintrc.json at the root path even when .eslintrc.js already exist #10080
Conversation
…ating file Underscore is a character usually used for sorting purposes and is absolutely legit. There is no reason to replace it. ISSUES CLOSED: nrwl#8875
…when .eslintrc.js
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Hello ! I don't unterstand why main-linux failed, could you help me with it ? |
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.
Thank you for your contribution! LGTM 🎉
Warning, eslintrc.js
files likely won't be migrated if we make any changes to the config. But in eslint
case, I don't think it will be often.
} | ||
} | ||
// Default file | ||
return 'eslintrc.json'; |
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.
@AloisH @FrozenPandaz I know this has already been merged, but why wasn't this .eslintrc.json
?
It has changed the behaviour inside of packages/linter/src/generators/lint-project/lint-project.ts
above
eslintrc.json
without a leading dot is not ever referenced by https://eslint.org/docs/user-guide/configuring/configuration-files.
This seems to be intentional because you have multiple unit tests asserting this, but I haven't understood why we would want to make this change?
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.
Hello @JamesHenry ! I think I made a mistake ! Thank you for noticing it !
I got one test trying it but I think I just forgot to put a dot.
Should we revert this PR so I can make a new commit fixing it ?
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.
Unless @FrozenPandaz disagrees I think a fast follow on PR would be ok, if will you have chance to do that today?
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.
No worries, I'll follow up with a fix. 👍
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. |
Don't create an .eslintrc.json at the root path when .eslintrc.js already exist
ISSUE CLOSED: #7791
Current Behavior
When creating a lib/app and having a .eslintrc.js at the root path, nx still create a .eslintrc.json.
Expected Behavior
Don't create a .eslintrc.json and extend from .eslintrc.js instead of .eslintrc.json
Related Issue(s)
Fixes #7791