eslint-plugin-spellcheck
Advanced tools
Comparing version 0.0.16 to 0.0.17
{ | ||
"name": "eslint-plugin-spellcheck", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "ESLint rules to spell check js files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -28,2 +28,3 @@ # eslint-plugin-spellcheck | ||
"spellcheck/spell-checker": ["warn"] | ||
} | ||
@@ -160,1 +161,3 @@ 4. You can also configure these rules in your `.eslintrc`. All rules defined in this plugin have to be prefixed by 'spellcheck/' | ||
``` | ||
Please contact me with any issues on github or check my blog (spanish) [Area 204](https://aotaduy.github.io/area204/) |
@@ -7,4 +7,11 @@ // Native modules | ||
Spellchecker = require('hunspell-spellchecker'), | ||
globals = require('globals'); | ||
globals = require('globals'), | ||
defaultSettings = require('./defaultSettings'); | ||
function getGloabalsSkipsWords() { | ||
return lodash.keys(globals).map(function (each) { | ||
return lodash.keys(globals[each]) | ||
}); | ||
} | ||
var spell = new Spellchecker(), | ||
@@ -14,9 +21,4 @@ dictionary = null, | ||
skipWords = lodash.union( | ||
lodash.keys(globals.builtin), | ||
lodash.keys(globals.browser), | ||
lodash.keys(globals.node), | ||
lodash.keys(globals.mocha), | ||
lodash.keys(globals.jasmine), | ||
lodash.keys(globals.jquery), | ||
lodash.keys(globals.shelljs), | ||
...getGloabalsSkipsWords(), | ||
defaultSettings.skipWords, | ||
Object.getOwnPropertyNames(String.prototype), | ||
@@ -27,2 +29,3 @@ Object.getOwnPropertyNames(JSON), | ||
// ESLint 3 had "eslint.version" in context. ESLint 4 does not have one. | ||
@@ -145,2 +148,4 @@ function isEslint4OrAbove(context) { | ||
options.skipIfMatch = lodash.union(options.skipIfMatch, defaultSettings.skipIfMatch); | ||
function initializeDictionary(language) { | ||
@@ -147,0 +152,0 @@ dictionary = spell.parse({ |
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
2563978
14
541
162