Class: Beautifiers
Defined in: | src/beautifiers/index.coffee |
Inherits: | EventEmitter |
Overview
Register all supported beautifiers
Variables Summary
- beautifierNames =
-
['uncrustify', 'autopep8', 'coffee-formatter', 'coffee-fmt', 'clang-format', 'dfmt', 'elm-format', 'htmlbeautifier', 'csscomb', 'gherkin', 'gofmt', 'fortran-beautifier', 'js-beautify', 'jscs', 'perltidy', 'php-cs-fixer', 'phpcbf', 'prettydiff', 'puppet-fix', 'remark', 'rubocop', 'ruby-beautify', 'rustfmt', 'sqlformat', 'stylish-haskell', 'tidy-markdown', 'typescript-formatter', 'yapf', 'erl_tidy']
List of beautifier names
To register a beautifier add its name here
- beautifiers =
-
null
List of loaded beautifiers
Autogenerated in
constructor
frombeautifierNames
- options =
-
null
All beautifier options
Autogenerated in
constructor
- findFileResults =
-
{}
Instance Method Summary
- # (void) buildOptionsForBeautifiers(beautifiers)
- # (void) encodeURI(str) From https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130
- # (void) getBeautifiers(language)
- # (void) getBeautifierForLanguage(language)
- # (void) getLanguage(grammar, filePath)
- # (void) getOptionsForLanguage(allOptions, language)
- # (void) transformOptions(beautifier, languageName, options)
- # (void) beautify(text, allOptions, grammar, filePath, {onSave} = {})
- # (void) getUserHome() CLI
- # (void) verifyExists(fullPath)
-
#
(void)
findFile(name, dir, upwards = true)
Storage for memoized results from find file Should prevent lots of directory traversal & lookups when liniting an entire project
- # (void) findConfig(config, file, upwards = true) Tries to find a configuration file in either project directory or in the home directory.
- # (void) getConfigOptionsFromSettings(langs)
- # (void) getConfig(startPath, upwards = true) Look for .jsbeautifierrc in file and home path, check env variables
- # (void) getOptionsForPath(editedFilePath, editor)
- # (void) isNestedOptions(currOptions)
- # (void) getOptions(selections, allOptions) Bound
Constructor Details
#
(void)
constructor()
Constructor
Instance Method Details
#
(void)
buildOptionsForBeautifiers(beautifiers)
#
(void)
encodeURI(str)
#
(void)
getBeautifiers(language)
#
(void)
getBeautifierForLanguage(language)
#
(void)
getLanguage(grammar, filePath)
#
(void)
getOptionsForLanguage(allOptions, language)
#
(void)
transformOptions(beautifier, languageName, options)
#
(void)
beautify(text, allOptions, grammar, filePath, {onSave} = {})
#
(void)
getUserHome()
CLI
#
(void)
verifyExists(fullPath)
#
(void)
findFile(name, dir, upwards = true)
Storage for memoized results from find file Should prevent lots of directory traversal & lookups when liniting an entire project
#
(void)
findConfig(config, file, upwards = true)
Tries to find a configuration file in either project directory or in the home directory. Configuration files are named '.jsbeautifyrc'.
@returns {string} a path to the config file
#
(void)
getConfigOptionsFromSettings(langs)
#
(void)
getConfig(startPath, upwards = true)
Look for .jsbeautifierrc in file and home path, check env variables
#
(void)
getOptionsForPath(editedFilePath, editor)
#
(void)
isNestedOptions(currOptions)
#
(void)
getOptions(selections, allOptions)
Bound