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

Commit

Permalink
Merge pull request #107 from atom/mb-config-schema-in-package-json
Browse files Browse the repository at this point in the history
Move config schema to package.json
  • Loading branch information
Max Brunsfeld committed Feb 12, 2016
2 parents fde38b3 + f25506f commit 31ab2d4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
25 changes: 0 additions & 25 deletions lib/main.coffee
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
Whitespace = require './whitespace'

module.exports =
config:
removeTrailingWhitespace:
type: 'boolean'
default: true
scopes:
'.source.jade':
default: false
description: 'Automatically remove whitespace characters at ends of lines when the buffer is saved. To disable/enable for a certain language, use [syntax-scoped properties](https://github.com/atom/whitespace#readme) in your `config.cson`.'
keepMarkdownLineBreakWhitespace:
type: 'boolean'
default: true
description: 'Markdown uses two or more spaces at the end of a line to signify a line break. Enable this option to keep this whitespace in Markdown files, even if other settings would remove it.'
ignoreWhitespaceOnCurrentLine:
type: 'boolean'
default: true
description: 'Skip removing trailing whitespace on the line which the cursor is positioned on when the buffer is saved. To disable/enable for a certain language, use [syntax-scoped properties](https://github.com/atom/whitespace#readme) in your `config.cson`.'
ignoreWhitespaceOnlyLines:
type: 'boolean'
default: false
description: 'Skip removing trailing whitespace on lines which consist only of whitespace characters. To disable/enable for a certain language, use [syntax-scoped properties](https://github.com/atom/whitespace#readme) in your `config.cson`.'
ensureSingleTrailingNewline:
type: 'boolean'
default: true
description: 'If the buffer doesn\'t end with a newline character when it\'s saved, then append one. If it ends with more than one newline, remove all but one. To disable/enable for a certain language, use [syntax-scoped properties](https://github.com/atom/whitespace#readme) in your `config.cson`.'

activate: ->
@whitespace = new Whitespace()

Expand Down
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,38 @@
"fs-plus": "2.x",
"temp": "~0.8.1"
},
"configSchema": {
"removeTrailingWhitespace": {
"type": "boolean",
"default": true,
"scopes": {
".source.jade": {
"default": false
}
},
"description": "Automatically remove whitespace characters at ends of lines when the buffer is saved. To disable/enable for a certain language, use [syntax-scoped properties](https://github.com/atom/whitespace#readme) in your `config.cson`."
},
"keepMarkdownLineBreakWhitespace": {
"type": "boolean",
"default": true,
"description": "Markdown uses two or more spaces at the end of a line to signify a line break. Enable this option to keep this whitespace in Markdown files, even if other settings would remove it."
},
"ignoreWhitespaceOnCurrentLine": {
"type": "boolean",
"default": true,
"description": "Skip removing trailing whitespace on the line which the cursor is positioned on when the buffer is saved. To disable/enable for a certain language, use [syntax-scoped properties](https://github.com/atom/whitespace#readme) in your `config.cson`."
},
"ignoreWhitespaceOnlyLines": {
"type": "boolean",
"default": false,
"description": "Skip removing trailing whitespace on lines which consist only of whitespace characters. To disable/enable for a certain language, use [syntax-scoped properties](https://github.com/atom/whitespace#readme) in your `config.cson`."
},
"ensureSingleTrailingNewline": {
"type": "boolean",
"default": true,
"description": "If the buffer doesn't end with a newline character when it's saved, then append one. If it ends with more than one newline, remove all but one. To disable/enable for a certain language, use [syntax-scoped properties](https://github.com/atom/whitespace#readme) in your `config.cson`."
}
},
"devDependencies": {
"coffeelint": "^1.9.7"
}
Expand Down

0 comments on commit 31ab2d4

Please sign in to comment.