VS Code выполняет форматирование файлов JS с операторами на новой строке - PullRequest
0 голосов
/ 17 января 2019

За свою жизнь я не могу этого понять. У меня сложная настройка VSCode, и я считаю, что более симпатичное расширение вызывает поведение, которого я не хочу, и я надеюсь, что кто-то знает, как его отключить или перенастроить:

JS файлы: принимает:

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

И оказывает:

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

Мне действительно нужен форматер, и я хотел бы попытаться исправить, а не отключить. Спасибо за вашу помощь.

существующие опции:

    "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
...