Last active
December 14, 2017 19:26
-
-
Save briangonzalez/9a2cbb8ac3840f7b8ee9a223e11348f7 to your computer and use it in GitHub Desktop.
Revisions
-
briangonzalez revised this gist
Dec 14, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ const checkAndReport (token, correct, context) { if (token.toLowerCase().includes(correct.toLowerCase()) && !token.includes(correct))) { context.report(node, `The standard variable casing is "${correct}", not ${node.id.name}`); } } -
briangonzalez created this gist
Dec 14, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ const checkAndReport (token, correct, context) { if (token.toLowerCase().includes(correct.toLowerCase() && !token.includes(correct))) { context.report(node, `The standard variable casing is "${correct}", not ${node.id.name}`); } } module.exports.rules = { "paypal-casing": context => ({ VariableDeclarator: (node) => { checkAndReport(node.id.name, 'Paypal', context) } }), "braintree-casing": context => ({ VariableDeclarator: (node) => { checkAndReport(node.id.name, 'Braintree', context) } }) };