Skip to content

Commit

Permalink
fix XO lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 16, 2016
1 parent d6eaa28 commit 7a828d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion rules/no-abusive-eslint-disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ module.exports = function (context) {
node.comments.forEach(function (comment) {
var value = comment.value.trim();
var res = disableRegex.exec(value);

if (res && // It is a eslint-disable comment
!res[2] // but it did not specify any rules
) {
context.report({
// Can't set it at the given location as the warning
// will be ignored due to the disable comment
loc: {line: 0, column: 0},
loc: {
line: 0,
column: 0
},
// So specify it in the message
message: 'Specify the rules you want to disable at line {{line}}:{{column}}',
data: comment.loc.start
Expand Down
2 changes: 1 addition & 1 deletion test/no-abusive-eslint-disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const ruleTester = avaRuleTester(test, {
}
});

const error = (message) => ({
const error = message => ({
ruleId: 'no-abusive-eslint-disable',
message
});
Expand Down

0 comments on commit 7a828d2

Please sign in to comment.