eslint-plugin-tidal-extras
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "eslint-plugin-tidal-extras", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "", | ||
"main": "index.js", | ||
"author": "Jeremy Karlsson <jeremy.karlsson@tidal.com>", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "mocha test" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^3.0", | ||
"mocha": "^2.3.4" | ||
} | ||
} |
module.exports = { | ||
create: function (context) { | ||
return { | ||
MemberExpression (node) { | ||
if (node.property.name === 'get' && node.property.value === 'artist') { | ||
ExpressionStatement (node) { | ||
const isCallExpression = node.expression.type === 'CallExpression'; | ||
const isMemberExperssion = node.expression.callee.type === 'MemberExpression'; | ||
const callingGet = node.expression.callee.property.name === 'get'; | ||
const callingWithArist = node.expression.arguments[0].value === 'artist'; | ||
if (callingGet && callingWithArist) { | ||
context.report(node, 'Don\'t use get(\'artist\'), it\'s deprecated. Use helpers.getMainArtist() instead.'); | ||
@@ -7,0 +14,0 @@ } |
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
1632
6
46
2