Merge branch 'add-vue-support-to-eslint' of https://github.com/range3/atom-beautify into range3-add-vue-support-to-eslint

This commit is contained in:
Glavin Wiechert 2018-03-01 23:48:23 -04:00
commit ce74fe0a37
6 changed files with 43 additions and 35 deletions

View File

@ -1,4 +1,5 @@
# Next # 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 - 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)). - 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: This is a __breaking change__ for Tidy Markdown users:

View File

@ -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/)** | | 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/)** | | VHDL | `VHDL 2008` |`.vhd`, `.VHD` | **[`VHDL Beautifier`](https://www.gnu.org/software/emacs/)** |
| 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)**, [`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) | | 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)** |

View File

@ -13657,40 +13657,40 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
#### [Vue](#vue) #### [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 | | Option | ESLint Fixer | Prettier | Vue Beautifier |
| --- | --- | --- | | --- | --- | --- | --- |
| `disabled` | :white_check_mark: | :white_check_mark: | | `disabled` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `default_beautifier` | :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: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| `brace_style` | :x: | :white_check_mark: | | `brace_style` | :x: | :x: | :white_check_mark: |
| `break_chained_methods` | :x: | :white_check_mark: | | `break_chained_methods` | :x: | :x: | :white_check_mark: |
| `end_of_line` | :x: | :white_check_mark: | | `end_of_line` | :x: | :x: | :white_check_mark: |
| `end_with_comma` | :x: | :white_check_mark: | | `end_with_comma` | :x: | :x: | :white_check_mark: |
| `end_with_newline` | :x: | :white_check_mark: | | `end_with_newline` | :x: | :x: | :white_check_mark: |
| `eval_code` | :x: | :white_check_mark: | | `eval_code` | :x: | :x: | :white_check_mark: |
| `extra_liners` | :x: | :white_check_mark: | | `extra_liners` | :x: | :x: | :white_check_mark: |
| `indent_char` | :x: | :white_check_mark: | | `indent_char` | :x: | :x: | :white_check_mark: |
| `indent_inner_html` | :x: | :white_check_mark: | | `indent_inner_html` | :x: | :x: | :white_check_mark: |
| `indent_level` | :x: | :white_check_mark: | | `indent_level` | :x: | :x: | :white_check_mark: |
| `indent_scripts` | :x: | :white_check_mark: | | `indent_scripts` | :x: | :x: | :white_check_mark: |
| `indent_size` | :x: | :white_check_mark: | | `indent_size` | :x: | :x: | :white_check_mark: |
| `indent_with_tabs` | :x: | :white_check_mark: | | `indent_with_tabs` | :x: | :x: | :white_check_mark: |
| `jslint_happy` | :x: | :white_check_mark: | | `jslint_happy` | :x: | :x: | :white_check_mark: |
| `keep_array_indentation` | :x: | :white_check_mark: | | `keep_array_indentation` | :x: | :x: | :white_check_mark: |
| `keep_function_indentation` | :x: | :white_check_mark: | | `keep_function_indentation` | :x: | :x: | :white_check_mark: |
| `max_preserve_newlines` | :x: | :white_check_mark: | | `max_preserve_newlines` | :x: | :x: | :white_check_mark: |
| `object_curly_spacing` | :x: | :white_check_mark: | | `object_curly_spacing` | :x: | :x: | :white_check_mark: |
| `preserve_newlines` | :x: | :white_check_mark: | | `preserve_newlines` | :x: | :x: | :white_check_mark: |
| `space_after_anon_function` | :x: | :white_check_mark: | | `space_after_anon_function` | :x: | :x: | :white_check_mark: |
| `space_before_conditional` | :x: | :white_check_mark: | | `space_before_conditional` | :x: | :x: | :white_check_mark: |
| `space_in_paren` | :x: | :white_check_mark: | | `space_in_paren` | :x: | :x: | :white_check_mark: |
| `unescape_strings` | :x: | :white_check_mark: | | `unescape_strings` | :x: | :x: | :white_check_mark: |
| `unformatted` | :x: | :white_check_mark: | | `unformatted` | :x: | :x: | :white_check_mark: |
| `wrap_attributes` | :x: | :white_check_mark: | | `wrap_attributes` | :x: | :x: | :white_check_mark: |
| `wrap_attributes_indent_size` | :x: | :white_check_mark: | | `wrap_attributes_indent_size` | :x: | :x: | :white_check_mark: |
| `wrap_line_length` | :x: | :white_check_mark: | | `wrap_line_length` | :x: | :x: | :white_check_mark: |
**Description**: **Description**:
@ -13721,7 +13721,7 @@ Disable Vue Beautification
**Type**: `string` **Type**: `string`
**Enum**: `Prettier` `Vue Beautifier` **Enum**: `ESLint Fixer` `Prettier` `Vue Beautifier`
**Description**: **Description**:

View File

@ -167,6 +167,10 @@
{ {
"name": "Jack Treble", "name": "Jack Treble",
"url": "https://github.com/JackTreble" "url": "https://github.com/JackTreble"
},
{
"name": "Kohei Hiraga",
"url": "https://github.com/range3"
} }
], ],
"engines": { "engines": {

View File

@ -10,6 +10,7 @@ module.exports = class ESLintFixer extends Beautifier
options: { options: {
JavaScript: false JavaScript: false
Vue: false
} }
beautify: (text, language, options) -> beautify: (text, language, options) ->

View File

@ -7758,6 +7758,7 @@
"description": "Options for language Vue", "description": "Options for language Vue",
"collapsed": true, "collapsed": true,
"beautifiers": [ "beautifiers": [
"ESLint Fixer",
"Prettier", "Prettier",
"Vue Beautifier" "Vue Beautifier"
], ],
@ -8264,6 +8265,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": [
"ESLint Fixer",
"Prettier", "Prettier",
"Vue Beautifier" "Vue Beautifier"
] ]