Socket
Socket
Sign inDemoInstall

eslint-plugin-spellcheck

Package Overview
Dependencies
3
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.6 to 0.0.7

rules/utils/dicts/en_GB.aff

1

index.js

@@ -13,2 +13,3 @@ (function(){

identifiers: true,
lang: 'en_US',
skipWords: [

@@ -15,0 +16,0 @@ 'dict',

2

package.json
{
"name": "eslint-plugin-spellcheck",
"version": "0.0.6",
"version": "0.0.7",
"description": "ESLint rules to spell check js files",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,6 +5,3 @@ var lodash = require('lodash'),

spell = new Spellchecker(),
dictionary = spell.parse({
aff: fs.readFileSync(__dirname + '/utils/dicts/en_US.aff'),
dic: fs.readFileSync(__dirname + '/utils/dicts/en_US.dic')
}),
dictionary,
globals = require('globals'),

@@ -21,4 +18,2 @@ skipWords = lodash.union(

spell.use(dictionary);
module.exports = function(context) {

@@ -34,3 +29,12 @@ 'use strict';

},
options = lodash.assign(defaultOptions, context.options[0]);
options = lodash.assign(defaultOptions, context.options[0]),
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);
options.skipWords = lodash.union(options.skipWords, skipWords)

@@ -37,0 +41,0 @@ .map(function (string) {

@@ -81,2 +81,15 @@ //------------------------------------------------------------------------------

{ message: 'You have a misspelled word: srting on String'}]
},
{
code: 'var a = 1 // colour cheque behaviour tsih',
args:[2, {lang: 'en_GB', skipWords: ['dict']}],
errors: [
{ message: 'You have a misspelled word: tsih on Comment'}]
},
{
code: 'var a = 1 // color is a comment behavior dict',
args:[2, {lang: 'en_GB', skipWords: ['dict']}],
errors: [
{ message: 'You have a misspelled word: color on Comment'},
{ message: 'You have a misspelled word: behavior on Comment'}]
}

@@ -83,0 +96,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc