Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit ccdc333

Browse files
committed
Move config schema to package.json
1 parent a00c770 commit ccdc333

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

lib/main.coffee

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@ SpellCheckView = null
22
spellCheckViews = {}
33

44
module.exports =
5-
config:
6-
grammars:
7-
type: 'array'
8-
default: [
9-
'source.asciidoc'
10-
'source.gfm'
11-
'text.git-commit'
12-
'text.plain'
13-
'text.plain.null-grammar'
14-
]
15-
description: 'List of scopes for languages which will be checked for misspellings. See [the README](https://github.com/atom/spell-check#spell-check-package-) for more information on finding the correct scope for a specific language.'
16-
175
activate: ->
186
@commandSubscription = atom.commands.add 'atom-workspace',
197
'spell-check:toggle': => @toggle()

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@
1313
"engines": {
1414
"atom": "*"
1515
},
16+
"configSchema": {
17+
"grammars": {
18+
"type": "array",
19+
"default": [
20+
"source.asciidoc",
21+
"source.gfm",
22+
"text.git-commit",
23+
"text.plain",
24+
"text.plain.null-grammar"
25+
],
26+
"description": "List of scopes for languages which will be checked for misspellings. See [the README](https://github.com/atom/spell-check#spell-check-package-) for more information on finding the correct scope for a specific language."
27+
}
28+
},
1629
"devDependencies": {
1730
"coffeelint": "^1.9.7"
1831
}

spec/spell-check-spec.coffee

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ describe "Spell check", ->
1616
waitsForPromise ->
1717
atom.packages.activatePackage('language-javascript')
1818

19-
runs ->
20-
atom.config.set('spell-check.grammars', [])
21-
2219
waitsForPromise ->
2320
atom.workspace.open('sample.js')
2421

2522
waitsForPromise ->
2623
atom.packages.activatePackage('spell-check').then ({mainModule}) ->
2724
spellCheckModule = mainModule
2825

26+
runs ->
27+
atom.config.set('spell-check.grammars', [])
28+
2929
runs ->
3030
jasmine.attachToDOM(workspaceElement)
3131
editor = atom.workspace.getActiveTextEditor()
@@ -102,7 +102,7 @@ describe "Spell check", ->
102102
editor.setText('notaword')
103103
advanceClock(editor.getBuffer().getStoppedChangingDelay())
104104
atom.config.set('spell-check.grammars', ['source.js'])
105-
105+
106106
misspellingMarkers = null
107107
waitsFor ->
108108
misspellingMarkers = getMisspellingMarkers()

0 commit comments

Comments
 (0)