Настройка отступа Eslint в vscode - PullRequest
0 голосов
/ 17 марта 2020

Я использую Eslint в vscode. У меня проблема, как показано ниже. Я хочу приписать ниже тег HTML, но он начинается с первой строки.

Как это исправить? это просто происходит этот проект. мой другой проект работает хорошо. Я думаю, это проблема с vscode, но я не нашел его.

через GIPHY

// Eslint. js

module.exports = {
  root: true,
  env: {
    browser: true,
    es6: true,
    node: true,
  },
  extends: [
    'plugin:vue/essential',
    '@vue/airbnb',
  ],
  parserOptions: {
    parser: 'babel-eslint',
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'vue/require-default-prop': 0,
    'vue/require-prop-types': 0,
    'vue/no-v-html': 0,
    'vue/max-attributes-per-line': ['error', { singleline: 4 }],
    // This errors shows up for `template` tags too, so we are disabling it
    'max-len': 0,
    // We need to disable these because of how Vuex works
    'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['state', 'el'] }],
    'no-shadow': ['error', { allow: ['state'] }],
    // We prefer named exports due to various reasons as summarized here:
    // https://blog.neufund.org/why-we-have-banned-default-exports-and-you-should-do-the-same-d51fdc2cf2ad
    'import/prefer-default-export': 'off',
    // We have all our resource models exported in the same file
    'max-classes-per-file': 'off',
    'global-require': 0,
    'object-curly-newline': 'off',
  },
  settings: {
    'import/resolver': {
      alias: [['@', './']],
    },
    'import/core-modules': ['vue', 'vuex', 'vue-router'],
  },
};

/// Vscode настройка пользовательских настроек

{
    "terminal.integrated.shell.osx": "/bin/zsh",
    "git.path": "/usr/bin/git",
    "gitlens.advanced.git": "/usr/bin/git",
    "files.trimTrailingWhitespace": true,
    "editor.tabSize": 2,
    "editor.formatOnSave": false,
    "eslint.autoFixOnSave": true,
    "editor.codeActionsOnSave": {
        "source.fixAll": true
    },
    "eslint.trace.server": "verbose",
    "eslint.alwaysShowStatus": true,
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        {
            "language": "vue",
            "autoFix": true,
        }
    ],
    "window.zoomLevel": 0,
    "todohighlight.isEnable": true,
    "todohighlight.isCaseSensitive": false,
    "todohighlight.include": [
        "**/*.js",
        "**/*.jsx",
        "**/*.ts",
        "**/*.tsx",
        "**/*.html",
        "**/*.php",
        "**/*.css",
        "**/*.scss",
        "**/*.vue"
    ],
    "editor.largeFileOptimizations": false,
    "terminal.integrated.rendererType": "dom"
}
...