Skip to content

Instantly share code, notes, and snippets.

@Tmeister
Created February 1, 2019 02:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tmeister/25e2caaa72c482a8b109b7a2a46d23f0 to your computer and use it in GitHub Desktop.
Save Tmeister/25e2caaa72c482a8b109b7a2a46d23f0 to your computer and use it in GitHub Desktop.
{
"editor.formatOnSave": false,
"javascript.format.enable": true,
"eslint.autoFixOnSave": true,
"vetur.format.defaultFormatter.html": "prettyhtml",
"eslint.alwaysShowStatus": true,
"eslint.options": {
"extensions": [".html", ".js", ".vue", ".jsx"]
},
"eslint.validate": [
{ "language": "html", "autoFix": true },
{ "language": "vue", "autoFix": true },
{ "language": "javascript", "autoFix": true },
{ "language": "javascriptreact", "autoFix": true }
],
"[php]":{
"editor.formatOnSave": true
},
"[blade]": {
"editor.formatOnSave": true
},
"blade.format.enable": true,
"files.associations": {".blade.php": "blade", ".tpl": "html"},
}
@jasperf
Copy link

jasperf commented Jul 21, 2021

Thanks for sharing this. Much appreciated. What extension are you using with this settings.json for Visual Studio Code? I assume Vetur, prettyhtml, but what for PHP and Blade? Is it PHP Intelliphense? What extension for Blade files?

Current file I have with focus on frontend languages where I miss the PHP stuff is

{
    "editor.detectIndentation": false,
    "editor.defaultFormatter": "octref.vetur",
    "vetur.format.defaultFormatter.html": "prettier",
    "vetur.format.defaultFormatter.css": "prettier",
    "vetur.format.defaultFormatter.postcss": "prettier",
    "vetur.format.defaultFormatter.scss": "prettier",
    "vetur.format.defaultFormatter.js": "prettier",
    "vetur.format.defaultFormatterOptions": {
        "prettier": {
            "singleQuote": true,
            "tabWidth": 4
        },
        "octref.vetur": {
            "tabWidth": 4
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment