Merge pull request #2047 from szeck87/add-prettier
Add prettier beautifier and bracket_spacing option
This commit is contained in:
commit
26d8cf07ec
|
@ -1,6 +1,7 @@
|
||||||
# Next
|
# Next
|
||||||
- Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable
|
- Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable
|
||||||
- See [#601](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for tsx files
|
- See [#601](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for tsx files
|
||||||
|
- See [#1497](https://github.com/Glavin001/atom-beautify/issues/1497) and [#802](https://github.com/Glavin001/atom-beautify/issues/802)
|
||||||
|
|
||||||
# v0.30.9 (2017-11-22)
|
# v0.30.9 (2017-11-22)
|
||||||
- Fix [#1949](https://github.com/Glavin001/atom-beautify/issues/1949): Fix beautify on save when text has not changed.
|
- Fix [#1949](https://github.com/Glavin001/atom-beautify/issues/1949): Fix beautify on save when text has not changed.
|
||||||
|
|
17
README.md
17
README.md
|
@ -118,6 +118,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
|
||||||
| Perltidy | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://perltidy.sourceforge.net/ and follow the instructions. |
|
| Perltidy | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://perltidy.sourceforge.net/ and follow the instructions. |
|
||||||
| PHP-CS-Fixer | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [PHP-CS-Fixer (`php-cs-fixer`)](https://github.com/FriendsOfPHP/PHP-CS-Fixer) with `docker pull unibeautify/php-cs-fixer`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [PHP (`php`)](http://php.net/) by following http://php.net/manual/en/install.php<br/>2. Install [PHP-CS-Fixer (`php-cs-fixer`)](https://github.com/FriendsOfPHP/PHP-CS-Fixer) by following https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation<br/> |
|
| PHP-CS-Fixer | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [PHP-CS-Fixer (`php-cs-fixer`)](https://github.com/FriendsOfPHP/PHP-CS-Fixer) with `docker pull unibeautify/php-cs-fixer`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [PHP (`php`)](http://php.net/) by following http://php.net/manual/en/install.php<br/>2. Install [PHP-CS-Fixer (`php-cs-fixer`)](https://github.com/FriendsOfPHP/PHP-CS-Fixer) by following https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation<br/> |
|
||||||
| PHPCBF | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [PHPCBF (`phpcbf`)](https://github.com/squizlabs/PHP_CodeSniffer) with `docker pull unibeautify/phpcbf`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [PHP (`php`)](http://php.net/) by following http://php.net/manual/en/install.php<br/>2. Install [PHPCBF (`phpcbf`)](https://github.com/squizlabs/PHP_CodeSniffer) by following https://github.com/squizlabs/PHP_CodeSniffer#installation<br/> |
|
| PHPCBF | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [PHPCBF (`phpcbf`)](https://github.com/squizlabs/PHP_CodeSniffer) with `docker pull unibeautify/phpcbf`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [PHP (`php`)](http://php.net/) by following http://php.net/manual/en/install.php<br/>2. Install [PHPCBF (`phpcbf`)](https://github.com/squizlabs/PHP_CodeSniffer) by following https://github.com/squizlabs/PHP_CodeSniffer#installation<br/> |
|
||||||
|
| Prettier | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
| Pretty Diff | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
| Pretty Diff | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
| Pug Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
| Pug Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
| puppet-lint | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [puppet-lint (`puppet-lint`)](http://puppet-lint.com/) with `docker pull unibeautify/puppet-lint`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [puppet-lint (`puppet-lint`)](http://puppet-lint.com/) by following http://puppet-lint.com/<br/> |
|
| puppet-lint | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [puppet-lint (`puppet-lint`)](http://puppet-lint.com/) with `docker pull unibeautify/puppet-lint`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [puppet-lint (`puppet-lint`)](http://puppet-lint.com/) by following http://puppet-lint.com/<br/> |
|
||||||
|
@ -152,7 +153,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
|
||||||
| C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.cu`, `.c++`, `.hpp`, `.hxx`, `.h++`, `.cuh` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)**, [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
|
| C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.cu`, `.c++`, `.hpp`, `.hxx`, `.h++`, `.cuh` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)**, [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
|
||||||
| Crystal | `Crystal` |`.cr` | **[`Crystal`](http://crystal-lang.org)** |
|
| Crystal | `Crystal` |`.cr` | **[`Crystal`](http://crystal-lang.org)** |
|
||||||
| C# | `C#` |`.cs` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
|
| C# | `C#` |`.cs` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
|
||||||
| CSS | `CSS` |`.css` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
|
| CSS | `CSS` |`.css` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Prettier`](https://github.com/prettier/prettier), [`Pretty Diff`](https://github.com/prettydiff/prettydiff), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
|
||||||
| CSV | `CSV` |`.csv` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| CSV | `CSV` |`.csv` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| D | `D` |`.d` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)**, [`dfmt`](https://github.com/Hackerpilot/dfmt) |
|
| D | `D` |`.d` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)**, [`dfmt`](https://github.com/Hackerpilot/dfmt) |
|
||||||
| EJS | `EJS`, `JavaScript Template`, `HTML (Angular)` |`.ejs` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
| EJS | `EJS`, `JavaScript Template`, `HTML (Angular)` |`.ejs` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
||||||
|
@ -169,13 +170,13 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
|
||||||
| HTML | `HTML` |`.html` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
| HTML | `HTML` |`.html` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
||||||
| Jade | `Jade`, `Pug` |`.jade`, `.pug` | **[`Pug Beautify`](https://github.com/vingorius/pug-beautify)** |
|
| Jade | `Jade`, `Pug` |`.jade`, `.pug` | **[`Pug Beautify`](https://github.com/vingorius/pug-beautify)** |
|
||||||
| Java | `Java` |`.java` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
|
| Java | `Java` |`.java` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
|
||||||
| JavaScript | `JavaScript` |`.js` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`ESLint Fixer`](https://github.com/eslint/eslint), [`JSCS Fixer`](https://github.com/jscs-dev/node-jscs/), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
| JavaScript | `JavaScript` |`.js` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`ESLint Fixer`](https://github.com/eslint/eslint), [`JSCS Fixer`](https://github.com/jscs-dev/node-jscs/), [`Prettier`](https://github.com/prettier/prettier), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
||||||
| JSON | `JSON` |`.json` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
| JSON | `JSON` |`.json` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Prettier`](https://github.com/prettier/prettier), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
||||||
| JSX | `JSX`, `JavaScript (JSX)`, `Babel ES6 JavaScript`, `JavaScript with JSX` |`.jsx`, `.js` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`JS Beautify`](https://github.com/beautify-web/js-beautify) |
|
| JSX | `JSX`, `JavaScript (JSX)`, `Babel ES6 JavaScript`, `JavaScript with JSX` |`.jsx`, `.js` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`JS Beautify`](https://github.com/beautify-web/js-beautify) |
|
||||||
| LaTeX | `BibTeX`, `LaTeX`, `TeX` |`.bib`, `.tex`, `.sty`, `.cls`, `.dtx`, `.ins`, `.bbx`, `.cbx` | **[`Latex Beautify`](https://github.com/cmhughes/latexindent.pl)** |
|
| LaTeX | `BibTeX`, `LaTeX`, `TeX` |`.bib`, `.tex`, `.sty`, `.cls`, `.dtx`, `.ins`, `.bbx`, `.cbx` | **[`Latex Beautify`](https://github.com/cmhughes/latexindent.pl)** |
|
||||||
| LESS | `LESS` |`.less` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js) |
|
| LESS | `LESS` |`.less` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Prettier`](https://github.com/prettier/prettier) |
|
||||||
| Lua | `Lua` |`.lua`, `.ttslua` | **[`Lua beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/lua-beautifier/beautifier.coffee)** |
|
| Lua | `Lua` |`.lua`, `.ttslua` | **[`Lua beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/lua-beautifier/beautifier.coffee)** |
|
||||||
| Markdown | `GitHub Markdown` |`.markdown`, `.md` | **[`Tidy Markdown`](https://github.com/slang800/tidy-markdown)**, [`Remark`](https://github.com/wooorm/remark) |
|
| Markdown | `GitHub Markdown` |`.markdown`, `.md` | **[`Tidy Markdown`](https://github.com/slang800/tidy-markdown)**, [`Prettier`](https://github.com/prettier/prettier), [`Remark`](https://github.com/wooorm/remark) |
|
||||||
| Marko | `Marko` |`.marko` | **[`Marko Beautifier`](https://github.com/marko-js/marko-prettyprint)** |
|
| Marko | `Marko` |`.marko` | **[`Marko Beautifier`](https://github.com/marko-js/marko-prettyprint)** |
|
||||||
| Mustache | `HTML (Mustache)` |`.mustache` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
| Mustache | `HTML (Mustache)` |`.mustache` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
|
||||||
| Nginx | `nginx` |`.conf` | **[`Nginx Beautify`](https://github.com/denysvitali/nginxbeautify)** |
|
| Nginx | `nginx` |`.conf` | **[`Nginx Beautify`](https://github.com/denysvitali/nginxbeautify)** |
|
||||||
|
@ -192,7 +193,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
|
||||||
| Ruby | `Ruby`, `Ruby on Rails` |`.rb` | **[`Rubocop`](https://github.com/bbatsov/rubocop)**, [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) |
|
| Ruby | `Ruby`, `Ruby on Rails` |`.rb` | **[`Rubocop`](https://github.com/bbatsov/rubocop)**, [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) |
|
||||||
| Rust | `Rust` |`.rs`, `.rlib` | **[`rustfmt`](https://github.com/rust-lang-nursery/rustfmt)** |
|
| Rust | `Rust` |`.rs`, `.rlib` | **[`rustfmt`](https://github.com/rust-lang-nursery/rustfmt)** |
|
||||||
| Sass | `Sass` |`.sass` | **[`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax)** |
|
| Sass | `Sass` |`.sass` | **[`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax)** |
|
||||||
| SCSS | `SCSS` |`.scss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
|
| SCSS | `SCSS` |`.scss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Prettier`](https://github.com/prettier/prettier), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
|
||||||
| Spacebars | `Spacebars` | | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Spacebars | `Spacebars` | | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| SQL | `SQL (Rails)`, `SQL` |`.sql` | **[`sqlformat`](https://github.com/andialbrecht/sqlparse)** |
|
| SQL | `SQL (Rails)`, `SQL` |`.sql` | **[`sqlformat`](https://github.com/andialbrecht/sqlparse)** |
|
||||||
| SVG | `SVG` |`.svg` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| SVG | `SVG` |`.svg` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
|
@ -201,11 +202,11 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
|
||||||
| TSS | `TSS` |`.tss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| TSS | `TSS` |`.tss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| TSX | `TypeScriptReact` |`.tsx` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
|
| TSX | `TypeScriptReact` |`.tsx` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
|
||||||
| Twig | `HTML (Twig)` |`.twig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Twig | `HTML (Twig)` |`.twig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| TypeScript | `TypeScript` |`.ts` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
|
| TypeScript | `TypeScript` |`.ts` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)**, [`Prettier`](https://github.com/prettier/prettier) |
|
||||||
| UX Markup | `UX` |`.ux` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| UX Markup | `UX` |`.ux` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| Vala | `Vala` |`.vala`, `.vapi` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
|
| Vala | `Vala` |`.vala`, `.vapi` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
|
||||||
| Visualforce | `Visualforce` |`.page` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Visualforce | `Visualforce` |`.page` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| Vue | `Vue Component` |`.vue` | **[`Vue Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/vue-beautifier.coffee)** |
|
| Vue | `Vue Component` |`.vue` | **[`Vue Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/vue-beautifier.coffee)**, [`Prettier`](https://github.com/prettier/prettier) |
|
||||||
| XML | `SLD`, `XML`, `XHTML`, `XSD`, `XSL`, `JSP`, `GSP` |`.sld`, `.xml`, `.xhtml`, `.xsd`, `.xsl`, `.jsp`, `.gsp`, `.plist`, `.recipe`, `.config` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`JS Beautify`](https://github.com/beautify-web/js-beautify) |
|
| XML | `SLD`, `XML`, `XHTML`, `XSD`, `XSL`, `JSP`, `GSP` |`.sld`, `.xml`, `.xhtml`, `.xsd`, `.xsl`, `.jsp`, `.gsp`, `.plist`, `.recipe`, `.config` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`JS Beautify`](https://github.com/beautify-web/js-beautify) |
|
||||||
| XTemplate | `XTemplate` |`.xtemplate` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| XTemplate | `XTemplate` |`.xtemplate` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| YAML | `YAML` |`.yml`, `.yaml` | **[`align-yaml`](https://github.com/jonschlinkert/align-yaml)** |
|
| YAML | `YAML` |`.yml`, `.yaml` | **[`align-yaml`](https://github.com/jonschlinkert/align-yaml)** |
|
||||||
|
|
2554
docs/options.md
2554
docs/options.md
File diff suppressed because it is too large
Load Diff
|
@ -183,6 +183,7 @@
|
||||||
"node-dir": "0.1.17",
|
"node-dir": "0.1.17",
|
||||||
"node-uuid": "1.4.8",
|
"node-uuid": "1.4.8",
|
||||||
"open": "0.0.5",
|
"open": "0.0.5",
|
||||||
|
"prettier": "^1.10.2",
|
||||||
"prettydiff2": "^2.2.7",
|
"prettydiff2": "^2.2.7",
|
||||||
"pug-beautify": "^0.1.1",
|
"pug-beautify": "^0.1.1",
|
||||||
"remark": "6.0.1",
|
"remark": "6.0.1",
|
||||||
|
@ -414,7 +415,8 @@
|
||||||
"goimports",
|
"goimports",
|
||||||
"terraform",
|
"terraform",
|
||||||
"terraformfmt",
|
"terraformfmt",
|
||||||
"tsx"
|
"tsx",
|
||||||
|
"prettier"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"coffeelint": "1.16.0"
|
"coffeelint": "1.16.0"
|
||||||
|
|
|
@ -7,7 +7,7 @@ module.exports = class CoffeeFormatter extends Beautifier
|
||||||
link: "https://github.com/Glavin001/Coffee-Formatter"
|
link: "https://github.com/Glavin001/Coffee-Formatter"
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
CoffeeScript: true
|
CoffeeScript: false
|
||||||
}
|
}
|
||||||
|
|
||||||
beautify: (text, language, options) ->
|
beautify: (text, language, options) ->
|
||||||
|
|
|
@ -61,6 +61,7 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
'perltidy'
|
'perltidy'
|
||||||
'php-cs-fixer'
|
'php-cs-fixer'
|
||||||
'phpcbf'
|
'phpcbf'
|
||||||
|
'prettier'
|
||||||
'prettydiff'
|
'prettydiff'
|
||||||
'pybeautifier'
|
'pybeautifier'
|
||||||
'pug-beautify'
|
'pug-beautify'
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
"use strict"
|
||||||
|
|
||||||
|
Beautifier = require('./beautifier')
|
||||||
|
prettier = require("prettier")
|
||||||
|
path = require("path")
|
||||||
|
|
||||||
|
module.exports = class Prettier extends Beautifier
|
||||||
|
name: "Prettier"
|
||||||
|
link: "https://github.com/prettier/prettier"
|
||||||
|
options: {
|
||||||
|
_:
|
||||||
|
tabWidth: "indent_size"
|
||||||
|
useTabs: ["indent_with_tabs", "indent_char", (indent_with_tabs, indent_char) ->
|
||||||
|
return (indent_with_tabs is true) or (indent_char is "\t")
|
||||||
|
]
|
||||||
|
JavaScript:
|
||||||
|
bracketSpacing: "object_curly_spacing"
|
||||||
|
TypeScript: false
|
||||||
|
CSS: false
|
||||||
|
LESS: false
|
||||||
|
SCSS: false
|
||||||
|
Vue: false
|
||||||
|
JSON: false
|
||||||
|
Markdown: false
|
||||||
|
}
|
||||||
|
|
||||||
|
beautify: (text, language, options, context) ->
|
||||||
|
return new @Promise((resolve, reject) ->
|
||||||
|
_ = require('lodash')
|
||||||
|
|
||||||
|
prettierLanguage = _.find(prettier.getSupportInfo().languages, 'name': language)
|
||||||
|
if prettierLanguage
|
||||||
|
parser = prettierLanguage.parsers[0]
|
||||||
|
else
|
||||||
|
reject(new Error("Unknown language for Prettier"))
|
||||||
|
|
||||||
|
filePath = context.filePath and path.dirname context.filePath
|
||||||
|
|
||||||
|
try
|
||||||
|
prettier.resolveConfig(filePath).then((configOptions) ->
|
||||||
|
result = prettier.format(text, configOptions or options, parser)
|
||||||
|
prettier.clearConfigCache()
|
||||||
|
resolve result
|
||||||
|
)
|
||||||
|
catch err
|
||||||
|
reject(err)
|
||||||
|
)
|
|
@ -5,8 +5,14 @@ module.exports = class TypeScriptFormatter extends Beautifier
|
||||||
name: "TypeScript Formatter"
|
name: "TypeScript Formatter"
|
||||||
link: "https://github.com/vvakame/typescript-formatter"
|
link: "https://github.com/vvakame/typescript-formatter"
|
||||||
options: {
|
options: {
|
||||||
TypeScript: true
|
TypeScript:
|
||||||
TSX: true
|
indent_with_tabs: true
|
||||||
|
tab_width: true
|
||||||
|
indent_size: true
|
||||||
|
TSX:
|
||||||
|
indent_with_tabs: true
|
||||||
|
tab_width: true
|
||||||
|
indent_size: true
|
||||||
}
|
}
|
||||||
|
|
||||||
beautify: (text, language, options) ->
|
beautify: (text, language, options) ->
|
||||||
|
|
|
@ -108,5 +108,9 @@ module.exports = {
|
||||||
default: "System Default"
|
default: "System Default"
|
||||||
enum: ["CRLF","LF","System Default"]
|
enum: ["CRLF","LF","System Default"]
|
||||||
description: "Override EOL from line-ending-selector"
|
description: "Override EOL from line-ending-selector"
|
||||||
|
object_curly_spacing:
|
||||||
|
type: 'boolean'
|
||||||
|
default: false
|
||||||
|
description: "Insert spaces between brackets in object literals"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ module.exports = {
|
||||||
|
|
||||||
name: "TSX"
|
name: "TSX"
|
||||||
namespace: "tsx"
|
namespace: "tsx"
|
||||||
fallback: ['ts']
|
fallback: ['js']
|
||||||
|
|
||||||
###
|
###
|
||||||
Supported Grammars
|
Supported Grammars
|
||||||
|
|
|
@ -18,4 +18,6 @@ module.exports = {
|
||||||
"ts"
|
"ts"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
defaultBeautifier: "TypeScript Formatter"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
648
src/options.json
648
src/options.json
|
@ -350,10 +350,9 @@
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"default": null,
|
"default": null,
|
||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"description": "Indentation size/length (Supported by Coffee Formatter, coffee-fmt)",
|
"description": "Indentation size/length (Supported by coffee-fmt)",
|
||||||
"title": "Indent size",
|
"title": "Indent size",
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"Coffee Formatter",
|
|
||||||
"coffee-fmt"
|
"coffee-fmt"
|
||||||
],
|
],
|
||||||
"key": "indent_size",
|
"key": "indent_size",
|
||||||
|
@ -365,10 +364,9 @@
|
||||||
"indent_char": {
|
"indent_char": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Indentation character (Supported by Coffee Formatter, coffee-fmt)",
|
"description": "Indentation character (Supported by coffee-fmt)",
|
||||||
"title": "Indent char",
|
"title": "Indent char",
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"Coffee Formatter",
|
|
||||||
"coffee-fmt"
|
"coffee-fmt"
|
||||||
],
|
],
|
||||||
"key": "indent_char",
|
"key": "indent_char",
|
||||||
|
@ -377,27 +375,12 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indent_level": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": 0,
|
|
||||||
"description": "Initial indentation level (Supported by Coffee Formatter)",
|
|
||||||
"title": "Indent level",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "indent_level",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indent_with_tabs": {
|
"indent_with_tabs": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by Coffee Formatter, coffee-fmt)",
|
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by coffee-fmt)",
|
||||||
"title": "Indent with tabs",
|
"title": "Indent with tabs",
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"Coffee Formatter",
|
|
||||||
"coffee-fmt"
|
"coffee-fmt"
|
||||||
],
|
],
|
||||||
"key": "indent_with_tabs",
|
"key": "indent_with_tabs",
|
||||||
|
@ -406,242 +389,6 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"preserve_newlines": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true,
|
|
||||||
"description": "Preserve line-breaks (Supported by Coffee Formatter)",
|
|
||||||
"title": "Preserve newlines",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "preserve_newlines",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"max_preserve_newlines": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": 10,
|
|
||||||
"description": "Number of line-breaks to be preserved in one chunk (Supported by Coffee Formatter)",
|
|
||||||
"title": "Max preserve newlines",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "max_preserve_newlines",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"space_in_paren": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Add padding spaces within paren, ie. f( a, b ) (Supported by Coffee Formatter)",
|
|
||||||
"title": "Space in paren",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "space_in_paren",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"jslint_happy": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Enable jslint-stricter mode (Supported by Coffee Formatter)",
|
|
||||||
"title": "Jslint happy",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "jslint_happy",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"space_after_anon_function": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Add a space before an anonymous function's parens, ie. function () (Supported by Coffee Formatter)",
|
|
||||||
"title": "Space after anon function",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "space_after_anon_function",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"brace_style": {
|
|
||||||
"type": "string",
|
|
||||||
"default": "collapse",
|
|
||||||
"enum": [
|
|
||||||
"collapse",
|
|
||||||
"collapse-preserve-inline",
|
|
||||||
"expand",
|
|
||||||
"end-expand",
|
|
||||||
"none"
|
|
||||||
],
|
|
||||||
"description": "[collapse|collapse-preserve-inline|expand|end-expand|none] (Supported by Coffee Formatter)",
|
|
||||||
"title": "Brace style",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "brace_style",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"break_chained_methods": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Break chained method calls across subsequent lines (Supported by Coffee Formatter)",
|
|
||||||
"title": "Break chained methods",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "break_chained_methods",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"keep_array_indentation": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Preserve array indentation (Supported by Coffee Formatter)",
|
|
||||||
"title": "Keep array indentation",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "keep_array_indentation",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"keep_function_indentation": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": " (Supported by Coffee Formatter)",
|
|
||||||
"title": "Keep function indentation",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "keep_function_indentation",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"space_before_conditional": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true,
|
|
||||||
"description": " (Supported by Coffee Formatter)",
|
|
||||||
"title": "Space before conditional",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "space_before_conditional",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eval_code": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": " (Supported by Coffee Formatter)",
|
|
||||||
"title": "Eval code",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "eval_code",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"unescape_strings": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Decode printable characters encoded in xNN notation (Supported by Coffee Formatter)",
|
|
||||||
"title": "Unescape strings",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "unescape_strings",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"wrap_line_length": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": 0,
|
|
||||||
"description": "Wrap lines at next opportunity after N characters (Supported by Coffee Formatter)",
|
|
||||||
"title": "Wrap line length",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "wrap_line_length",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end_with_newline": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "End output with newline (Supported by Coffee Formatter)",
|
|
||||||
"title": "End with newline",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "end_with_newline",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end_with_comma": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by Coffee Formatter)",
|
|
||||||
"title": "End with comma",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "end_with_comma",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end_of_line": {
|
|
||||||
"type": "string",
|
|
||||||
"default": "System Default",
|
|
||||||
"enum": [
|
|
||||||
"CRLF",
|
|
||||||
"LF",
|
|
||||||
"System Default"
|
|
||||||
],
|
|
||||||
"description": "Override EOL from line-ending-selector (Supported by Coffee Formatter)",
|
|
||||||
"title": "End of line",
|
|
||||||
"beautifiers": [
|
|
||||||
"Coffee Formatter"
|
|
||||||
],
|
|
||||||
"key": "end_of_line",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -893,6 +640,7 @@
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"CSScomb",
|
"CSScomb",
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff",
|
"Pretty Diff",
|
||||||
"SassConvert"
|
"SassConvert"
|
||||||
],
|
],
|
||||||
|
@ -1132,6 +880,7 @@
|
||||||
"enum": [
|
"enum": [
|
||||||
"CSScomb",
|
"CSScomb",
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff",
|
"Pretty Diff",
|
||||||
"SassConvert"
|
"SassConvert"
|
||||||
]
|
]
|
||||||
|
@ -1563,6 +1312,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object_curly_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
|
||||||
|
"title": "Object curly spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"JS Beautify"
|
||||||
|
],
|
||||||
|
"key": "object_curly_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"indent_inner_html": {
|
"indent_inner_html": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
|
@ -3139,6 +2902,7 @@
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
"JSCS Fixer",
|
"JSCS Fixer",
|
||||||
"ESLint Fixer",
|
"ESLint Fixer",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
|
@ -3152,10 +2916,11 @@
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"default": null,
|
"default": null,
|
||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"description": "Indentation size/length (Supported by JS Beautify, Pretty Diff)",
|
"description": "Indentation size/length (Supported by JS Beautify, Prettier, Pretty Diff)",
|
||||||
"title": "Indent size",
|
"title": "Indent size",
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
],
|
],
|
||||||
"key": "indent_size",
|
"key": "indent_size",
|
||||||
|
@ -3167,10 +2932,11 @@
|
||||||
"indent_char": {
|
"indent_char": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Indentation character (Supported by JS Beautify, Pretty Diff)",
|
"description": "Indentation character (Supported by JS Beautify, Prettier, Pretty Diff)",
|
||||||
"title": "Indent char",
|
"title": "Indent char",
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
],
|
],
|
||||||
"key": "indent_char",
|
"key": "indent_char",
|
||||||
|
@ -3196,10 +2962,11 @@
|
||||||
"indent_with_tabs": {
|
"indent_with_tabs": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff)",
|
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Prettier, Pretty Diff)",
|
||||||
"title": "Indent with tabs",
|
"title": "Indent with tabs",
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
],
|
],
|
||||||
"key": "indent_with_tabs",
|
"key": "indent_with_tabs",
|
||||||
|
@ -3450,6 +3217,21 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object_curly_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify, Prettier)",
|
||||||
|
"title": "Object curly spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"JS Beautify",
|
||||||
|
"Prettier"
|
||||||
|
],
|
||||||
|
"key": "object_curly_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -3467,6 +3249,7 @@
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
"JSCS Fixer",
|
"JSCS Fixer",
|
||||||
"ESLint Fixer",
|
"ESLint Fixer",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -3486,6 +3269,7 @@
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
|
@ -3797,6 +3581,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object_curly_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
|
||||||
|
"title": "Object curly spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"JS Beautify"
|
||||||
|
],
|
||||||
|
"key": "object_curly_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -3812,6 +3610,7 @@
|
||||||
"description": "Default Beautifier to be used for JSON",
|
"description": "Default Beautifier to be used for JSON",
|
||||||
"enum": [
|
"enum": [
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -4160,6 +3959,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object_curly_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
|
||||||
|
"title": "Object curly spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"JS Beautify"
|
||||||
|
],
|
||||||
|
"key": "object_curly_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -4350,6 +4163,7 @@
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"CSScomb",
|
"CSScomb",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
|
@ -4554,6 +4368,7 @@
|
||||||
"description": "Default Beautifier to be used for LESS",
|
"description": "Default Beautifier to be used for LESS",
|
||||||
"enum": [
|
"enum": [
|
||||||
"CSScomb",
|
"CSScomb",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -4633,6 +4448,7 @@
|
||||||
"description": "Options for language Markdown",
|
"description": "Options for language Markdown",
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
|
"Prettier",
|
||||||
"Remark",
|
"Remark",
|
||||||
"Tidy Markdown"
|
"Tidy Markdown"
|
||||||
],
|
],
|
||||||
|
@ -4700,6 +4516,7 @@
|
||||||
"default": "Tidy Markdown",
|
"default": "Tidy Markdown",
|
||||||
"description": "Default Beautifier to be used for Markdown",
|
"description": "Default Beautifier to be used for Markdown",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
"Prettier",
|
||||||
"Remark",
|
"Remark",
|
||||||
"Tidy Markdown"
|
"Tidy Markdown"
|
||||||
]
|
]
|
||||||
|
@ -6566,6 +6383,7 @@
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"CSScomb",
|
"CSScomb",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff",
|
"Pretty Diff",
|
||||||
"SassConvert"
|
"SassConvert"
|
||||||
],
|
],
|
||||||
|
@ -6771,6 +6589,7 @@
|
||||||
"description": "Default Beautifier to be used for SCSS",
|
"description": "Default Beautifier to be used for SCSS",
|
||||||
"enum": [
|
"enum": [
|
||||||
"CSScomb",
|
"CSScomb",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff",
|
"Pretty Diff",
|
||||||
"SassConvert"
|
"SassConvert"
|
||||||
]
|
]
|
||||||
|
@ -7380,6 +7199,35 @@
|
||||||
"tsx"
|
"tsx"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"indent_size": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"minimum": 0,
|
||||||
|
"description": "Indentation size/length (Supported by TypeScript Formatter)",
|
||||||
|
"title": "Indent size",
|
||||||
|
"beautifiers": [
|
||||||
|
"TypeScript Formatter"
|
||||||
|
],
|
||||||
|
"key": "indent_size",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indent_with_tabs": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": null,
|
||||||
|
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by TypeScript Formatter)",
|
||||||
|
"title": "Indent with tabs",
|
||||||
|
"beautifiers": [
|
||||||
|
"TypeScript Formatter"
|
||||||
|
],
|
||||||
|
"key": "indent_with_tabs",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -7580,6 +7428,7 @@
|
||||||
"description": "Options for language TypeScript",
|
"description": "Options for language TypeScript",
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
|
"Prettier",
|
||||||
"TypeScript Formatter"
|
"TypeScript Formatter"
|
||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
|
@ -7604,34 +7453,6 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indent_char": {
|
|
||||||
"type": "string",
|
|
||||||
"default": null,
|
|
||||||
"description": "Indentation character (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Indent char",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "indent_char",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indent_level": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": 0,
|
|
||||||
"description": "Initial indentation level (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Indent level",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "indent_level",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indent_with_tabs": {
|
"indent_with_tabs": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": null,
|
"default": null,
|
||||||
|
@ -7646,242 +7467,6 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"preserve_newlines": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true,
|
|
||||||
"description": "Preserve line-breaks (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Preserve newlines",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "preserve_newlines",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"max_preserve_newlines": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": 10,
|
|
||||||
"description": "Number of line-breaks to be preserved in one chunk (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Max preserve newlines",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "max_preserve_newlines",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"space_in_paren": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Add padding spaces within paren, ie. f( a, b ) (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Space in paren",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "space_in_paren",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"jslint_happy": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Enable jslint-stricter mode (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Jslint happy",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "jslint_happy",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"space_after_anon_function": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Add a space before an anonymous function's parens, ie. function () (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Space after anon function",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "space_after_anon_function",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"brace_style": {
|
|
||||||
"type": "string",
|
|
||||||
"default": "collapse",
|
|
||||||
"enum": [
|
|
||||||
"collapse",
|
|
||||||
"collapse-preserve-inline",
|
|
||||||
"expand",
|
|
||||||
"end-expand",
|
|
||||||
"none"
|
|
||||||
],
|
|
||||||
"description": "[collapse|collapse-preserve-inline|expand|end-expand|none] (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Brace style",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "brace_style",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"break_chained_methods": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Break chained method calls across subsequent lines (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Break chained methods",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "break_chained_methods",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"keep_array_indentation": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Preserve array indentation (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Keep array indentation",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "keep_array_indentation",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"keep_function_indentation": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": " (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Keep function indentation",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "keep_function_indentation",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"space_before_conditional": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true,
|
|
||||||
"description": " (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Space before conditional",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "space_before_conditional",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eval_code": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": " (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Eval code",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "eval_code",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"unescape_strings": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "Decode printable characters encoded in xNN notation (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Unescape strings",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "unescape_strings",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"wrap_line_length": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": 0,
|
|
||||||
"description": "Wrap lines at next opportunity after N characters (Supported by TypeScript Formatter)",
|
|
||||||
"title": "Wrap line length",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "wrap_line_length",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end_with_newline": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "End output with newline (Supported by TypeScript Formatter)",
|
|
||||||
"title": "End with newline",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "end_with_newline",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end_with_comma": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by TypeScript Formatter)",
|
|
||||||
"title": "End with comma",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "end_with_comma",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end_of_line": {
|
|
||||||
"type": "string",
|
|
||||||
"default": "System Default",
|
|
||||||
"enum": [
|
|
||||||
"CRLF",
|
|
||||||
"LF",
|
|
||||||
"System Default"
|
|
||||||
],
|
|
||||||
"description": "Override EOL from line-ending-selector (Supported by TypeScript Formatter)",
|
|
||||||
"title": "End of line",
|
|
||||||
"beautifiers": [
|
|
||||||
"TypeScript Formatter"
|
|
||||||
],
|
|
||||||
"key": "end_of_line",
|
|
||||||
"language": {
|
|
||||||
"name": "JavaScript",
|
|
||||||
"namespace": "js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -7896,6 +7481,7 @@
|
||||||
"default": "TypeScript Formatter",
|
"default": "TypeScript Formatter",
|
||||||
"description": "Default Beautifier to be used for TypeScript",
|
"description": "Default Beautifier to be used for TypeScript",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
"Prettier",
|
||||||
"TypeScript Formatter"
|
"TypeScript Formatter"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -8068,6 +7654,7 @@
|
||||||
"description": "Options for language Vue",
|
"description": "Options for language Vue",
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
|
"Prettier",
|
||||||
"Vue Beautifier"
|
"Vue Beautifier"
|
||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
|
@ -8370,6 +7957,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object_curly_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by Vue Beautifier)",
|
||||||
|
"title": "Object curly spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"Vue Beautifier"
|
||||||
|
],
|
||||||
|
"key": "object_curly_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"indent_inner_html": {
|
"indent_inner_html": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
|
@ -8559,6 +8160,7 @@
|
||||||
"default": "Vue Beautifier",
|
"default": "Vue Beautifier",
|
||||||
"description": "Default Beautifier to be used for Vue",
|
"description": "Default Beautifier to be used for Vue",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
"Prettier",
|
||||||
"Vue Beautifier"
|
"Vue Beautifier"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue