eslint-plugin-ban
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -12,6 +12,2 @@ { | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
@@ -18,0 +14,0 @@ "error", |
@@ -154,6 +154,4 @@ /** | ||
CallExpression(node){ | ||
if (node.callee.type === IDENTIFIER_TOKEN) { | ||
const foundRule = findRuleByFunction(node.callee.name); | ||
if (foundRule) report(node, foundRule); | ||
@@ -170,3 +168,3 @@ return; | ||
if (foundRule) report(node, foundRule); | ||
if (foundRule) report(node.callee, foundRule); | ||
return; | ||
@@ -173,0 +171,0 @@ } |
{ | ||
"name": "eslint-plugin-ban", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Allows you to bannish some methods or functions.", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/remithomas/eslint-plugin-ban" | ||
}, | ||
"keywords": [ | ||
@@ -29,3 +33,3 @@ "eslint", | ||
"husky": "^1.3.1", | ||
"mocha": "^6.0.1" | ||
"mocha": "^6.2.0" | ||
}, | ||
@@ -32,0 +36,0 @@ "husky": { |
@@ -161,1 +161,28 @@ /** | ||
}); | ||
const singleLine = [{'name': ['it', 'only'], 'message': 'Don\'t use `it.only`'}]; | ||
ruleTester.run('should ban single line', rule, { | ||
valid: [ | ||
{ | ||
code: 'hello.it("dogs");', | ||
options: singleLine, | ||
} | ||
], | ||
invalid: [ | ||
// Ban method | ||
{ | ||
code: [ | ||
'it.only("does abc", function(){', | ||
'my.only();', | ||
'})' | ||
].join('\n'), | ||
errors: [{ | ||
message: 'Don\'t use `it.only`', | ||
line: 1, | ||
endLine: 1, | ||
}], | ||
options: singleLine | ||
}, | ||
] | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
15431
358
0