diff --git a/CHANGELOG.md b/CHANGELOG.md index bd6f769..738b812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Next +- See [#2026](https://github.com/Glavin001/atom-beautify/issues/2026) Add Vue support to ESLint Fixer beautifier. - Fix Beauify File option for .lua files - Switch to Remark as a default markdown beautifier due to a more active state of its community compared to Tidy Markdown ([#2004](https://github.com/Glavin001/atom-beautify/pull/2004)). This is a __breaking change__ for Tidy Markdown users: diff --git a/README.md b/README.md index d86cf89..721d956 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti | Verilog | `Verilog` |`.svh`, `.v`, `.sv` | **[`Emacs Verilog Mode`](https://www.veripool.org/projects/verilog-mode/)** | | VHDL | `VHDL 2008` |`.vhd`, `.VHD` | **[`VHDL Beautifier`](https://www.gnu.org/software/emacs/)** | | 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)**, [`Prettier`](https://github.com/prettier/prettier) | +| Vue | `Vue Component` |`.vue` | **[`Vue Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/vue-beautifier.coffee)**, [`ESLint Fixer`](https://github.com/eslint/eslint), [`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) | | XTemplate | `XTemplate` |`.xtemplate` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** | | YAML | `YAML` |`.yml`, `.yaml` | **[`align-yaml`](https://github.com/jonschlinkert/align-yaml)** | diff --git a/docs/options.md b/docs/options.md index 3795483..aea1173 100644 --- a/docs/options.md +++ b/docs/options.md @@ -13657,40 +13657,40 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff) #### [Vue](#vue) -**Supported Beautifiers**: [`Prettier`](#prettier) [`Vue Beautifier`](#vue-beautifier) +**Supported Beautifiers**: [`ESLint Fixer`](#eslint-fixer) [`Prettier`](#prettier) [`Vue Beautifier`](#vue-beautifier) -| Option | Prettier | Vue Beautifier | -| --- | --- | --- | -| `disabled` | :white_check_mark: | :white_check_mark: | -| `default_beautifier` | :white_check_mark: | :white_check_mark: | -| `beautify_on_save` | :white_check_mark: | :white_check_mark: | -| `brace_style` | :x: | :white_check_mark: | -| `break_chained_methods` | :x: | :white_check_mark: | -| `end_of_line` | :x: | :white_check_mark: | -| `end_with_comma` | :x: | :white_check_mark: | -| `end_with_newline` | :x: | :white_check_mark: | -| `eval_code` | :x: | :white_check_mark: | -| `extra_liners` | :x: | :white_check_mark: | -| `indent_char` | :x: | :white_check_mark: | -| `indent_inner_html` | :x: | :white_check_mark: | -| `indent_level` | :x: | :white_check_mark: | -| `indent_scripts` | :x: | :white_check_mark: | -| `indent_size` | :x: | :white_check_mark: | -| `indent_with_tabs` | :x: | :white_check_mark: | -| `jslint_happy` | :x: | :white_check_mark: | -| `keep_array_indentation` | :x: | :white_check_mark: | -| `keep_function_indentation` | :x: | :white_check_mark: | -| `max_preserve_newlines` | :x: | :white_check_mark: | -| `object_curly_spacing` | :x: | :white_check_mark: | -| `preserve_newlines` | :x: | :white_check_mark: | -| `space_after_anon_function` | :x: | :white_check_mark: | -| `space_before_conditional` | :x: | :white_check_mark: | -| `space_in_paren` | :x: | :white_check_mark: | -| `unescape_strings` | :x: | :white_check_mark: | -| `unformatted` | :x: | :white_check_mark: | -| `wrap_attributes` | :x: | :white_check_mark: | -| `wrap_attributes_indent_size` | :x: | :white_check_mark: | -| `wrap_line_length` | :x: | :white_check_mark: | +| Option | ESLint Fixer | Prettier | Vue Beautifier | +| --- | --- | --- | --- | +| `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| `brace_style` | :x: | :x: | :white_check_mark: | +| `break_chained_methods` | :x: | :x: | :white_check_mark: | +| `end_of_line` | :x: | :x: | :white_check_mark: | +| `end_with_comma` | :x: | :x: | :white_check_mark: | +| `end_with_newline` | :x: | :x: | :white_check_mark: | +| `eval_code` | :x: | :x: | :white_check_mark: | +| `extra_liners` | :x: | :x: | :white_check_mark: | +| `indent_char` | :x: | :x: | :white_check_mark: | +| `indent_inner_html` | :x: | :x: | :white_check_mark: | +| `indent_level` | :x: | :x: | :white_check_mark: | +| `indent_scripts` | :x: | :x: | :white_check_mark: | +| `indent_size` | :x: | :x: | :white_check_mark: | +| `indent_with_tabs` | :x: | :x: | :white_check_mark: | +| `jslint_happy` | :x: | :x: | :white_check_mark: | +| `keep_array_indentation` | :x: | :x: | :white_check_mark: | +| `keep_function_indentation` | :x: | :x: | :white_check_mark: | +| `max_preserve_newlines` | :x: | :x: | :white_check_mark: | +| `object_curly_spacing` | :x: | :x: | :white_check_mark: | +| `preserve_newlines` | :x: | :x: | :white_check_mark: | +| `space_after_anon_function` | :x: | :x: | :white_check_mark: | +| `space_before_conditional` | :x: | :x: | :white_check_mark: | +| `space_in_paren` | :x: | :x: | :white_check_mark: | +| `unescape_strings` | :x: | :x: | :white_check_mark: | +| `unformatted` | :x: | :x: | :white_check_mark: | +| `wrap_attributes` | :x: | :x: | :white_check_mark: | +| `wrap_attributes_indent_size` | :x: | :x: | :white_check_mark: | +| `wrap_line_length` | :x: | :x: | :white_check_mark: | **Description**: @@ -13721,7 +13721,7 @@ Disable Vue Beautification **Type**: `string` -**Enum**: `Prettier` `Vue Beautifier` +**Enum**: `ESLint Fixer` `Prettier` `Vue Beautifier` **Description**: diff --git a/package.json b/package.json index 0d797bb..a99d2ae 100644 --- a/package.json +++ b/package.json @@ -167,6 +167,10 @@ { "name": "Jack Treble", "url": "https://github.com/JackTreble" + }, + { + "name": "Kohei Hiraga", + "url": "https://github.com/range3" } ], "engines": { diff --git a/src/beautifiers/eslint.coffee b/src/beautifiers/eslint.coffee index 2f9947d..8f462fc 100644 --- a/src/beautifiers/eslint.coffee +++ b/src/beautifiers/eslint.coffee @@ -10,6 +10,7 @@ module.exports = class ESLintFixer extends Beautifier options: { JavaScript: false + Vue: false } beautify: (text, language, options) -> diff --git a/src/options.json b/src/options.json index fd85eb2..9e1d59a 100644 --- a/src/options.json +++ b/src/options.json @@ -7758,6 +7758,7 @@ "description": "Options for language Vue", "collapsed": true, "beautifiers": [ + "ESLint Fixer", "Prettier", "Vue Beautifier" ], @@ -8264,6 +8265,7 @@ "default": "Vue Beautifier", "description": "Default Beautifier to be used for Vue", "enum": [ + "ESLint Fixer", "Prettier", "Vue Beautifier" ]