Bug 38664: Move prettier options to .prettierrc.js
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
c531081d86
commit
287cb328bc
|
|
@ -4,9 +4,18 @@ module.exports = {
|
|||
tabWidth: 4,
|
||||
useTabs: false,
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.js", "*.ts"],
|
||||
options: {
|
||||
trailingComma: "es5",
|
||||
arrowParens: "avoid",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: "*.vue",
|
||||
options: {
|
||||
trailingComma: "es5",
|
||||
arrowParens: "avoid",
|
||||
semi: false,
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -132,13 +132,12 @@ sub tidy_perl {
|
|||
|
||||
sub tidy_js {
|
||||
my ($file) = @_;
|
||||
run( command => sprintf q{yarn --silent run prettier --trailing-comma es5 --arrow-parens avoid --write %s}, $file );
|
||||
run( command => sprintf q{yarn --silent run prettier --write %s}, $file );
|
||||
}
|
||||
|
||||
sub tidy_vue {
|
||||
my ($file) = @_;
|
||||
run( command => sprintf
|
||||
q{yarn --silent run prettier --trailing-comma es5 --semi false --arrow-parens avoid --write %s}, $file );
|
||||
run( command => sprintf q{yarn --silent run prettier --write %s}, $file );
|
||||
}
|
||||
|
||||
sub tidy_tt {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ plan tests => scalar @js_files;
|
|||
|
||||
foreach my $filepath (@js_files) {
|
||||
chomp $filepath;
|
||||
my $tidy = qx{yarn --silent run prettier --trailing-comma es5 --arrow-parens avoid $filepath};
|
||||
my $tidy = qx{yarn --silent run prettier $filepath};
|
||||
my $content = read_file $filepath;
|
||||
ok( $content eq $tidy, "$filepath should be kept tidy" );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ plan tests => scalar @vue_files;
|
|||
|
||||
foreach my $filepath (@vue_files) {
|
||||
chomp $filepath;
|
||||
my $tidy = qx{yarn --silent run prettier --trailing-comma es5 --semi false --arrow-parens avoid $filepath};
|
||||
my $tidy = qx{yarn --silent run prettier $filepath};
|
||||
my $content = read_file $filepath;
|
||||
ok( $content eq $tidy, "$filepath should be kept tidy" );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue