0

For the life of me I cannot figure this out. I have a complex VSCode setup and I believe the prettier extension is causing some behavior I do not want, and I hope someone knows how to disable or re-configure it:

JS files: takes:

child.gender = $(pref).find('#ml').prop('checked')? 'male' : 'female';

And renders:

child.gender = $(pref)
        .find('#ml')
        .prop('checked')
        ? 'male'
        : 'female';

I really need the formatter and would like to try to fix rather than disable. Thanks for your help.

existing options:

    "workbench.iconTheme": "material-icon-theme",
  "php.suggest.basic": false,
  "editor.minimap.enabled": false,
  "editor.fontLigatures": true,
  "editor.fontFamily": "'Fira Code', 'Arial', monospace",
  "php.validate.executablePath": "C:\\wamp64\\bin\\php\\php7.2.4\\php.exe",
  "files.associations": {
    "*.php": "php",
    "*.phtml": "php"
  },
  "php.validate.run": "onType",
  "editor.cursorSmoothCaretAnimation": true,
  "editor.smoothScrolling": true,
  "files.trimFinalNewlines": true,
  "emmet.includeLanguages": {
    "blade.php": "html"
  },
  "vetur.format.options.tabSize": 4,
  "vetur.format.options.useTabs": false,
  "blade.format.enable": true,
  "vetur.format.defaultFormatter.html": "prettyhtml",
  "vetur.format.defaultFormatter.css": "prettier",
  "vetur.format.defaultFormatter.postcss": "prettier",
  "vetur.format.defaultFormatter.scss": "prettier",
  "vetur.format.defaultFormatter.less": "prettier",
  "vetur.format.defaultFormatter.stylus": "stylus-supremacy",
  "vetur.format.defaultFormatter.js": "prettier",
  "vetur.format.defaultFormatter.ts": "prettier",
  "eslint.enable": false,
  "window.zoomLevel": 0,
  "files.trimTrailingWhitespace": true,
  "prettier.singleQuote": true,
  "prettier.trailingComma": "es5",
  "prettier.eslintIntegration": true,
  "prettier.disableLanguages": [],
  "eslint.autoFixOnSave": true,
  "editor.insertSpaces": true,
  "editor.formatOnSave": true,
  "editor.detectIndentation": true,
  "editor.tabSize": 4,
  "editor.formatOnPaste": false,
  "editor.formatOnType": true,
  "editor.renderControlCharacters": true,
  "editor.renderWhitespace": "none",
  "files.exclude": {
    ".babelrc": true,
    ".editorconfig": true,
    ".eslintignore": true,
    ".eslintrc.js": false,
    ".gitignore": true,
    ".jshintrc": true,
    ".postcssrc.js": true,
    "**/node_modules": true,
    "build": true
  },
  "eslint.validate": [
    {
      "autoFix": true,
      "language": "javascript"
    },
    {
      "autoFix": true,
      "language": "vue"
    }
  ],
  "attrsSorter.order": [
    "is",
    "v-for",
    "v-if",
    "v-else-if",
    "v-else",
    "v-show",
    "v-cloak",
    "v-once",
    "v-pre",
    "id",
    "ref",
    "key",
    "slot",
    "v-model",
    "v-model.+",
    "v-bind",
    "v-bind.+",
    ":.+",
    "v-text",
    "v-text.+",
    "v-html",
    "v-html.+",
    "class",
    "v-on.+",
    "@.+",
    "name",
    "data-.+",
    "ng-.+",
    "src",
    "for",
    "type",
    "href",
    "values",
    "title",
    "alt",
    "role",
    "aria-.+",
    "$unknown$"
  ],
  "gitlens.currentLine.enabled": false,
  "gitlens.hovers.currentLine.over": "line",
  "gitlens.codeLens.enabled": false,
  "phpformatter.composer": true,
  "phpformatter.pharPath": "php-cs-fixer",
  "phpformatter.logging": true,
  "laravel_goto_view.quickJump": true,
  "laravel_goto_view.folderTip": true,
  "git.enableSmartCommit": true,
  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true,
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true,
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": true,
  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
  "bracketPairColorizer.highlightActiveScope": true
James Bailey
  • 498
  • 6
  • 19
  • What are the `prettier` options you currently have? – ChrisR Jan 17 '19 at 16:28
  • Do you have a `.prettierrc` or `.eslintrc` in your project's root folder? – Rich Werden Jun 13 '19 at 21:24
  • no I do not, I have really given up on a lot of the features VSCODE boasts. I think an update late last year broke something. I have not checked it since about Feb, but some of the new features and extensions are slowly providing me with what I had to piece together.. – James Bailey Jun 19 '19 at 19:40

0 Answers0