Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Update for linter-spell-project
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed Aug 28, 2016
1 parent 3ddd443 commit da4feb6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class MyWordList extends WordList {
this.words = []
}

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

addWord (word) {
addWord (textEditor, languages, word) {
this.words.push(word)
}
}
Expand Down
10 changes: 5 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ export class WordList extends Disposable {
}
}

getWords () {
getWords (textEditor, languages) {
return []
}

checkWord (textEditor, languages, range) {
{
const text = textEditor.getTextInBufferRange(range)
for (const word of this.getWords()) {
for (const word of this.getWords(textEditor, languages)) {
if ((word.startsWith('!') && text === word.substring(1)) || text.toLowerCase() === word.toLowerCase()) {
return { isWord: true }
}
Expand All @@ -49,7 +49,7 @@ export class WordList extends Disposable {
}
}

addWord (word) {}
addWord (textEditor, languages, word) {}

provideDictionary () {
return this.provider
Expand All @@ -65,11 +65,11 @@ export class ConfigWordList extends WordList {
this.disposables.add(atom.config.onDidChange(this.keyPath, ({newValue}) => this.words = newValue))
}

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

addWord (word) {
addWord (textEditor, languages, word) {
atom.config.set(this.keyPath, _.concat(this.words, word))
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linter-spell-word-list",
"version": "0.2.0",
"version": "0.3.0",
"description": "Helper classes to assist in implementation of linter-spell (Atom) dictionaries based on word lists.",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit da4feb6

Please sign in to comment.