-
Notifications
You must be signed in to change notification settings - Fork 21
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
Lint everything else #116
Lint everything else #116
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,18 +47,9 @@ | |
], | ||
"prettier": true, | ||
"rules": { | ||
"camelcase": "off", | ||
"ava/no-import-test-files": "off", | ||
"ava/no-invalid-end": "off", | ||
"ava/no-skip-test": "off", | ||
"ava/no-statement-after-end": "off", | ||
"eqeqeq": "off", | ||
"no-useless-call": "off", | ||
"no-var": "off", | ||
"prefer-rest-params": "off", | ||
"prefer-spread": "off", | ||
"unicorn/explicit-length-check": "off", | ||
"unicorn/prevent-abbreviations": "off" | ||
"ava/no-todo-test": "off", | ||
"camelcase": "off" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Due to GitHub’s API |
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,41 +73,43 @@ test.cb('should not delete a fork that has more branches', (t) => { | |
}); | ||
}); | ||
|
||
// Currently our logic does not delete this fork | ||
test.skip('should delete a fork that has more branches, but all at upstream branch tips', (t) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hecks knows, I don’t remember why it works. Perhaps I had added the functionality afterwards and forgot to enable the test? Weird. |
||
const mock = lib.mock({ | ||
listBranches(arguments_) { | ||
if (arguments_.user === lib.USER.login) { | ||
test.cb( | ||
'should delete a fork that has more branches, but all at upstream branch tips', | ||
Comment on lines
+76
to
+77
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. eslint strangely formats this. If the At first I thought it’s due to the line length, but no, even in the PR diff the shorter version is wrapped, and the longer isn’t. And, also, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That’s Prettier. Yeah I don’t like Prettier’s wrapping either 😉 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You’re right that it’s prettier! prettier/prettier#9285 |
||
(t) => { | ||
const mock = lib.mock({ | ||
listBranches(arguments_) { | ||
if (arguments_.user === lib.USER.login) { | ||
return [ | ||
{name: 'master', commit: lib.COMMIT_A}, | ||
{name: 'foo', commit: lib.COMMIT_A}, | ||
{name: 'bar', commit: lib.COMMIT_B} | ||
]; | ||
} | ||
|
||
return [ | ||
{name: 'master', commit: lib.COMMIT_A}, | ||
{name: 'foo', commit: lib.COMMIT_A}, | ||
{name: 'bar', commit: lib.COMMIT_B} | ||
{name: 'baz', commit: lib.COMMIT_B} | ||
]; | ||
} | ||
|
||
return [ | ||
{name: 'master', commit: lib.COMMIT_A}, | ||
{name: 'baz', commit: lib.COMMIT_B} | ||
]; | ||
}, | ||
delete: true | ||
}); | ||
}, | ||
delete: true | ||
}); | ||
|
||
removeGithubForks(mock.present, (error) => { | ||
if (error) return t.fail(error); | ||
lib.check(t, mock.calls(), [ | ||
['listForAuthenticatedUser', {type: 'public'}], | ||
['get', {owner: lib.USER.login, repo: 'fork1'}], | ||
['listBranches', {owner: lib.USER.login, repo: 'fork1', per_page: 100}], | ||
[ | ||
'listBranches', | ||
{owner: lib.AUTHOR.login, repo: 'upstream-lib', per_page: 100} | ||
], | ||
['delete', {owner: lib.USER.login, repo: 'fork1', url: undefined}] | ||
]); | ||
t.end(); | ||
}); | ||
}); | ||
removeGithubForks(mock.present, (error) => { | ||
if (error) return t.fail(error); | ||
lib.check(t, mock.calls(), [ | ||
['listForAuthenticatedUser', {type: 'public'}], | ||
['get', {owner: lib.USER.login, repo: 'fork1'}], | ||
['listBranches', {owner: lib.USER.login, repo: 'fork1', per_page: 100}], | ||
[ | ||
'listBranches', | ||
{owner: lib.AUTHOR.login, repo: 'upstream-lib', per_page: 100} | ||
], | ||
['delete', {owner: lib.USER.login, repo: 'fork1', url: undefined}] | ||
]); | ||
t.end(); | ||
}); | ||
} | ||
); | ||
|
||
test.cb( | ||
'should delete a fork that has all branches at upstream branch tips', | ||
|
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.
Until avajs/eslint-plugin-ava#311