-
-
Notifications
You must be signed in to change notification settings - Fork 301
find and use overrides opts in lintText #130
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
Conversation
index.js
Outdated
| var overrides = opts.overrides; | ||
| delete opts.overrides; | ||
|
|
||
| var filename = path.relative(opts.cwd || process.cwd(), opts.filename); |
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.
You don't need || process.cwd(). The cwd option already defaults to that.
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.
Why are you making the path relative?
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.
findApplicableOverrides needs the path to be relative in order to... find the applicable overrides.
|| process.cwd() removed. Thanks. I probably only read enough of options-manager to get it working.
|
Sorry, totally forgot about this one. Generally looks good. Hard to review without tests though. |
| "rules": { | ||
| "import/no-extraneous-dependencies": 0 | ||
| "import/no-extraneous-dependencies": 0, | ||
| "ava/no-ignored-test-files": 0 |
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.
I had to ignore this since this is a package inside of the fixtures folder anyways, and so it triggered. It probably wouldn't be worth it to fix ava/no-ignored-test-files just for this.
|
@jamestalmage LGTY? |
|
I did a bit of a refactor so that instead of grouping, and then working backwards from the group, it just merges in the applicable overrides directly. |
|
@forivall Sorry again for slow response... Looks great! I'll merge right away if you could fix the merge conflict. |
|
@sindresorhus Conflicts were trivial. Updated, and pending CI! |
|
Yay! Thank you @forivall :) 🍰 for you. |
fixes sindresorhus/atom-linter-xo#20
This was really annoying me.