-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
no-extraneous-deps globs don't also check against process.cwd() + glob
#602
Comments
Sounds like a good idea. The one point I'm not familiar with is whether using I think it would be more correct to replace Do you think that running ESLint not from the root folder is a sufficiently rare case to use cc @benmosher if you have time to give your opinion on this |
Yes, I don't think any command should ever be run anywhere except from the project root. There's a thread on eslint about locating the project root, and they concluded that process.cwd was best. |
Ok, that sounds good to me then. Help welcome! (cc @knpwrs, if you feel like helping out again 😄) |
@ljharb Can you link to that thread for reference? |
So... speaking of multiple I realize your situation is a single |
@knpwrs yes, that's the intention. nested eslintrc files would include the path relative to the project root, not to themselves |
Using process.cwd makes sense to me. A number of things already do this. It can cause problems with editor integration, but I think the workarounds in those cases are well understood. |
…ive filename. Fixes import-js#602.
…ive filename. Fixes import-js#602.
…ive filename. Fixes import-js#602.
…ive filename. Fixes import-js#602.
When using yarn, eslint is loading an older version of eslint-plugin-import, which causes problems in the current configuration. This commit fixes the problems by disabling the problem rule and adjusting the problem glob. See: yarnpkg/yarn#3332 And: import-js/eslint-plugin-import#602
I want to set my glob to
tests/**
, so that only the top-level "tests" dir can contain things that require dev deps.However, this rule compares against the full absolute path of the file, which includes the path to the project root - which isn't really useful, and forces people to start 100% of their globs with "**/".
I'd like the rule to check both against the full filename, and also against
path.join(process.cwd(), glob)
, to remove the need for this boilerplate in airbnb's shared config.The text was updated successfully, but these errors were encountered: