mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 17:11:40 -05:00
parent
8ff45766fa
commit
46d373f4bd
52 changed files with 231 additions and 108 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -11,6 +11,10 @@ The format is based on [Keep a Changelog].
|
|||
* Buffer content is now always passed to formatters using a pipe. This
|
||||
fixes issues with formatters that behave differently when receiving
|
||||
input on stdin versus being run on a tty ([#119]).
|
||||
* Prettier now specifies `--parser` argument explicitly, so it will
|
||||
work properly even when the name of the file does not match what
|
||||
Prettier expects (e.g. `.yamllint` will be formatted as YAML by
|
||||
Prettier as long as it is in `yaml-mode`). See [#103].
|
||||
|
||||
### Bugs fixed
|
||||
* When a formatter has a bug and fails to return anything on stdout
|
||||
|
@ -29,10 +33,17 @@ The format is based on [Keep a Changelog].
|
|||
* [stylua](https://github.com/JohnnyMorganz/StyLua) for Lua ([#105]).
|
||||
* Native Emacs indentation of Emacs Lisp code as a formatter ([#102]).
|
||||
|
||||
### Bugfixes
|
||||
* Prettier supports SCSS instead of SASS. The original support for
|
||||
SASS in Apheleia was a bug because Prettier actually never had
|
||||
support for SASS in the first place, so Apheleia would have failed
|
||||
anyway on trying to format a SASS file.
|
||||
|
||||
[#43]: https://github.com/radian-software/apheleia/issues/43
|
||||
[#100]: https://github.com/radian-software/apheleia/pull/100
|
||||
[#101]: https://github.com/radian-software/apheleia/pull/101
|
||||
[#102]: https://github.com/radian-software/apheleia/pull/102
|
||||
[#103]: https://github.com/radian-software/apheleia/issues/103
|
||||
[#105]: https://github.com/radian-software/apheleia/pull/105
|
||||
[#109]: https://github.com/radian-software/apheleia/issues/109
|
||||
[#110]: https://github.com/radian-software/apheleia/pull/110
|
||||
|
|
40
apheleia.el
40
apheleia.el
|
@ -940,6 +940,26 @@ being run, for diagnostic purposes."
|
|||
"--enable-outside-detected-project"))
|
||||
(phpcs . ("apheleia-phpcs"))
|
||||
(prettier . (npx "prettier" "--stdin-filepath" filepath))
|
||||
(prettier-css
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=css"))
|
||||
(prettier-html
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=html"))
|
||||
(prettier-graphql
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=graphql"))
|
||||
(prettier-javascript
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=babel-flow"))
|
||||
(prettier-json
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=json"))
|
||||
(prettier-markdown
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=markdown"))
|
||||
(prettier-ruby
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=ruby"))
|
||||
(prettier-scss
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=scss"))
|
||||
(prettier-typescript
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=typescript"))
|
||||
(prettier-yaml
|
||||
. (npx "prettier" "--stdin-filepath" filepath "--parser=yaml"))
|
||||
(shfmt . ("shfmt" "-i" "4"))
|
||||
(stylua . ("stylua" "-"))
|
||||
(rustfmt . ("rustfmt" "--quiet" "--emit" "stdout"))
|
||||
|
@ -1073,25 +1093,27 @@ function: %s" command)))
|
|||
(defcustom apheleia-mode-alist
|
||||
'(;; php-mode has to come before cc-mode
|
||||
(php-mode . phpcs)
|
||||
;; rest are alphabetical
|
||||
(beancount-mode . bean-format)
|
||||
(cc-mode . clang-format)
|
||||
(c-mode . clang-format)
|
||||
(c++-mode . clang-format)
|
||||
(caml-mode . ocamlformat)
|
||||
(common-lisp-mode . lisp-indent)
|
||||
(css-mode . prettier)
|
||||
(css-mode . prettier-css)
|
||||
(dart-mode . dart-format)
|
||||
(emacs-lisp-mode . lisp-indent)
|
||||
(elixir-mode . mix-format)
|
||||
(elm-mode . elm-format)
|
||||
(fish-mode . fish-indent)
|
||||
(go-mode . gofmt)
|
||||
(graphql-mode . prettier-graphql)
|
||||
(haskell-mode . brittany)
|
||||
(html-mode . prettier)
|
||||
(html-mode . prettier-html)
|
||||
(java-mode . google-java-format)
|
||||
(js3-mode . prettier)
|
||||
(js-mode . prettier)
|
||||
(json-mode . prettier)
|
||||
(js3-mode . prettier-javascript)
|
||||
(js-mode . prettier-javascript)
|
||||
(json-mode . prettier-json)
|
||||
(kotlin-mode . ktlint)
|
||||
(latex-mode . latexindent)
|
||||
(LaTeX-mode . latexindent)
|
||||
|
@ -1099,18 +1121,18 @@ function: %s" command)))
|
|||
(lisp-mode . lisp-indent)
|
||||
(nix-mode . nixfmt)
|
||||
(python-mode . black)
|
||||
(ruby-mode . prettier)
|
||||
(ruby-mode . prettier-ruby)
|
||||
(rustic-mode . rustfmt)
|
||||
(rust-mode . rustfmt)
|
||||
(sass-mode . prettier)
|
||||
(scss-mode . prettier-scss)
|
||||
(sh-mode . shfmt)
|
||||
(terraform-mode . terraform)
|
||||
(TeX-latex-mode . latexindent)
|
||||
(TeX-mode . latexindent)
|
||||
(tuareg-mode . ocamlformat)
|
||||
(typescript-mode . prettier)
|
||||
(typescript-mode . prettier-typescript)
|
||||
(web-mode . prettier)
|
||||
(yaml-mode . prettier))
|
||||
(yaml-mode . prettier-yaml))
|
||||
"Alist mapping major mode names to formatters to use in those modes.
|
||||
This determines what formatter to use in buffers without a
|
||||
setting for `apheleia-formatter'. The keys are major mode
|
||||
|
|
1
test/formatters/installers/prettier-css.bash
Symbolic link
1
test/formatters/installers/prettier-css.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
1
test/formatters/installers/prettier-graphql.bash
Symbolic link
1
test/formatters/installers/prettier-graphql.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
1
test/formatters/installers/prettier-html.bash
Symbolic link
1
test/formatters/installers/prettier-html.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
1
test/formatters/installers/prettier-javascript.bash
Symbolic link
1
test/formatters/installers/prettier-javascript.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
1
test/formatters/installers/prettier-json.bash
Symbolic link
1
test/formatters/installers/prettier-json.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
1
test/formatters/installers/prettier-markdown.bash
Symbolic link
1
test/formatters/installers/prettier-markdown.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
15
test/formatters/installers/prettier-ruby.bash
Normal file
15
test/formatters/installers/prettier-ruby.bash
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Need ruby for gem, need gcc and ruby headers for native gem deps
|
||||
apt-get install -y ruby ruby-dev gcc
|
||||
|
||||
# Install the plugin
|
||||
npm install -g prettier @prettier/plugin-ruby
|
||||
|
||||
# Have to install from source because release not tagged yet
|
||||
# https://github.com/ruby-syntax-tree/syntax_tree-rbs/pull/34
|
||||
# https://stackoverflow.com/a/11767563
|
||||
gem install specific_install
|
||||
gem specific_install -l https://github.com/ruby-syntax-tree/syntax_tree-rbs.git
|
||||
|
||||
# These are required dependencies documented at
|
||||
# https://www.npmjs.com/package/@prettier/plugin-ruby
|
||||
gem install prettier_print syntax_tree syntax_tree-haml syntax_tree-rbs
|
1
test/formatters/installers/prettier-scss.bash
Symbolic link
1
test/formatters/installers/prettier-scss.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
1
test/formatters/installers/prettier-typescript.bash
Symbolic link
1
test/formatters/installers/prettier-typescript.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
1
test/formatters/installers/prettier-yaml.bash
Symbolic link
1
test/formatters/installers/prettier-yaml.bash
Symbolic link
|
@ -0,0 +1 @@
|
|||
prettier.bash
|
13
test/formatters/samplecode/prettier-css/in.css
Normal file
13
test/formatters/samplecode/prettier-css/in.css
Normal file
|
@ -0,0 +1,13 @@
|
|||
body
|
||||
|
||||
{
|
||||
padding-left : 11em;
|
||||
font-family
|
||||
: Georgia,
|
||||
|
||||
"Times New Roman",
|
||||
Times, serif;
|
||||
color: purple;
|
||||
background-color:
|
||||
#d8da3d
|
||||
}
|
6
test/formatters/samplecode/prettier-css/out.css
Normal file
6
test/formatters/samplecode/prettier-css/out.css
Normal file
|
@ -0,0 +1,6 @@
|
|||
body {
|
||||
padding-left: 11em;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
color: purple;
|
||||
background-color: #d8da3d;
|
||||
}
|
1
test/formatters/samplecode/prettier-graphql/in.graphql
Normal file
1
test/formatters/samplecode/prettier-graphql/in.graphql
Normal file
|
@ -0,0 +1 @@
|
|||
{human(id: "1000") {name height(unit: FOOT)}}
|
6
test/formatters/samplecode/prettier-graphql/out.graphql
Normal file
6
test/formatters/samplecode/prettier-graphql/out.graphql
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
human(id: "1000") {
|
||||
name
|
||||
height(unit: FOOT)
|
||||
}
|
||||
}
|
1
test/formatters/samplecode/prettier-html/in.html
Normal file
1
test/formatters/samplecode/prettier-html/in.html
Normal file
|
@ -0,0 +1 @@
|
|||
<h2>Minify <abbr title="HyperText Markup Language">HTML</abbr> and any <abbr title="Cascading Style Sheets">CSS</abbr> or <abbr title="JavaScript">JS</abbr> included in your markup</h2>
|
5
test/formatters/samplecode/prettier-html/out.html
Normal file
5
test/formatters/samplecode/prettier-html/out.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<h2>
|
||||
Minify <abbr title="HyperText Markup Language">HTML</abbr> and any
|
||||
<abbr title="Cascading Style Sheets">CSS</abbr> or
|
||||
<abbr title="JavaScript">JS</abbr> included in your markup
|
||||
</h2>
|
4
test/formatters/samplecode/prettier-javascript/in.js
Normal file
4
test/formatters/samplecode/prettier-javascript/in.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
function HelloWorld({greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) {
|
||||
|
||||
if(!greeting){return null};
|
||||
}
|
10
test/formatters/samplecode/prettier-javascript/out.js
Normal file
10
test/formatters/samplecode/prettier-javascript/out.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
function HelloWorld({
|
||||
greeting = "hello",
|
||||
greeted = '"World"',
|
||||
silent = false,
|
||||
onMouseOver,
|
||||
}) {
|
||||
if (!greeting) {
|
||||
return null;
|
||||
}
|
||||
}
|
1
test/formatters/samplecode/prettier-json/in.json
Normal file
1
test/formatters/samplecode/prettier-json/in.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"arrowParens":"always","bracketSpacing":true,"embeddedLanguageFormatting":"auto","htmlWhitespaceSensitivity":"css","insertPragma":false,"jsxBracketSameLine":false,"jsxSingleQuote":false,"printWidth":80,"proseWrap":"preserve","quoteProps":"as-needed","requirePragma":false,"semi":true,"singleQuote":false,"tabWidth":2,"trailingComma":"es5","useTabs":false,"vueIndentScriptAndStyle":false}
|
19
test/formatters/samplecode/prettier-json/out.json
Normal file
19
test/formatters/samplecode/prettier-json/out.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"arrowParens": "always",
|
||||
"bracketSpacing": true,
|
||||
"embeddedLanguageFormatting": "auto",
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"insertPragma": false,
|
||||
"jsxBracketSameLine": false,
|
||||
"jsxSingleQuote": false,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "preserve",
|
||||
"quoteProps": "as-needed",
|
||||
"requirePragma": false,
|
||||
"semi": true,
|
||||
"singleQuote": false,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "es5",
|
||||
"useTabs": false,
|
||||
"vueIndentScriptAndStyle": false
|
||||
}
|
4
test/formatters/samplecode/prettier-markdown/in.md
Normal file
4
test/formatters/samplecode/prettier-markdown/in.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
|col1|col 2|
|
||||
|-|-|
|
||||
|nice|fits|
|
||||
|oh no!|it's ugly!|
|
4
test/formatters/samplecode/prettier-markdown/out.md
Normal file
4
test/formatters/samplecode/prettier-markdown/out.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
| col1 | col 2 |
|
||||
| ------ | ---------- |
|
||||
| nice | fits |
|
||||
| oh no! | it's ugly! |
|
13
test/formatters/samplecode/prettier-ruby/in.rb
Normal file
13
test/formatters/samplecode/prettier-ruby/in.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
d=[30644250780,9003106878,
|
||||
30636278846,66641217692,4501790980,
|
||||
671_24_603036,131_61973916,66_606629_920,
|
||||
30642677916,30643069058];a,s=[],$*[0]
|
||||
s.each_byte{|b|a<<("%036b"%d[b.
|
||||
chr.to_i]).scan(/\d{6}/)}
|
||||
a.transpose.each{ |a|
|
||||
a.join.each_byte{\
|
||||
|i|print i==49?\
|
||||
($*[1]||"#")\
|
||||
:32.chr}
|
||||
puts
|
||||
}
|
18
test/formatters/samplecode/prettier-ruby/out.rb
Normal file
18
test/formatters/samplecode/prettier-ruby/out.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
d = [
|
||||
30_644_250_780,
|
||||
9_003_106_878,
|
||||
30_636_278_846,
|
||||
66_641_217_692,
|
||||
4_501_790_980,
|
||||
671_24_603036,
|
||||
131_61973916,
|
||||
66_606629_920,
|
||||
30_642_677_916,
|
||||
30_643_069_058
|
||||
]
|
||||
a, s = [], $*[0]
|
||||
s.each_byte { |b| a << ("%036b" % d[b.chr.to_i]).scan(/\d{6}/) }
|
||||
a.transpose.each do |a|
|
||||
a.join.each_byte { |i| print i == 49 ? ($*[1] || "#") : 32.chr }
|
||||
puts
|
||||
end
|
1
test/formatters/samplecode/prettier-scss/in.scss
Normal file
1
test/formatters/samplecode/prettier-scss/in.scss
Normal file
|
@ -0,0 +1 @@
|
|||
/* Define standard variables and values for website */$bgcolor: lightblue;$textcolor: darkblue;$fontsize: 18px;/* Use the variables */body{background-color: $bgcolor; color: $textcolor; font-size: $fontsize;}
|
9
test/formatters/samplecode/prettier-scss/out.scss
Normal file
9
test/formatters/samplecode/prettier-scss/out.scss
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* Define standard variables and values for website */
|
||||
$bgcolor: lightblue;
|
||||
$textcolor: darkblue;
|
||||
$fontsize: 18px; /* Use the variables */
|
||||
body {
|
||||
background-color: $bgcolor;
|
||||
color: $textcolor;
|
||||
font-size: $fontsize;
|
||||
}
|
1
test/formatters/samplecode/prettier-typescript/in.ts
Normal file
1
test/formatters/samplecode/prettier-typescript/in.ts
Normal file
|
@ -0,0 +1 @@
|
|||
interface GreetingSettings{greeting: string; duration?: number; color?: string;}declare function greet(setting: GreetingSettings): void;
|
6
test/formatters/samplecode/prettier-typescript/out.ts
Normal file
6
test/formatters/samplecode/prettier-typescript/out.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
interface GreetingSettings {
|
||||
greeting: string;
|
||||
duration?: number;
|
||||
color?: string;
|
||||
}
|
||||
declare function greet(setting: GreetingSettings): void;
|
1
test/formatters/samplecode/prettier-yaml/in.yamllint
Symbolic link
1
test/formatters/samplecode/prettier-yaml/in.yamllint
Symbolic link
|
@ -0,0 +1 @@
|
|||
in.yml
|
13
test/formatters/samplecode/prettier-yaml/in.yml
Normal file
13
test/formatters/samplecode/prettier-yaml/in.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- hosts:
|
||||
all
|
||||
|
||||
tasks:
|
||||
- name:
|
||||
Get software for apt repository management.
|
||||
apt:
|
||||
state: present
|
||||
|
||||
|
||||
name:
|
||||
- python3-pycurl
|
1
test/formatters/samplecode/prettier-yaml/out.yamllint
Symbolic link
1
test/formatters/samplecode/prettier-yaml/out.yamllint
Symbolic link
|
@ -0,0 +1 @@
|
|||
out.yml
|
10
test/formatters/samplecode/prettier-yaml/out.yml
Normal file
10
test/formatters/samplecode/prettier-yaml/out.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
- hosts: all
|
||||
|
||||
tasks:
|
||||
- name: Get software for apt repository management.
|
||||
apt:
|
||||
state: present
|
||||
|
||||
name:
|
||||
- python3-pycurl
|
|
@ -1,13 +0,0 @@
|
|||
body
|
||||
|
||||
{
|
||||
padding-left : 11em;
|
||||
font-family
|
||||
: Georgia,
|
||||
|
||||
"Times New Roman",
|
||||
Times, serif;
|
||||
color: purple;
|
||||
background-color:
|
||||
#d8da3d
|
||||
}
|
1
test/formatters/samplecode/prettier/in.css
Symbolic link
1
test/formatters/samplecode/prettier/in.css
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-css/in.css
|
1
test/formatters/samplecode/prettier/in.graphql
Symbolic link
1
test/formatters/samplecode/prettier/in.graphql
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-graphql/in.graphql
|
|
@ -1 +0,0 @@
|
|||
<h2>Minify <abbr title="HyperText Markup Language">HTML</abbr> and any <abbr title="Cascading Style Sheets">CSS</abbr> or <abbr title="JavaScript">JS</abbr> included in your markup</h2>
|
1
test/formatters/samplecode/prettier/in.html
Symbolic link
1
test/formatters/samplecode/prettier/in.html
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-html/in.html
|
|
@ -1,4 +0,0 @@
|
|||
function HelloWorld({greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) {
|
||||
|
||||
if(!greeting){return null};
|
||||
}
|
1
test/formatters/samplecode/prettier/in.js
Symbolic link
1
test/formatters/samplecode/prettier/in.js
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-javascript/in.js
|
|
@ -1 +0,0 @@
|
|||
{"arrowParens":"always","bracketSpacing":true,"embeddedLanguageFormatting":"auto","htmlWhitespaceSensitivity":"css","insertPragma":false,"jsxBracketSameLine":false,"jsxSingleQuote":false,"printWidth":80,"proseWrap":"preserve","quoteProps":"as-needed","requirePragma":false,"semi":true,"singleQuote":false,"tabWidth":2,"trailingComma":"es5","useTabs":false,"vueIndentScriptAndStyle":false}
|
1
test/formatters/samplecode/prettier/in.json
Symbolic link
1
test/formatters/samplecode/prettier/in.json
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-json/in.json
|
1
test/formatters/samplecode/prettier/in.md
Symbolic link
1
test/formatters/samplecode/prettier/in.md
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-markdown/in.md
|
|
@ -1 +0,0 @@
|
|||
/* Define standard variables and values for website */$bgcolor: lightblue;$textcolor: darkblue;$fontsize: 18px;/* Use the variables */body{background-color: $bgcolor; color: $textcolor; font-size: $fontsize;}
|
1
test/formatters/samplecode/prettier/in.scss
Symbolic link
1
test/formatters/samplecode/prettier/in.scss
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-scss/in.scss
|
|
@ -1 +0,0 @@
|
|||
interface GreetingSettings{greeting: string; duration?: number; color?: string;}declare function greet(setting: GreetingSettings): void;
|
1
test/formatters/samplecode/prettier/in.ts
Symbolic link
1
test/formatters/samplecode/prettier/in.ts
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-typescript/in.ts
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
- hosts:
|
||||
all
|
||||
|
||||
tasks:
|
||||
- name:
|
||||
Get software for apt repository management.
|
||||
apt:
|
||||
state: present
|
||||
|
||||
|
||||
name:
|
||||
- python3-pycurl
|
1
test/formatters/samplecode/prettier/in.yml
Symbolic link
1
test/formatters/samplecode/prettier/in.yml
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-yaml/in.yml
|
|
@ -1,6 +0,0 @@
|
|||
body {
|
||||
padding-left: 11em;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
color: purple;
|
||||
background-color: #d8da3d;
|
||||
}
|
1
test/formatters/samplecode/prettier/out.css
Symbolic link
1
test/formatters/samplecode/prettier/out.css
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-css/out.css
|
1
test/formatters/samplecode/prettier/out.graphql
Symbolic link
1
test/formatters/samplecode/prettier/out.graphql
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-graphql/out.graphql
|
|
@ -1,5 +0,0 @@
|
|||
<h2>
|
||||
Minify <abbr title="HyperText Markup Language">HTML</abbr> and any
|
||||
<abbr title="Cascading Style Sheets">CSS</abbr> or
|
||||
<abbr title="JavaScript">JS</abbr> included in your markup
|
||||
</h2>
|
1
test/formatters/samplecode/prettier/out.html
Symbolic link
1
test/formatters/samplecode/prettier/out.html
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-html/out.html
|
|
@ -1,10 +0,0 @@
|
|||
function HelloWorld({
|
||||
greeting = "hello",
|
||||
greeted = '"World"',
|
||||
silent = false,
|
||||
onMouseOver,
|
||||
}) {
|
||||
if (!greeting) {
|
||||
return null;
|
||||
}
|
||||
}
|
1
test/formatters/samplecode/prettier/out.js
Symbolic link
1
test/formatters/samplecode/prettier/out.js
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-javascript/out.js
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"arrowParens": "always",
|
||||
"bracketSpacing": true,
|
||||
"embeddedLanguageFormatting": "auto",
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"insertPragma": false,
|
||||
"jsxBracketSameLine": false,
|
||||
"jsxSingleQuote": false,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "preserve",
|
||||
"quoteProps": "as-needed",
|
||||
"requirePragma": false,
|
||||
"semi": true,
|
||||
"singleQuote": false,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "es5",
|
||||
"useTabs": false,
|
||||
"vueIndentScriptAndStyle": false
|
||||
}
|
1
test/formatters/samplecode/prettier/out.json
Symbolic link
1
test/formatters/samplecode/prettier/out.json
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-json/out.json
|
1
test/formatters/samplecode/prettier/out.md
Symbolic link
1
test/formatters/samplecode/prettier/out.md
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-markdown/out.md
|
|
@ -1,9 +0,0 @@
|
|||
/* Define standard variables and values for website */
|
||||
$bgcolor: lightblue;
|
||||
$textcolor: darkblue;
|
||||
$fontsize: 18px; /* Use the variables */
|
||||
body {
|
||||
background-color: $bgcolor;
|
||||
color: $textcolor;
|
||||
font-size: $fontsize;
|
||||
}
|
1
test/formatters/samplecode/prettier/out.scss
Symbolic link
1
test/formatters/samplecode/prettier/out.scss
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-scss/out.scss
|
|
@ -1,6 +0,0 @@
|
|||
interface GreetingSettings {
|
||||
greeting: string;
|
||||
duration?: number;
|
||||
color?: string;
|
||||
}
|
||||
declare function greet(setting: GreetingSettings): void;
|
1
test/formatters/samplecode/prettier/out.ts
Symbolic link
1
test/formatters/samplecode/prettier/out.ts
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-typescript/out.ts
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
- hosts: all
|
||||
|
||||
tasks:
|
||||
- name: Get software for apt repository management.
|
||||
apt:
|
||||
state: present
|
||||
|
||||
name:
|
||||
- python3-pycurl
|
1
test/formatters/samplecode/prettier/out.yml
Symbolic link
1
test/formatters/samplecode/prettier/out.yml
Symbolic link
|
@ -0,0 +1 @@
|
|||
../prettier-yaml/out.yml
|
Loading…
Add table
Reference in a new issue