eslint-plugin-spellcheck
Advanced tools
Comparing version 0.0.11 to 0.0.13
{ | ||
"/Users/andres.otaduy/src/eslint-plugin-spellcheck/rules/spell-checker.js":{"path":"/Users/andres.otaduy/src/eslint-plugin-spellcheck/rules/spell-checker.js","s":{"1":1,"2":1,"3":1,"4":1,"5":32,"6":1,"7":32,"8":32,"9":2,"10":2,"11":32,"12":29320,"13":1,"14":2,"15":2,"16":1,"17":215,"18":1,"19":75,"20":69,"21":69,"22":25,"23":25,"24":22,"25":1,"26":13,"27":12,"28":1,"29":27,"30":12,"31":1,"32":4,"33":4,"34":1,"35":48,"36":47,"37":1,"38":75,"39":1,"40":1,"41":235,"42":50,"43":185,"44":10,"45":5,"46":180,"47":32,"48":0,"49":0,"50":32},"b":{"1":[32,30],"2":[2,30],"3":[215,197],"4":[69,6],"5":[12,1],"6":[12,15],"7":[27,26],"8":[4,0],"9":[4,4],"10":[47,1],"11":[75,70],"12":[50,185],"13":[5,180],"14":[0,32]},"f":{"1":32,"2":32,"3":29320,"4":2,"5":215,"6":75,"7":25,"8":22,"9":13,"10":27,"11":4,"12":48,"13":75,"14":1,"15":235,"16":10,"17":0},"fnMap":{"1":{"name":"isEslint4OrAbove","line":26,"loc":{"start":{"line":26,"column":0},"end":{"line":26,"column":35}}},"2":{"name":"(anonymous_2)","line":106,"loc":{"start":{"line":106,"column":12},"end":{"line":106,"column":30}}},"3":{"name":"(anonymous_3)","line":134,"loc":{"start":{"line":134,"column":17},"end":{"line":134,"column":35}}},"4":{"name":"initializeDictionary","line":138,"loc":{"start":{"line":138,"column":8},"end":{"line":138,"column":48}}},"5":{"name":"isSpellingError","line":147,"loc":{"start":{"line":147,"column":8},"end":{"line":147,"column":40}}},"6":{"name":"checkSpelling","line":151,"loc":{"start":{"line":151,"column":8},"end":{"line":151,"column":59}}},"7":{"name":"(anonymous_7)","line":161,"loc":{"start":{"line":161,"column":28},"end":{"line":161,"column":44}}},"8":{"name":"(anonymous_8)","line":167,"loc":{"start":{"line":167,"column":29},"end":{"line":167,"column":45}}},"9":{"name":"checkComment","line":178,"loc":{"start":{"line":178,"column":8},"end":{"line":178,"column":37}}},"10":{"name":"checkLiteral","line":184,"loc":{"start":{"line":184,"column":8},"end":{"line":184,"column":36}}},"11":{"name":"checkTemplateElement","line":189,"loc":{"start":{"line":189,"column":8},"end":{"line":189,"column":44}}},"12":{"name":"checkIdentifier","line":195,"loc":{"start":{"line":195,"column":8},"end":{"line":195,"column":40}}},"13":{"name":"hasToSkip","line":201,"loc":{"start":{"line":201,"column":8},"end":{"line":201,"column":34}}},"14":{"name":"(anonymous_14)","line":203,"loc":{"start":{"line":203,"column":49},"end":{"line":203,"column":69}}},"15":{"name":"hasToSkipWord","line":214,"loc":{"start":{"line":214,"column":8},"end":{"line":214,"column":37}}},"16":{"name":"(anonymous_16)","line":216,"loc":{"start":{"line":216,"column":52},"end":{"line":216,"column":72}}},"17":{"name":"(anonymous_17)","line":230,"loc":{"start":{"line":230,"column":21},"end":{"line":230,"column":44}},"skip":true}},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":23}},"2":{"start":{"line":5,"column":0},"end":{"line":7,"column":33}},"3":{"start":{"line":9,"column":0},"end":{"line":23,"column":6}},"4":{"start":{"line":26,"column":0},"end":{"line":28,"column":1}},"5":{"start":{"line":27,"column":2},"end":{"line":27,"column":32}},"6":{"start":{"line":30,"column":0},"end":{"line":245,"column":2}},"7":{"start":{"line":114,"column":8},"end":{"line":125,"column":39}},"8":{"start":{"line":128,"column":8},"end":{"line":131,"column":9}},"9":{"start":{"line":129,"column":12},"end":{"line":129,"column":34}},"10":{"start":{"line":130,"column":12},"end":{"line":130,"column":39}},"11":{"start":{"line":133,"column":8},"end":{"line":136,"column":16}},"12":{"start":{"line":135,"column":16},"end":{"line":135,"column":44}},"13":{"start":{"line":138,"column":8},"end":{"line":145,"column":9}},"14":{"start":{"line":139,"column":12},"end":{"line":142,"column":15}},"15":{"start":{"line":144,"column":12},"end":{"line":144,"column":34}},"16":{"start":{"line":147,"column":8},"end":{"line":149,"column":9}},"17":{"start":{"line":148,"column":12},"end":{"line":148,"column":72}},"18":{"start":{"line":151,"column":8},"end":{"line":176,"column":13}},"19":{"start":{"line":152,"column":12},"end":{"line":175,"column":17}},"20":{"start":{"line":154,"column":16},"end":{"line":157,"column":27}},"21":{"start":{"line":158,"column":16},"end":{"line":174,"column":23}},"22":{"start":{"line":164,"column":24},"end":{"line":164,"column":131}},"23":{"start":{"line":165,"column":24},"end":{"line":165,"column":72}},"24":{"start":{"line":168,"column":24},"end":{"line":173,"column":27}},"25":{"start":{"line":178,"column":8},"end":{"line":182,"column":9}},"26":{"start":{"line":179,"column":12},"end":{"line":181,"column":13}},"27":{"start":{"line":180,"column":16},"end":{"line":180,"column":61}},"28":{"start":{"line":184,"column":8},"end":{"line":188,"column":9}},"29":{"start":{"line":185,"column":12},"end":{"line":187,"column":13}},"30":{"start":{"line":186,"column":16},"end":{"line":186,"column":60}},"31":{"start":{"line":189,"column":8},"end":{"line":193,"column":9}},"32":{"start":{"line":190,"column":12},"end":{"line":192,"column":13}},"33":{"start":{"line":191,"column":16},"end":{"line":191,"column":66}},"34":{"start":{"line":195,"column":8},"end":{"line":199,"column":9}},"35":{"start":{"line":196,"column":12},"end":{"line":198,"column":13}},"36":{"start":{"line":197,"column":16},"end":{"line":197,"column":63}},"37":{"start":{"line":201,"column":8},"end":{"line":206,"column":9}},"38":{"start":{"line":202,"column":12},"end":{"line":205,"column":19}},"39":{"start":{"line":204,"column":20},"end":{"line":204,"column":49}},"40":{"start":{"line":214,"column":8},"end":{"line":222,"column":9}},"41":{"start":{"line":215,"column":12},"end":{"line":215,"column":61}},"42":{"start":{"line":215,"column":48},"end":{"line":215,"column":61}},"43":{"start":{"line":216,"column":12},"end":{"line":220,"column":13}},"44":{"start":{"line":217,"column":16},"end":{"line":217,"column":44}},"45":{"start":{"line":219,"column":16},"end":{"line":219,"column":29}},"46":{"start":{"line":221,"column":12},"end":{"line":221,"column":24}},"47":{"start":{"line":226,"column":8},"end":{"line":233,"column":9},"skip":true},"48":{"start":{"line":227,"column":10},"end":{"line":232,"column":15},"skip":true},"49":{"start":{"line":231,"column":14},"end":{"line":231,"column":40},"skip":true},"50":{"start":{"line":235,"column":8},"end":{"line":243,"column":10}}},"branchMap":{"1":{"line":125,"type":"binary-expr","locations":[{"start":{"line":125,"column":15},"end":{"line":125,"column":27}},{"start":{"line":125,"column":31},"end":{"line":125,"column":38}}]},"2":{"line":128,"type":"if","locations":[{"start":{"line":128,"column":8},"end":{"line":128,"column":8}},{"start":{"line":128,"column":8},"end":{"line":128,"column":8}}]},"3":{"line":148,"type":"binary-expr","locations":[{"start":{"line":148,"column":19},"end":{"line":148,"column":48}},{"start":{"line":148,"column":52},"end":{"line":148,"column":71}}]},"4":{"line":152,"type":"if","locations":[{"start":{"line":152,"column":12},"end":{"line":152,"column":12}},{"start":{"line":152,"column":12},"end":{"line":152,"column":12}}]},"5":{"line":179,"type":"if","locations":[{"start":{"line":179,"column":12},"end":{"line":179,"column":12}},{"start":{"line":179,"column":12},"end":{"line":179,"column":12}}]},"6":{"line":185,"type":"if","locations":[{"start":{"line":185,"column":12},"end":{"line":185,"column":12}},{"start":{"line":185,"column":12},"end":{"line":185,"column":12}}]},"7":{"line":185,"type":"binary-expr","locations":[{"start":{"line":185,"column":15},"end":{"line":185,"column":30}},{"start":{"line":185,"column":34},"end":{"line":185,"column":65}}]},"8":{"line":190,"type":"if","locations":[{"start":{"line":190,"column":12},"end":{"line":190,"column":12}},{"start":{"line":190,"column":12},"end":{"line":190,"column":12}}]},"9":{"line":190,"type":"binary-expr","locations":[{"start":{"line":190,"column":15},"end":{"line":190,"column":32}},{"start":{"line":190,"column":36},"end":{"line":190,"column":71}}]},"10":{"line":196,"type":"if","locations":[{"start":{"line":196,"column":12},"end":{"line":196,"column":12}},{"start":{"line":196,"column":12},"end":{"line":196,"column":12}}]},"11":{"line":202,"type":"binary-expr","locations":[{"start":{"line":202,"column":19},"end":{"line":202,"column":47}},{"start":{"line":203,"column":16},"end":{"line":205,"column":18}}]},"12":{"line":215,"type":"if","locations":[{"start":{"line":215,"column":12},"end":{"line":215,"column":12}},{"start":{"line":215,"column":12},"end":{"line":215,"column":12}}]},"13":{"line":216,"type":"if","locations":[{"start":{"line":216,"column":12},"end":{"line":216,"column":12}},{"start":{"line":216,"column":12},"end":{"line":216,"column":12}}]},"14":{"line":226,"type":"if","locations":[{"start":{"line":226,"column":8},"end":{"line":226,"column":8},"skip":true},{"start":{"line":226,"column":8},"end":{"line":226,"column":8},"skip":true}]}},"l":{"2":1,"5":1,"9":1,"26":1,"27":32,"30":1,"114":32,"128":32,"129":2,"130":2,"133":32,"135":29320,"138":1,"139":2,"144":2,"147":1,"148":215,"151":1,"152":75,"154":69,"158":69,"164":25,"165":25,"168":22,"178":1,"179":13,"180":12,"184":1,"185":27,"186":12,"189":1,"190":4,"191":4,"195":1,"196":48,"197":47,"201":1,"202":75,"204":1,"214":1,"215":235,"216":185,"217":10,"219":5,"221":180,"226":32,"227":1,"231":1,"235":32}}} | ||
} |
@@ -0,0 +0,0 @@ |
{ | ||
"name": "eslint-plugin-spellcheck", | ||
"version": "0.0.11", | ||
"version": "0.0.13", | ||
"description": "ESLint rules to spell check js files", | ||
@@ -28,9 +28,9 @@ "main": "index.js", | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.12", | ||
"coveralls": "^3.0.5", | ||
"eslint": "^3.2.2 || ^4.0.0", | ||
"gulp": "^3.9.1", | ||
"gulp-istanbul": "1.0.0", | ||
"gulp-mocha": "^3.0.0", | ||
"gulp": "^4.0.2", | ||
"gulp-istanbul": "^1.1.3", | ||
"gulp-mocha": "^6.0.0", | ||
"istanbul": "^0.4.4", | ||
"mocha": "3.0.2", | ||
"mocha": "^6.1.4", | ||
"shelljs": "^0.7.3", | ||
@@ -37,0 +37,0 @@ "shelljs-nodecli": "^0.1.1" |
@@ -129,1 +129,17 @@ # eslint-plugin-spellcheck | ||
``` | ||
## Skipping words ending with a number | ||
To skip words like md5, sha1 and sha256, add to `skipWords` the root of the word, that is, without the number: | ||
```json | ||
"rules": { | ||
"spellcheck/spell-checker": [1, | ||
{ | ||
"skipWords": [ | ||
"md", | ||
"sha" | ||
], | ||
} | ||
] | ||
} | ||
``` |
@@ -178,2 +178,8 @@ // Native modules | ||
function isInImportDeclaration( aNode ) { | ||
// @see https://buildmedia.readthedocs.org/media/pdf/esprima/latest/esprima.pdf | ||
return aNode.parent && | ||
(aNode.parent.type === 'ImportDeclaration' || aNode.parent.type === 'ExportDeclaration'); | ||
} | ||
function checkComment(aNode) { | ||
@@ -186,3 +192,3 @@ if(options.comments) { | ||
function checkLiteral(aNode){ | ||
if(options.strings && typeof aNode.value === 'string') { | ||
if(options.strings && typeof aNode.value === 'string' && !isInImportDeclaration(aNode)) { | ||
checkSpelling(aNode, aNode.value, 'String'); | ||
@@ -192,3 +198,3 @@ } | ||
function checkTemplateElement(aNode){ | ||
if(options.templates && typeof aNode.value.raw === 'string') { | ||
if(options.templates && typeof aNode.value.raw === 'string' && !isInImportDeclaration(aNode)) { | ||
checkSpelling(aNode, aNode.value.raw, 'Template'); | ||
@@ -195,0 +201,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
2041191
29
145
649