Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added default formatting config for vscode for php, js and vue files #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
{
"eslint.format.enable": true,

// PHP CS Fixer doesn't have a PSR12 ruleset yet, but the PHP CS Fixer ruleset is similar
"php-cs-fixer.rules": "@PhpCsFixer,declare_strict_types",
"php-cs-fixer.allowRisky": true,

"[html]": {
"editor.formatOnSave": true
},
"[css]": {
"editor.formatOnSave": true
},
"[javascript]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
},
"[vue]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[json]": {
"editor.formatOnSave": true
}
},
"[php]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "junstyle.php-cs-fixer"
},
}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"vlucas/phpdotenv": "^3.4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.13",
"yiisoft/yii2-shell": "^2.0.3"
},
"autoload": {
Expand Down Expand Up @@ -51,4 +52,4 @@
"@php craft setup/security-key"
]
}
}
}