Socket
Book a DemoInstallSign in
Socket

linter-spell-word-list

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linter-spell-word-list

Helper classes to assist in implementation of linter-spell (Atom) dictionaries based on word lists.

Source
npmnpm
Version
0.3.1
Version published
Weekly downloads
2
-50%
Maintainers
1
Weekly downloads
 
Created
Source

linter-spell-word-list

Helper classes to assist in implementation of linter-spell dictionaries based on word lists.

Usage

To implement a dictionary which stores its word list in Atom's configuration file use an implementation of provideDictionary like the following.

provideDictionary () {
  let a = new ConfigWordList({
    name: 'Plain Text',
    keyPath: 'linter-spell.plainTextWords',
    grammarScopes: [
      'text.plain',
      'text.plain.null-grammar'
    ]
  })
  this.disposables.add(a)
  return provideDictionary()
}

To store the word list elsewhere you will need to derive a class from WordList and implement getWords and addWord as shown below.

class MyWordList extends WordList {
  constructor (options) {
    super(options)
    this.words = []
  }

  getWords (textEditor, languages) {
    return this.words
  }

  addWord (textEditor, languages, word) {
    this.words.push(word)
  }
}

Keywords

linter-spell

FAQs

Package last updated on 28 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts