Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-spellcheck

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-spellcheck - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

.idea/eslint-plugin-spellcheck.iml

2

coverage/coverage-final.json
{
"/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":32,"10":32,"11":29320,"12":1,"13":215,"14":1,"15":75,"16":69,"17":69,"18":25,"19":25,"20":22,"21":22,"22":1,"23":13,"24":12,"25":1,"26":27,"27":12,"28":1,"29":4,"30":4,"31":1,"32":48,"33":47,"34":1,"35":75,"36":1,"37":1,"38":235,"39":50,"40":185,"41":10,"42":5,"43":180,"44":32,"45":0,"46":0,"47":32},"b":{"1":[32,30],"2":[215,197],"3":[69,6],"4":[12,1],"5":[12,15],"6":[27,26],"7":[4,0],"8":[4,4],"9":[47,1],"10":[75,70],"11":[50,185],"12":[5,180],"13":[0,32]},"f":{"1":32,"2":32,"3":29320,"4":215,"5":75,"6":25,"7":22,"8":13,"9":27,"10":4,"11":48,"12":75,"13":1,"14":235,"15":10,"16":0},"fnMap":{"1":{"name":"isEslint4OrAbove","line":25,"loc":{"start":{"line":25,"column":0},"end":{"line":25,"column":35}}},"2":{"name":"(anonymous_2)","line":105,"loc":{"start":{"line":105,"column":12},"end":{"line":105,"column":30}}},"3":{"name":"(anonymous_3)","line":132,"loc":{"start":{"line":132,"column":17},"end":{"line":132,"column":35}}},"4":{"name":"isSpellingError","line":136,"loc":{"start":{"line":136,"column":8},"end":{"line":136,"column":40}}},"5":{"name":"checkSpelling","line":140,"loc":{"start":{"line":140,"column":8},"end":{"line":140,"column":59}}},"6":{"name":"(anonymous_6)","line":150,"loc":{"start":{"line":150,"column":28},"end":{"line":150,"column":44}}},"7":{"name":"(anonymous_7)","line":156,"loc":{"start":{"line":156,"column":29},"end":{"line":156,"column":45}}},"8":{"name":"checkComment","line":168,"loc":{"start":{"line":168,"column":8},"end":{"line":168,"column":37}}},"9":{"name":"checkLiteral","line":174,"loc":{"start":{"line":174,"column":8},"end":{"line":174,"column":36}}},"10":{"name":"checkTemplateElement","line":179,"loc":{"start":{"line":179,"column":8},"end":{"line":179,"column":44}}},"11":{"name":"checkIdentifier","line":185,"loc":{"start":{"line":185,"column":8},"end":{"line":185,"column":40}}},"12":{"name":"hasToSkip","line":191,"loc":{"start":{"line":191,"column":8},"end":{"line":191,"column":34}}},"13":{"name":"(anonymous_13)","line":193,"loc":{"start":{"line":193,"column":49},"end":{"line":193,"column":69}}},"14":{"name":"hasToSkipWord","line":204,"loc":{"start":{"line":204,"column":8},"end":{"line":204,"column":37}}},"15":{"name":"(anonymous_15)","line":206,"loc":{"start":{"line":206,"column":52},"end":{"line":206,"column":72}}},"16":{"name":"(anonymous_16)","line":220,"loc":{"start":{"line":220,"column":21},"end":{"line":220,"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":22,"column":6}},"4":{"start":{"line":25,"column":0},"end":{"line":27,"column":1}},"5":{"start":{"line":26,"column":2},"end":{"line":26,"column":32}},"6":{"start":{"line":29,"column":0},"end":{"line":235,"column":2}},"7":{"start":{"line":113,"column":8},"end":{"line":124,"column":39}},"8":{"start":{"line":125,"column":8},"end":{"line":128,"column":11}},"9":{"start":{"line":130,"column":8},"end":{"line":130,"column":30}},"10":{"start":{"line":131,"column":8},"end":{"line":134,"column":16}},"11":{"start":{"line":133,"column":16},"end":{"line":133,"column":44}},"12":{"start":{"line":136,"column":8},"end":{"line":138,"column":9}},"13":{"start":{"line":137,"column":12},"end":{"line":137,"column":72}},"14":{"start":{"line":140,"column":8},"end":{"line":166,"column":13}},"15":{"start":{"line":141,"column":12},"end":{"line":165,"column":17}},"16":{"start":{"line":143,"column":16},"end":{"line":146,"column":27}},"17":{"start":{"line":147,"column":16},"end":{"line":164,"column":23}},"18":{"start":{"line":153,"column":24},"end":{"line":153,"column":131}},"19":{"start":{"line":154,"column":24},"end":{"line":154,"column":72}},"20":{"start":{"line":157,"column":22},"end":{"line":157,"column":41}},"21":{"start":{"line":158,"column":24},"end":{"line":163,"column":27}},"22":{"start":{"line":168,"column":8},"end":{"line":172,"column":9}},"23":{"start":{"line":169,"column":12},"end":{"line":171,"column":13}},"24":{"start":{"line":170,"column":16},"end":{"line":170,"column":61}},"25":{"start":{"line":174,"column":8},"end":{"line":178,"column":9}},"26":{"start":{"line":175,"column":12},"end":{"line":177,"column":13}},"27":{"start":{"line":176,"column":16},"end":{"line":176,"column":60}},"28":{"start":{"line":179,"column":8},"end":{"line":183,"column":9}},"29":{"start":{"line":180,"column":12},"end":{"line":182,"column":13}},"30":{"start":{"line":181,"column":16},"end":{"line":181,"column":66}},"31":{"start":{"line":185,"column":8},"end":{"line":189,"column":9}},"32":{"start":{"line":186,"column":12},"end":{"line":188,"column":13}},"33":{"start":{"line":187,"column":16},"end":{"line":187,"column":63}},"34":{"start":{"line":191,"column":8},"end":{"line":196,"column":9}},"35":{"start":{"line":192,"column":12},"end":{"line":195,"column":19}},"36":{"start":{"line":194,"column":20},"end":{"line":194,"column":49}},"37":{"start":{"line":204,"column":8},"end":{"line":212,"column":9}},"38":{"start":{"line":205,"column":12},"end":{"line":205,"column":61}},"39":{"start":{"line":205,"column":48},"end":{"line":205,"column":61}},"40":{"start":{"line":206,"column":12},"end":{"line":210,"column":13}},"41":{"start":{"line":207,"column":16},"end":{"line":207,"column":44}},"42":{"start":{"line":209,"column":16},"end":{"line":209,"column":29}},"43":{"start":{"line":211,"column":12},"end":{"line":211,"column":24}},"44":{"start":{"line":216,"column":8},"end":{"line":223,"column":9},"skip":true},"45":{"start":{"line":217,"column":10},"end":{"line":222,"column":15},"skip":true},"46":{"start":{"line":221,"column":14},"end":{"line":221,"column":40},"skip":true},"47":{"start":{"line":225,"column":8},"end":{"line":233,"column":10}}},"branchMap":{"1":{"line":124,"type":"binary-expr","locations":[{"start":{"line":124,"column":15},"end":{"line":124,"column":27}},{"start":{"line":124,"column":31},"end":{"line":124,"column":38}}]},"2":{"line":137,"type":"binary-expr","locations":[{"start":{"line":137,"column":19},"end":{"line":137,"column":48}},{"start":{"line":137,"column":52},"end":{"line":137,"column":71}}]},"3":{"line":141,"type":"if","locations":[{"start":{"line":141,"column":12},"end":{"line":141,"column":12}},{"start":{"line":141,"column":12},"end":{"line":141,"column":12}}]},"4":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":12},"end":{"line":169,"column":12}},{"start":{"line":169,"column":12},"end":{"line":169,"column":12}}]},"5":{"line":175,"type":"if","locations":[{"start":{"line":175,"column":12},"end":{"line":175,"column":12}},{"start":{"line":175,"column":12},"end":{"line":175,"column":12}}]},"6":{"line":175,"type":"binary-expr","locations":[{"start":{"line":175,"column":15},"end":{"line":175,"column":30}},{"start":{"line":175,"column":34},"end":{"line":175,"column":65}}]},"7":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":12},"end":{"line":180,"column":12}},{"start":{"line":180,"column":12},"end":{"line":180,"column":12}}]},"8":{"line":180,"type":"binary-expr","locations":[{"start":{"line":180,"column":15},"end":{"line":180,"column":32}},{"start":{"line":180,"column":36},"end":{"line":180,"column":71}}]},"9":{"line":186,"type":"if","locations":[{"start":{"line":186,"column":12},"end":{"line":186,"column":12}},{"start":{"line":186,"column":12},"end":{"line":186,"column":12}}]},"10":{"line":192,"type":"binary-expr","locations":[{"start":{"line":192,"column":19},"end":{"line":192,"column":47}},{"start":{"line":193,"column":16},"end":{"line":195,"column":18}}]},"11":{"line":205,"type":"if","locations":[{"start":{"line":205,"column":12},"end":{"line":205,"column":12}},{"start":{"line":205,"column":12},"end":{"line":205,"column":12}}]},"12":{"line":206,"type":"if","locations":[{"start":{"line":206,"column":12},"end":{"line":206,"column":12}},{"start":{"line":206,"column":12},"end":{"line":206,"column":12}}]},"13":{"line":216,"type":"if","locations":[{"start":{"line":216,"column":8},"end":{"line":216,"column":8},"skip":true},{"start":{"line":216,"column":8},"end":{"line":216,"column":8},"skip":true}]}},"l":{"2":1,"5":1,"9":1,"25":1,"26":32,"29":1,"113":32,"125":32,"130":32,"131":32,"133":29320,"136":1,"137":215,"140":1,"141":75,"143":69,"147":69,"153":25,"154":25,"157":22,"158":22,"168":1,"169":13,"170":12,"174":1,"175":27,"176":12,"179":1,"180":4,"181":4,"185":1,"186":48,"187":47,"191":1,"192":75,"194":1,"204":1,"205":235,"206":185,"207":10,"209":5,"211":180,"216":32,"217":1,"221":1,"225":32}}}
"/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}}}
{
"name": "eslint-plugin-spellcheck",
"version": "0.0.10",
"version": "0.0.11",
"description": "ESLint rules to spell check js files",

@@ -15,3 +15,3 @@ "main": "index.js",

},
"homepage": "https://github.com/sotaduy/eslint-plugin-spellcheck",
"homepage": "https://github.com/aotaduy/eslint-plugin-spellcheck",
"scripts": {

@@ -18,0 +18,0 @@ "test": "gulp",

@@ -10,3 +10,4 @@ // Native modules

var spell = new Spellchecker(),
dictionary,
dictionary = null,
dictionaryLang,
skipWords = lodash.union(

@@ -126,8 +127,9 @@ lodash.keys(globals.builtin),

lang = options.lang || 'en_US';
dictionary = spell.parse({
aff: fs.readFileSync(__dirname + '/utils/dicts/' + lang + '.aff'),
dic: fs.readFileSync(__dirname + '/utils/dicts/' + lang + '.dic')
});
spell.use(dictionary);
if (dictionaryLang !== lang) { //Dictionary will only be initialized if changed
dictionaryLang = lang;
initializeDictionary(lang);
}
options.skipWords = new Set(lodash.union(options.skipWords, skipWords)

@@ -138,2 +140,11 @@ .map(function (string) {

function initializeDictionary(language) {
dictionary = spell.parse({
aff: fs.readFileSync(__dirname + '/utils/dicts/' + language + '.aff'),
dic: fs.readFileSync(__dirname + '/utils/dicts/' + language + '.dic')
});
spell.use(dictionary);
}
function isSpellingError(aWord) {

@@ -160,3 +171,2 @@ return !options.skipWords.has(aWord) && !spell.check(aWord);

.forEach(function(aWord) {
console.log(aWord);
context.report(

@@ -217,3 +227,3 @@ aNode,

}
// Coverage exclusion only needed for ESLint<4

@@ -229,3 +239,3 @@ /* istanbul ignore next */

}
return {

@@ -232,0 +242,0 @@ // Noop in ESLint 4+

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc