Skip to content

Commit 6ce36a2

Browse files
Refactor code style, update VSCode settings, and clean up PHP and JS files
Co-authored-by: aaron <aaron@linchpin.com>
1 parent 4d7b6b4 commit 6ce36a2

File tree

8 files changed

+237
-161
lines changed

8 files changed

+237
-161
lines changed

.php-cs-fixer.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"php":"8.4.5","version":"3.84.0:v3.84.0#38dad0767bf2a9b516b976852200ae722fe984ca","indent":" ","lineEnding":"\n","rules":{"octal_notation":true,"clean_namespace":true,"no_unset_cast":true,"assign_null_coalescing_to_coalesce_equal":true,"normalize_index_brace":true,"short_scalar_cast":true,"heredoc_indentation":true,"no_whitespace_before_comma_in_array":{"after_heredoc":true},"trailing_comma_in_multiline":{"after_heredoc":true},"list_syntax":{"syntax":"short"},"visibility_required":true,"ternary_to_null_coalescing":true,"array_syntax":{"syntax":"short"},"native_constant_invocation":true,"native_function_casing":true,"native_function_invocation":true,"native_type_declaration_casing":true},"hashes":{"includes\/Controller\/Cron.php":"05b3ab71d8472fb9a005d933912d586e"}}

.php-cs-fixer.dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
$finder = PhpCsFixer\Finder::create()->in(
1414
[
1515
__DIR__ . '/includes/',
16-
__DIR__ . '/blocks/src/',
17-
__DIR__ . '/blocks/src-iapi/',
1816
]
1917
);
2018

@@ -28,6 +26,8 @@
2826
'native_function_casing' => true,
2927
'native_function_invocation' => true,
3028
'native_type_declaration_casing' => true,
29+
'array_syntax' => ['syntax' => 'short'],
30+
'list_syntax' => ['syntax' => 'short'],
3131
]
3232
);
3333
$config->setFinder( $finder );

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@wordpress/prettier-config"

.vscode/settings.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll": "explicit",
5+
"source.organizeImports": "explicit"
6+
},
7+
"[php]": {
8+
"editor.defaultFormatter": "junstyle.php-cs-fixer",
9+
"editor.formatOnSave": true
10+
},
11+
"[javascript]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode",
13+
"editor.formatOnSave": true
14+
},
15+
"[typescript]": {
16+
"editor.defaultFormatter": "esbenp.prettier-vscode",
17+
"editor.formatOnSave": true
18+
},
19+
"[json]": {
20+
"editor.defaultFormatter": "esbenp.prettier-vscode",
21+
"editor.formatOnSave": true
22+
},
23+
"php-cs-fixer.executablePath": "./vendor/bin/php-cs-fixer",
24+
"php-cs-fixer.config": ".php-cs-fixer.dist.php",
25+
"php-cs-fixer.onsave": true,
26+
"php-cs-fixer.autoExecutable": true,
27+
"prettier.configPath": "package.json"
28+
}

0 commit comments

Comments
 (0)