-
-
Notifications
You must be signed in to change notification settings - Fork 10
Disable rules when fixing on save #90
Disable rules when fixing on save #90
Conversation
139a49f
to
b62cbda
Compare
Can you bump XO here? |
1a693e2
to
ad73769
Compare
Done ! |
It seems there is an issue on the Travis build: I tried pretty everything I could think of to solve that issue, unsuccessfully... Maybe an environment variable mising due to the orga change? |
9644c52
to
ad73769
Compare
This can safely be ignored. FYI, the officially recommended CI scripts are located in https://github.com/atom/ci, although nobody has bothered to fix it there because it doesn't actually change anything. If you were curious, to fix this you need to add |
Thanks for the info! Really helpful. So I have to figure out why |
Took a look at the build, generally when You can probably get this output to show by changing |
Thanks! |
aba0091
to
9facd94
Compare
It failed :( https://travis-ci.org/xojs/atom-linter-xo/builds/342209740#L1859 Unfortunately I can't run |
6a0935f
to
87cf5b1
Compare
Fascinating, I can't get it to fail locally under any of the environments I have set up. The next step I would take would be to essentially stick the important parts of I can work on that tomorrow if you don't figure it out before hand. |
That's a good idea! I'll try that, but it's getting very late for me so it will have to wait until tomorrow as well. Any help is much appreciated! |
b404d06
to
f20d201
Compare
I imagine the day Travis decide to update their default Node version on their |
f20d201
to
886d7ef
Compare
Actually, the issue with If you want to use that image you just need to skip the |
Thanks for the info. So I guess I can use a Node image and if I override the |
886d7ef
to
7aaa558
Compare
Or not, it's back to 0 tests 😕. |
Yep I noticed as well... It's really weird... |
ah my bad, I renamed the test |
120231d
to
474c15a
Compare
Seems good now, the test are running now https://travis-ci.org/xojs/atom-linter-xo/builds/342474730#L540 |
Looks like a |
474c15a
to
53b94ba
Compare
Oops. It's fixed now. |
lib/fix.js
Outdated
return text => { | ||
return lint(editor)(text, {fix: true}) | ||
return (text, exclude) => { | ||
const fix = exclude ? report => exclude.indexOf(report.ruleId) === -1 : true; |
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.
indexOf
=> includes
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.
Done!
install: | ||
- curl -s -O https://raw.githubusercontent.com/atom/ci/master/build-package.sh | ||
- chmod u+x build-package.sh | ||
- ./build-package.sh |
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.
@wooorm FYI
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.
@sindresorhus Hmm? Do we need a change in atom-linter-xo?
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, I mean, we had to stop using wooorm/atom-travis
because it was no longer working.
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.
Oh sorry, I missed the context. That’s a pity! Thanks for letting me know. I’ll investigate it when I need to use it again as well 👍
This looks great. Thanks for helping us out @Arcanemagus :) |
When `xo` is used to fix on each save of a file commented out code lines get capitalized. See sindresorhus/atom-linter-xo#90 for more information.
Fix #89
Add a new config that allows to define rules that will not be automatically fixed when saving.
Set by default with capitalized-comments and no-only-test.
Errors will still be fixed when running the command
XO:Fix
.The test currently fails because an issue with deep-assign in XO. When passing the
fix
as a function,deep-assign
replaces it with{}
.Passing the option
{fix: () => {...}}
throughdeep-assign
results in{fix: {}}
.This is fixed by 4f4de13, but this commit is not released yet. As soon a new version of XO is released the tests will work.