From be47e37bbcaf99220a617f6a1e067852f1be74e3 Mon Sep 17 00:00:00 2001 From: butlerx Date: Fri, 5 Jan 2018 12:02:05 +0000 Subject: [PATCH] add prettier support for graphql --- README.md | 2 +- autoload/ale/fix/registry.vim | 2 +- doc/ale-graphql.txt | 5 +++++ doc/ale.txt | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f058df24..df253378 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ formatting. | Git Commit Messages | [gitlint](https://github.com/jorisroovers/gitlint) | | GLSL | [glslang](https://github.com/KhronosGroup/glslang), [glslls](https://github.com/svenstaro/glsl-language-server) | | Go | [gofmt](https://golang.org/cmd/gofmt/), [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports), [go vet](https://golang.org/cmd/vet/), [golint](https://godoc.org/github.com/golang/lint), [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype), [gometalinter](https://github.com/alecthomas/gometalinter) !!, [go build](https://golang.org/cmd/go/) !!, [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) !!, [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) !! | -| GraphQL | [eslint](http://eslint.org/), [gqlint](https://github.com/happylinks/gqlint) | +| GraphQL | [eslint](http://eslint.org/), [gqlint](https://github.com/happylinks/gqlint), [prettier](https://github.com/prettier/prettier) | | Haml | [haml-lint](https://github.com/brigade/haml-lint) | | Handlebars | [ember-template-lint](https://github.com/rwjblue/ember-template-lint) | | Haskell | [brittany](https://github.com/lspitzner/brittany), [ghc](https://www.haskell.org/ghc/), [stack-ghc](https://haskellstack.org/), [stack-build](https://haskellstack.org/) !!, [ghc-mod](https://github.com/DanielG/ghc-mod), [stack-ghc-mod](https://github.com/DanielG/ghc-mod), [hlint](https://hackage.haskell.org/package/hlint), [hdevtools](https://hackage.haskell.org/package/hdevtools), [hfmt](https://github.com/danstiner/hfmt) | diff --git a/autoload/ale/fix/registry.vim b/autoload/ale/fix/registry.vim index 2d0b4a53..e4568847 100644 --- a/autoload/ale/fix/registry.vim +++ b/autoload/ale/fix/registry.vim @@ -45,7 +45,7 @@ let s:default_registry = { \ }, \ 'prettier': { \ 'function': 'ale#fixers#prettier#Fix', -\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'css', 'scss', 'less', 'markdown'], +\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'css', 'scss', 'less', 'markdown', 'graphql'], \ 'description': 'Apply prettier to a file.', \ }, \ 'prettier_eslint': { diff --git a/doc/ale-graphql.txt b/doc/ale-graphql.txt index de412762..603694bb 100644 --- a/doc/ale-graphql.txt +++ b/doc/ale-graphql.txt @@ -13,5 +13,10 @@ You will need the GraphQL ESLint plugin installed for this to work. =============================================================================== gqlint *ale-graphql-gqlint* +=============================================================================== +prettier *ale-graphql-prettier* + +See |ale-javascript-prettier| for information about the available options. + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale.txt b/doc/ale.txt index e0002f77..26d2d0a1 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -82,6 +82,7 @@ CONTENTS *ale-contents* graphql...............................|ale-graphql-options| eslint..............................|ale-graphql-eslint| gqlint..............................|ale-graphql-gqlint| + prettier............................|ale-graphql-prettier| handlebars............................|ale-handlebars-options| ember-template-lint.................|ale-handlebars-embertemplatelint| haskell...............................|ale-haskell-options| @@ -315,7 +316,7 @@ Notes: * Git Commit Messages: `gitlint` * GLSL: glslang, `glslls` * Go: `gofmt`, `goimports`, `go vet`, `golint`, `gotype`, `gometalinter`!!, `go build`!!, `gosimple`!!, `staticcheck`!! -* GraphQL: `eslint`, `gqlint` +* GraphQL: `eslint`, `gqlint`, `prettier` * Haml: `haml-lint` * Handlebars: `ember-template-lint` * Haskell: `brittany`, `ghc`, `stack-ghc`, `stack-build`!!, `ghc-mod`, `stack-ghc-mod`, `hlint`, `hdevtools`, `hfmt`