Skip to content

vue/script-indent false positive on import #1766

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

Closed
2 tasks done
patric-eberle opened this issue Jan 20, 2022 · 0 comments · Fixed by #1770
Closed
2 tasks done

vue/script-indent false positive on import #1766

patric-eberle opened this issue Jan 20, 2022 · 0 comments · Fixed by #1770

Comments

@patric-eberle
Copy link

patric-eberle commented Jan 20, 2022

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 8.7.0
  • eslint-plugin-vue version: 8.3.0
  • Node version: 16.13.2
  • Operating System: macOS

Please show your full configuration:

ESLint config
{
  "env": {
    "browser": true,
    "es6": true,
    "node": true,
    "amd": false,
    "mocha": false,
    "jasmine": false
  },
  "globals": {},
  "parser": "/Users/patric/Projects/sonepar/akona/assets/vue/node_modules/vue-eslint-parser/index.js",
  "parserOptions": {
    "parser": "@babel/eslint-parser",
    "sourceType": "module",
    "ecmaVersion": 2020,
    "ecmaFeatures": {
      "generators": false,
      "objectLiteralDuplicateProperties": false
    }
  },
  "plugins": [
    "import",
    "vue"
  ],
  "rules": {
    "indent": [
      0,
      2,
      {
        "SwitchCase": 1,
        "VariableDeclarator": 1,
        "outerIIFEBody": 1,
        "FunctionDeclaration": {
          "parameters": 1,
          "body": 1
        },
        "FunctionExpression": {
          "parameters": 1,
          "body": 1
        },
        "CallExpression": {
          "arguments": 1
        },
        "ArrayExpression": 1,
        "ObjectExpression": 1,
        "ImportDeclaration": 1,
        "flatTernaryExpressions": false,
        "ignoredNodes": [
          "JSXElement",
          "JSXElement > *",
          "JSXAttribute",
          "JSXIdentifier",
          "JSXNamespacedName",
          "JSXMemberExpression",
          "JSXSpreadAttribute",
          "JSXExpressionContainer",
          "JSXOpeningElement",
          "JSXClosingElement",
          "JSXFragment",
          "JSXOpeningFragment",
          "JSXClosingFragment",
          "JSXText",
          "JSXEmptyExpression",
          "JSXSpreadChild"
        ],
        "ignoreComments": false,
        "offsetTernaryExpressions": false
      }
    ],
    "vue/max-attributes-per-line": [
      2,
      {
        "singleline": 3,
        "multiline": 1
      }
    ],
    "vue/first-attribute-linebreak": [
      1,
      {
        "multiline": "ignore"
      }
    ],
    "vue/html-closing-bracket-newline": [
      0
    ],
    "vue/multiline-html-element-content-newline": [
      "off"
    ],
    "vue/singleline-html-element-content-newline": [
      "off"
    ],
    "vue/script-indent": [
      "error",
      2,
      {
        "baseIndent": 1,
        "switchCase": 1
      }
    ],
    "vue/html-self-closing": [
      2,
      {
        "html": {
          "void": "never",
          "normal": "never",
          "component": "always"
        },
        "svg": "always",
        "math": "always"
      }
    ],
    "import/extensions": [
      0,
      "always",
      {
        "js": "never",
        "vue": "never"
      }
    ],
    "vue/attributes-order": [
      2,
      {
        "order": [
          "CONDITIONALS",
          [
            "LIST_RENDERING",
            "RENDER_MODIFIERS",
            "OTHER_DIRECTIVES",
            "TWO_WAY_BINDING",
            "CONTENT"
          ],
          "DEFINITION",
          "GLOBAL",
          "UNIQUE",
          "OTHER_ATTR",
          "EVENTS"
        ]
      }
    ],
    "vue/no-template-target-blank": [
      "error"
    ],
    "vue/component-definition-name-casing": [
      "error",
      "kebab-case"
    ],
    "vue/html-comment-content-spacing": [
      "error",
      "always"
    ],
    "vue/no-duplicate-attr-inheritance": [
      "error"
    ],
    "vue/no-unused-properties": [
      "error",
      {
        "groups": [
          "props",
          "data",
          "computed",
          "methods",
          "setup"
        ],
        "ignorePublicMembers": true
      }
    ],
    "vue/no-potential-component-option-typo": [
      "error",
      {
        "presets": [
          "all"
        ],
        "threshold": 1
      }
    ],
    "vue/custom-event-name-casing": [
      "error",
      "camelCase",
      {
        "ignores": [
          "/[A-z0-9-]+\\.[A-z]+/"
        ]
      }
    ],
    "vue/no-bare-strings-in-template": [
      "error",
      {
        "allowlist": [
          "\"",
          "(",
          ")",
          ",",
          ".",
          "&",
          "+",
          "-",
          "=",
          "*",
          "/",
          "#",
          "%",
          "!",
          "?",
          ":",
          "[",
          "]",
          "{",
          "}",
          "<",
          ">",
          "·",
          "•",
          "‐",
          "–",
          "—",
          "−",
          "|"
        ]
      }
    ],
    "vue/no-useless-v-bind": [
      "error"
    ],
    "vue/no-useless-mustaches": [
      "error"
    ],
    "vue/no-multiple-objects-in-class": [
      "error"
    ],
    "vue/v-for-delimiter-style": [
      "error",
      "in"
    ],
    "vue/no-reserved-component-names": [
      "error"
    ],
    "vue/comma-spacing": [
      "error",
      {
        "before": false,
        "after": true
      }
    ],
    "vue/prefer-template": [
      "error"
    ],
    "vue/template-curly-spacing": [
      "error",
      "never"
    ],
    "vue/space-in-parens": [
      "error",
      "never"
    ],
    "vue/comma-style": [
      "error",
      "last"
    ],
    "vue/no-extra-parens": [
      "error",
      "all",
      {
        "returnAssign": false,
        "nestedBinaryExpressions": false,
        "enforceForArrowConditionals": false
      }
    ],
    "vue/no-useless-concat": [
      "error"
    ],
    "vue/dot-notation": [
      "error"
    ],
    "vue/object-property-newline": [
      "error",
      {
        "allowAllPropertiesOnSameLine": true,
        "allowMultiplePropertiesPerLine": false
      }
    ],
    "vue/object-curly-newline": [
      "error",
      "never"
    ],
    "vue/operator-linebreak": [
      "error",
      "none"
    ],
    "vue/func-call-spacing": [
      "error",
      "never"
    ],
    "vue/no-sparse-arrays": [
      "error"
    ],
    "vue/block-tag-newline": [
      "error",
      {
        "singleline": "always",
        "multiline": "always",
        "maxEmptyLines": 1
      }
    ],
    "vue/component-api-style": [
      "error",
      [
        "composition",
        "options"
      ]
    ],
    "vue/component-name-in-template-casing": [
      "error",
      "kebab-case"
    ],
    "vue/component-options-name-casing": [
      "off"
    ],
    "vue/html-button-has-type": [
      "off"
    ],
    "vue/html-comment-content-newline": [
      "error",
      {
        "singleline": "never",
        "multiline": "never"
      }
    ],
    "vue/match-component-file-name": [
      "off"
    ],
    "vue/no-child-content": [
      "error"
    ],
    "vue/no-empty-component-block": [
      "error"
    ],
    "vue/no-expose-after-await": [
      "error"
    ],
    "vue/no-invalid-model-keys": [
      "error"
    ],
    "vue/no-this-in-before-route-enter": [
      "error"
    ],
    "vue/no-unsupported-features": [
      "error",
      {
        "version": "^2.6.0"
      }
    ],
    "vue/no-use-computed-property-like-method": [
      "error"
    ],
    "vue/no-v-text": [
      "error"
    ],
    "vue/padding-line-between-blocks": [
      "error",
      "always"
    ],
    "vue/prefer-separate-static-class": [
      "error"
    ],
    "vue/require-direct-export": [
      "error"
    ],
    "vue/require-emit-validator": [
      "error"
    ],
    "vue/require-name-property": [
      "error"
    ],
    "vue/v-on-function-call": [
      "error"
    ],
    "vue/array-bracket-newline": [
      "error",
      "never"
    ],
    "vue/eqeqeq": [
      "error"
    ],
    "require-jsdoc": [
      2,
      {
        "require": {
          "FunctionDeclaration": true,
          "MethodDefinition": true,
          "ClassDeclaration": true,
          "ArrowFunctionExpression": true,
          "FunctionExpression": false
        }
      }
    ],
    "function-paren-newline": [
      "off",
      "multiline-arguments"
    ],
    "prefer-regex-literals": [
      "off",
      {
        "disallowRedundantWrapping": true
      }
    ],
    "import/order": [
      "off",
      {
        "groups": [
          [
            "builtin",
            "external",
            "internal"
          ]
        ],
        "warnOnUnassignedImports": false
      }
    ],
    "vue/component-tags-order": [
      "warn"
    ],
    "vue/no-lone-template": [
      "warn"
    ],
    "vue/no-multiple-slot-args": [
      "warn"
    ],
    "vue/no-v-html": [
      "warn"
    ],
    "vue/order-in-components": [
      "warn"
    ],
    "vue/this-in-template": [
      "warn"
    ],
    "vue/attribute-hyphenation": [
      "warn"
    ],
    "vue/html-closing-bracket-spacing": [
      "warn"
    ],
    "vue/html-end-tags": [
      "warn"
    ],
    "vue/html-indent": [
      "warn"
    ],
    "vue/html-quotes": [
      "warn"
    ],
    "vue/mustache-interpolation-spacing": [
      "warn"
    ],
    "vue/no-multi-spaces": [
      "warn"
    ],
    "vue/no-spaces-around-equal-signs-in-attribute": [
      "warn"
    ],
    "vue/no-template-shadow": [
      "warn"
    ],
    "vue/one-component-per-file": [
      "warn"
    ],
    "vue/prop-name-casing": [
      "warn"
    ],
    "vue/require-default-prop": [
      "warn"
    ],
    "vue/require-prop-types": [
      "warn"
    ],
    "vue/v-bind-style": [
      "warn"
    ],
    "vue/v-on-style": [
      "warn"
    ],
    "vue/v-slot-style": [
      "warn"
    ],
    "vue/multi-word-component-names": [
      "error"
    ],
    "vue/no-arrow-functions-in-watch": [
      "error"
    ],
    "vue/no-async-in-computed-properties": [
      "error"
    ],
    "vue/no-computed-properties-in-data": [
      "error"
    ],
    "vue/no-custom-modifiers-on-v-model": [
      "error"
    ],
    "vue/no-dupe-keys": [
      "error"
    ],
    "vue/no-dupe-v-else-if": [
      "error"
    ],
    "vue/no-duplicate-attributes": [
      "error"
    ],
    "vue/no-multiple-template-root": [
      "error"
    ],
    "vue/no-mutating-props": [
      "error"
    ],
    "vue/no-parsing-error": [
      "error"
    ],
    "vue/no-reserved-keys": [
      "error"
    ],
    "vue/no-reserved-props": [
      "error",
      {
        "vueVersion": 2
      }
    ],
    "vue/no-shared-component-data": [
      "error"
    ],
    "vue/no-side-effects-in-computed-properties": [
      "error"
    ],
    "vue/no-template-key": [
      "error"
    ],
    "vue/no-textarea-mustache": [
      "error"
    ],
    "vue/no-unused-components": [
      "error"
    ],
    "vue/no-unused-vars": [
      "error"
    ],
    "vue/no-use-v-if-with-v-for": [
      "error"
    ],
    "vue/no-useless-template-attributes": [
      "error"
    ],
    "vue/no-v-for-template-key": [
      "error"
    ],
    "vue/no-v-model-argument": [
      "error"
    ],
    "vue/require-component-is": [
      "error"
    ],
    "vue/require-prop-type-constructor": [
      "error"
    ],
    "vue/require-render-return": [
      "error"
    ],
    "vue/require-v-for-key": [
      "error"
    ],
    "vue/require-valid-default-prop": [
      "error"
    ],
    "vue/return-in-computed-property": [
      "error"
    ],
    "vue/use-v-on-exact": [
      "error"
    ],
    "vue/valid-next-tick": [
      "error"
    ],
    "vue/valid-template-root": [
      "error"
    ],
    "vue/valid-v-bind-sync": [
      "error"
    ],
    "vue/valid-v-bind": [
      "error"
    ],
    "vue/valid-v-cloak": [
      "error"
    ],
    "vue/valid-v-else-if": [
      "error"
    ],
    "vue/valid-v-else": [
      "error"
    ],
    "vue/valid-v-for": [
      "error"
    ],
    "vue/valid-v-html": [
      "error"
    ],
    "vue/valid-v-if": [
      "error"
    ],
    "vue/valid-v-model": [
      "error"
    ],
    "vue/valid-v-on": [
      "error"
    ],
    "vue/valid-v-once": [
      "error"
    ],
    "vue/valid-v-pre": [
      "error"
    ],
    "vue/valid-v-show": [
      "error"
    ],
    "vue/valid-v-slot": [
      "error"
    ],
    "vue/valid-v-text": [
      "error"
    ],
    "vue/comment-directive": [
      "error"
    ],
    "vue/jsx-uses-vars": [
      "error"
    ],
    "vue/script-setup-uses-vars": [
      "error"
    ],
    "no-label-var": [
      2
    ],
    "no-undef-init": [
      2
    ],
    "no-undefined": [
      2
    ],
    "capitalized-comments": [
      2,
      "always",
      {
        "ignorePattern": "[activated\\(\\)|components:|computed:|created\\(\\)|deactivated\\(\\)|destroyed\\(\\)|vue|watch:|ember]",
        "ignoreInlineComments": true
      }
    ],
    "consistent-this": [
      2,
      "_that"
    ],
    "func-names": [
      0
    ],
    "id-length": [
      1,
      {
        "min": 3,
        "properties": "always",
        "exceptions": [
          "$",
          "a",
          "b",
          "e",
          "i",
          "in",
          "j",
          "to",
          "x",
          "y",
          "_",
          "fs",
          "gt",
          "id",
          "DS",
          "el",
          "on",
          "vm",
          "xs",
          "sm",
          "md",
          "lg",
          "xl",
          "de",
          "en",
          "it",
          "fr"
        ]
      }
    ],
    "implicit-arrow-linebreak": [
      2,
      "beside"
    ],
    "key-spacing": [
      2,
      {
        "singleLine": {
          "mode": "strict"
        },
        "multiLine": {
          "mode": "minimum"
        }
      }
    ],
    "lines-around-comment": [
      2,
      {
        "beforeBlockComment": true,
        "allowBlockStart": true,
        "allowObjectStart": true,
        "afterBlockComment": false,
        "beforeLineComment": false,
        "afterLineComment": false,
        "allowBlockEnd": false
      }
    ],
    "max-len": [
      1,
      130,
      2,
      {
        "ignoreComments": true,
        "ignoreUrls": true,
        "ignorePattern": "[\"'`][,;]?$"
      }
    ],
    "max-params": [
      2,
      3
    ],
    "no-bitwise": [
      1
    ],
    "no-continue": [
      1
    ],
    "no-lonely-if": [
      1
    ],
    "no-mixed-operators": [
      2,
      {
        "groups": [
          [
            "%",
            "**"
          ],
          [
            "%",
            "+"
          ],
          [
            "%",
            "-"
          ],
          [
            "%",
            "*"
          ],
          [
            "%",
            "/"
          ],
          [
            "/",
            "*"
          ],
          [
            "&",
            "|",
            "<<",
            ">>",
            ">>>"
          ],
          [
            "==",
            "!=",
            "===",
            "!=="
          ],
          [
            "&&",
            "||"
          ]
        ],
        "allowSamePrecedence": false
      }
    ],
    "no-multiple-empty-lines": [
      2,
      {
        "max": 1,
        "maxEOF": 1
      }
    ],
    "no-negated-condition": [
      0
    ],
    "no-trailing-spaces": [
      1,
      {
        "ignoreComments": true,
        "skipBlankLines": true
      }
    ],
    "no-underscore-dangle": [
      2,
      {
        "allowAfterThis": true,
        "allow": [
          "_that"
        ],
        "allowAfterSuper": false,
        "allowAfterThisConstructor": false,
        "enforceInMethodNames": false,
        "allowFunctionParams": true
      }
    ],
    "object-property-newline": [
      1,
      {
        "allowAllPropertiesOnSameLine": true,
        "allowMultiplePropertiesPerLine": false
      }
    ],
    "operator-assignment": [
      1,
      "always"
    ],
    "operator-linebreak": [
      1,
      "before"
    ],
    "padding-line-between-statements": [
      "error",
      {
        "blankLine": "always",
        "prev": [
          "const",
          "let",
          "var"
        ],
        "next": "*"
      },
      {
        "blankLine": "any",
        "prev": [
          "const",
          "let",
          "var"
        ],
        "next": [
          "const",
          "let",
          "var"
        ]
      },
      {
        "blankLine": "always",
        "prev": "*",
        "next": "case"
      },
      {
        "blankLine": "always",
        "prev": "*",
        "next": "default"
      },
      {
        "blankLine": "always",
        "prev": "directive",
        "next": "*"
      },
      {
        "blankLine": "any",
        "prev": "directive",
        "next": "directive"
      },
      {
        "blankLine": "always",
        "prev": "*",
        "next": "if"
      },
      {
        "blankLine": "always",
        "prev": "*",
        "next": "return"
      }
    ],
    "quote-props": [
      2,
      "consistent-as-needed"
    ],
    "space-before-function-paren": [
      2,
      "never"
    ],
    "space-unary-ops": [
      2,
      {
        "words": true,
        "nonwords": false,
        "overrides": {}
      }
    ],
    "wrap-regex": [
      2
    ],
    "import/no-extraneous-dependencies": [
      0,
      {
        "devDependencies": [
          "test/**",
          "tests/**",
          "spec/**",
          "**/__tests__/**",
          "**/__mocks__/**",
          "test.{js,jsx}",
          "test-*.{js,jsx}",
          "**/*{.,_}{test,spec}.{js,jsx}",
          "**/jest.config.js",
          "**/jest.setup.js",
          "**/vue.config.js",
          "**/webpack.config.js",
          "**/webpack.config.*.js",
          "**/rollup.config.js",
          "**/rollup.config.*.js",
          "**/gulpfile.js",
          "**/gulpfile.*.js",
          "**/Gruntfile{,.js}",
          "**/protractor.conf.js",
          "**/protractor.conf.*.js",
          "**/karma.conf.js",
          "**/.eslintrc.js"
        ],
        "optionalDependencies": false
      }
    ],
    "import/no-mutable-exports": [
      1
    ],
    "import/no-unresolved": [
      0,
      {
        "commonjs": true,
        "caseSensitive": true,
        "caseSensitiveStrict": false
      }
    ],
    "arrow-parens": [
      2,
      "as-needed",
      {
        "requireForBlockBody": true
      }
    ],
    "new-cap": [
      2,
      {
        "newIsCap": true,
        "capIsNewExceptions": [
          "A"
        ],
        "capIsNew": true,
        "properties": true
      }
    ],
    "object-shorthand": [
      1,
      "always",
      {
        "avoidQuotes": true
      }
    ],
    "rest-spread-spacing": [
      2,
      "never"
    ],
    "prefer-const": [
      1,
      {
        "destructuring": "any",
        "ignoreReadBeforeAssign": true
      }
    ],
    "no-unsafe-optional-chaining": [
      2,
      {
        "disallowArithmeticOperators": true
      }
    ],
    "comma-dangle": [
      0,
      {
        "arrays": "always-multiline",
        "objects": "always-multiline",
        "imports": "always-multiline",
        "exports": "always-multiline",
        "functions": "always-multiline"
      }
    ],
    "no-constant-condition": [
      2
    ],
    "no-extra-parens": [
      2,
      "all",
      {
        "returnAssign": false,
        "nestedBinaryExpressions": false,
        "enforceForArrowConditionals": false
      }
    ],
    "no-loss-of-precision": [
      2
    ],
    "no-unexpected-multiline": [
      2
    ],
    "no-unreachable-loop": [
      2,
      {
        "ignore": []
      }
    ],
    "valid-jsdoc": [
      2,
      {
        "requireReturnDescription": false,
        "requireReturn": false,
        "prefer": {
          "return": "returns",
          "arg": "param",
          "argument": "param"
        },
        "preferType": {
          "array": "Array",
          "boolean": "Boolean",
          "function": "Function",
          "node": "Node",
          "number": "Number",
          "object": "Object",
          "promise": "Promise",
          "string": "String"
        },
        "matchDescription": ".+\\.($|\\n)",
        "requireParamDescription": true,
        "requireReturnType": true,
        "requireParamType": true
      }
    ],
    "array-callback-return": [
      0,
      {
        "allowImplicit": true,
        "checkForEach": false
      }
    ],
    "curly": [
      2,
      "all"
    ],
    "default-param-last": [
      2
    ],
    "dot-location": [
      2,
      "property"
    ],
    "no-empty-function": [
      2,
      {
        "allow": [
          "arrowFunctions"
        ]
      }
    ],
    "no-param-reassign": [
      0,
      {
        "props": true,
        "ignorePropertyModificationsFor": [
          "acc",
          "accumulator",
          "e",
          "ctx",
          "context",
          "req",
          "request",
          "res",
          "response",
          "$scope",
          "staticContext"
        ]
      }
    ],
    "no-unmodified-loop-condition": [
      2
    ],
    "no-useless-call": [
      2
    ],
    "no-warning-comments": [
      2,
      {
        "terms": [
          "fixme",
          "xxx",
          "console",
          "stupid",
          "dumb",
          "fuck"
        ]
      }
    ],
    "strict": [
      "error",
      "never"
    ],
    "import/named": [
      "error"
    ],
    "import/default": [
      "off"
    ],
    "import/namespace": [
      "off"
    ],
    "import/export": [
      "error"
    ],
    "import/no-named-as-default": [
      "error"
    ],
    "import/no-named-as-default-member": [
      "error"
    ],
    "import/no-deprecated": [
      "off"
    ],
    "import/no-commonjs": [
      "off"
    ],
    "import/no-amd": [
      "error"
    ],
    "import/no-nodejs-modules": [
      "off"
    ],
    "import/first": [
      "error"
    ],
    "import/imports-first": [
      "off"
    ],
    "import/no-duplicates": [
      "error"
    ],
    "import/no-namespace": [
      "off"
    ],
    "import/newline-after-import": [
      "error"
    ],
    "import/prefer-default-export": [
      "error"
    ],
    "import/no-restricted-paths": [
      "off"
    ],
    "import/max-dependencies": [
      "off",
      {
        "max": 10
      }
    ],
    "import/no-absolute-path": [
      "error"
    ],
    "import/no-dynamic-require": [
      "error"
    ],
    "import/no-internal-modules": [
      "off",
      {
        "allow": []
      }
    ],
    "import/unambiguous": [
      "off"
    ],
    "import/no-webpack-loader-syntax": [
      "error"
    ],
    "import/no-unassigned-import": [
      "off"
    ],
    "import/no-named-default": [
      "error"
    ],
    "import/no-anonymous-default-export": [
      "off",
      {
        "allowArray": false,
        "allowArrowFunction": false,
        "allowAnonymousClass": false,
        "allowAnonymousFunction": false,
        "allowLiteral": false,
        "allowObject": false
      }
    ],
    "import/exports-last": [
      "off"
    ],
    "import/group-exports": [
      "off"
    ],
    "import/no-default-export": [
      "off"
    ],
    "import/no-named-export": [
      "off"
    ],
    "import/no-self-import": [
      "error"
    ],
    "import/no-cycle": [
      "error",
      {
        "maxDepth": "∞",
        "ignoreExternal": false
      }
    ],
    "import/no-useless-path-segments": [
      "error",
      {
        "commonjs": true
      }
    ],
    "import/dynamic-import-chunkname": [
      "off",
      {
        "importFunctions": [],
        "webpackChunknameFormat": "[0-9a-zA-Z-_/.]+"
      }
    ],
    "import/no-relative-parent-imports": [
      "off"
    ],
    "import/no-unused-modules": [
      "off",
      {
        "ignoreExports": [],
        "missingExports": true,
        "unusedExports": true
      }
    ],
    "import/no-import-module-exports": [
      "error",
      {
        "exceptions": []
      }
    ],
    "import/no-relative-packages": [
      "error"
    ],
    "arrow-body-style": [
      "error",
      "as-needed",
      {
        "requireReturnForObjectLiteral": false
      }
    ],
    "arrow-spacing": [
      "error",
      {
        "before": true,
        "after": true
      }
    ],
    "constructor-super": [
      "error"
    ],
    "generator-star-spacing": [
      "error",
      {
        "before": false,
        "after": true
      }
    ],
    "no-class-assign": [
      "error"
    ],
    "no-confusing-arrow": [
      "error",
      {
        "allowParens": true
      }
    ],
    "no-const-assign": [
      "error"
    ],
    "no-dupe-class-members": [
      "error"
    ],
    "no-duplicate-imports": [
      "off"
    ],
    "no-new-symbol": [
      "error"
    ],
    "no-restricted-exports": [
      "error",
      {
        "restrictedNamedExports": [
          "default",
          "then"
        ]
      }
    ],
    "no-restricted-imports": [
      "off",
      {
        "paths": [],
        "patterns": []
      }
    ],
    "no-this-before-super": [
      "error"
    ],
    "no-useless-computed-key": [
      "error"
    ],
    "no-useless-constructor": [
      "error"
    ],
    "no-useless-rename": [
      "error",
      {
        "ignoreDestructuring": false,
        "ignoreImport": false,
        "ignoreExport": false
      }
    ],
    "no-var": [
      "error"
    ],
    "prefer-arrow-callback": [
      "error",
      {
        "allowNamedFunctions": false,
        "allowUnboundThis": true
      }
    ],
    "prefer-destructuring": [
      "error",
      {
        "VariableDeclarator": {
          "array": false,
          "object": true
        },
        "AssignmentExpression": {
          "array": true,
          "object": false
        }
      },
      {
        "enforceForRenamedProperties": false
      }
    ],
    "prefer-numeric-literals": [
      "error"
    ],
    "prefer-reflect": [
      "off"
    ],
    "prefer-rest-params": [
      "error"
    ],
    "prefer-spread": [
      "error"
    ],
    "prefer-template": [
      "error"
    ],
    "require-yield": [
      "error"
    ],
    "sort-imports": [
      "off",
      {
        "ignoreCase": false,
        "ignoreDeclarationSort": false,
        "ignoreMemberSort": false,
        "memberSyntaxSortOrder": [
          "none",
          "all",
          "multiple",
          "single"
        ]
      }
    ],
    "symbol-description": [
      "error"
    ],
    "template-curly-spacing": [
      "error"
    ],
    "yield-star-spacing": [
      "error",
      "after"
    ],
    "init-declarations": [
      "off"
    ],
    "no-catch-shadow": [
      "off"
    ],
    "no-delete-var": [
      "error"
    ],
    "no-restricted-globals": [
      "error",
      {
        "name": "isFinite",
        "message": "Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite"
      },
      {
        "name": "isNaN",
        "message": "Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan"
      },
      "addEventListener",
      "blur",
      "close",
      "closed",
      "confirm",
      "defaultStatus",
      "defaultstatus",
      "event",
      "external",
      "find",
      "focus",
      "frameElement",
      "frames",
      "history",
      "innerHeight",
      "innerWidth",
      "length",
      "location",
      "locationbar",
      "menubar",
      "moveBy",
      "moveTo",
      "name",
      "onblur",
      "onerror",
      "onfocus",
      "onload",
      "onresize",
      "onunload",
      "open",
      "opener",
      "opera",
      "outerHeight",
      "outerWidth",
      "pageXOffset",
      "pageYOffset",
      "parent",
      "print",
      "removeEventListener",
      "resizeBy",
      "resizeTo",
      "screen",
      "screenLeft",
      "screenTop",
      "screenX",
      "screenY",
      "scroll",
      "scrollbars",
      "scrollBy",
      "scrollTo",
      "scrollX",
      "scrollY",
      "self",
      "status",
      "statusbar",
      "stop",
      "toolbar",
      "top"
    ],
    "no-shadow": [
      "error"
    ],
    "no-shadow-restricted-names": [
      "error"
    ],
    "no-undef": [
      "error"
    ],
    "no-unused-vars": [
      "error",
      {
        "vars": "all",
        "args": "after-used",
        "ignoreRestSiblings": true
      }
    ],
    "no-use-before-define": [
      "error",
      {
        "functions": true,
        "classes": true,
        "variables": true
      }
    ],
    "array-bracket-newline": [
      "off",
      "consistent"
    ],
    "array-element-newline": [
      "off",
      {
        "multiline": true,
        "minItems": 3
      }
    ],
    "array-bracket-spacing": [
      "error",
      "never"
    ],
    "block-spacing": [
      "error",
      "always"
    ],
    "brace-style": [
      "error",
      "1tbs",
      {
        "allowSingleLine": true
      }
    ],
    "camelcase": [
      "error",
      {
        "properties": "never",
        "ignoreDestructuring": false,
        "ignoreImports": false,
        "ignoreGlobals": false
      }
    ],
    "comma-spacing": [
      "error",
      {
        "before": false,
        "after": true
      }
    ],
    "comma-style": [
      "error",
      "last",
      {
        "exceptions": {
          "ArrayExpression": false,
          "ArrayPattern": false,
          "ArrowFunctionExpression": false,
          "CallExpression": false,
          "FunctionDeclaration": false,
          "FunctionExpression": false,
          "ImportDeclaration": false,
          "ObjectExpression": false,
          "ObjectPattern": false,
          "VariableDeclaration": false,
          "NewExpression": false
        }
      }
    ],
    "computed-property-spacing": [
      "error",
      "never"
    ],
    "eol-last": [
      "error",
      "always"
    ],
    "function-call-argument-newline": [
      "error",
      "consistent"
    ],
    "func-call-spacing": [
      "error",
      "never"
    ],
    "func-name-matching": [
      "off",
      "always",
      {
        "includeCommonJSModuleExports": false,
        "considerPropertyDescriptor": true
      }
    ],
    "func-style": [
      "off",
      "expression"
    ],
    "id-denylist": [
      "off"
    ],
    "id-match": [
      "off"
    ],
    "jsx-quotes": [
      "off",
      "prefer-double"
    ],
    "keyword-spacing": [
      "error",
      {
        "before": true,
        "after": true,
        "overrides": {
          "return": {
            "after": true
          },
          "throw": {
            "after": true
          },
          "case": {
            "after": true
          }
        }
      }
    ],
    "line-comment-position": [
      "off",
      {
        "position": "above",
        "ignorePattern": "",
        "applyDefaultPatterns": true
      }
    ],
    "linebreak-style": [
      "error",
      "unix"
    ],
    "lines-between-class-members": [
      "error",
      "always",
      {
        "exceptAfterSingleLine": false
      }
    ],
    "lines-around-directive": [
      "error",
      {
        "before": "always",
        "after": "always"
      }
    ],
    "max-depth": [
      "off",
      4
    ],
    "max-lines": [
      "off",
      {
        "max": 300,
        "skipBlankLines": true,
        "skipComments": true
      }
    ],
    "max-lines-per-function": [
      "off",
      {
        "max": 50,
        "skipBlankLines": true,
        "skipComments": true,
        "IIFEs": true
      }
    ],
    "max-nested-callbacks": [
      "off"
    ],
    "max-statements": [
      "off",
      10
    ],
    "max-statements-per-line": [
      "off",
      {
        "max": 1
      }
    ],
    "multiline-comment-style": [
      "off",
      "starred-block"
    ],
    "multiline-ternary": [
      "off",
      "never"
    ],
    "new-parens": [
      "error"
    ],
    "newline-after-var": [
      "off"
    ],
    "newline-before-return": [
      "off"
    ],
    "newline-per-chained-call": [
      "error",
      {
        "ignoreChainWithDepth": 4
      }
    ],
    "no-array-constructor": [
      "error"
    ],
    "no-inline-comments": [
      "off"
    ],
    "no-mixed-spaces-and-tabs": [
      "error"
    ],
    "no-multi-assign": [
      "error"
    ],
    "no-nested-ternary": [
      "error"
    ],
    "no-new-object": [
      "error"
    ],
    "no-plusplus": [
      "error"
    ],
    "no-restricted-syntax": [
      "error",
      {
        "selector": "ForInStatement",
        "message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
      },
      {
        "selector": "ForOfStatement",
        "message": "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."
      },
      {
        "selector": "LabeledStatement",
        "message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
      },
      {
        "selector": "WithStatement",
        "message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
      }
    ],
    "no-spaced-func": [
      "error"
    ],
    "no-tabs": [
      "error"
    ],
    "no-ternary": [
      "off"
    ],
    "no-unneeded-ternary": [
      "error",
      {
        "defaultAssignment": false
      }
    ],
    "no-whitespace-before-property": [
      "error"
    ],
    "nonblock-statement-body-position": [
      "error",
      "beside",
      {
        "overrides": {}
      }
    ],
    "object-curly-spacing": [
      "error",
      "always"
    ],
    "object-curly-newline": [
      "error",
      {
        "ObjectExpression": {
          "minProperties": 4,
          "multiline": true,
          "consistent": true
        },
        "ObjectPattern": {
          "minProperties": 4,
          "multiline": true,
          "consistent": true
        },
        "ImportDeclaration": {
          "minProperties": 4,
          "multiline": true,
          "consistent": true
        },
        "ExportDeclaration": {
          "minProperties": 4,
          "multiline": true,
          "consistent": true
        }
      }
    ],
    "one-var": [
      "error",
      "never"
    ],
    "one-var-declaration-per-line": [
      "error",
      "always"
    ],
    "padded-blocks": [
      "error",
      {
        "blocks": "never",
        "classes": "never",
        "switches": "never"
      },
      {
        "allowSingleLineBlocks": true
      }
    ],
    "prefer-exponentiation-operator": [
      "error"
    ],
    "prefer-object-spread": [
      "error"
    ],
    "quotes": [
      "error",
      "single",
      {
        "avoidEscape": true
      }
    ],
    "semi": [
      "error",
      "always"
    ],
    "semi-spacing": [
      "error",
      {
        "before": false,
        "after": true
      }
    ],
    "semi-style": [
      "error",
      "last"
    ],
    "sort-keys": [
      "off",
      "asc",
      {
        "caseSensitive": false,
        "natural": true
      }
    ],
    "sort-vars": [
      "off"
    ],
    "space-before-blocks": [
      "error"
    ],
    "space-in-parens": [
      "error",
      "never"
    ],
    "space-infix-ops": [
      "error"
    ],
    "spaced-comment": [
      "error",
      "always",
      {
        "line": {
          "exceptions": [
            "-",
            "+"
          ],
          "markers": [
            "=",
            "!",
            "/"
          ]
        },
        "block": {
          "exceptions": [
            "-",
            "+"
          ],
          "markers": [
            "=",
            "!",
            ":",
            "::"
          ],
          "balanced": true
        }
      }
    ],
    "switch-colon-spacing": [
      "error",
      {
        "after": true,
        "before": false
      }
    ],
    "template-tag-spacing": [
      "error",
      "never"
    ],
    "unicode-bom": [
      "error",
      "never"
    ],
    "callback-return": [
      "off"
    ],
    "global-require": [
      "error"
    ],
    "handle-callback-err": [
      "off"
    ],
    "no-buffer-constructor": [
      "error"
    ],
    "no-mixed-requires": [
      "off",
      false
    ],
    "no-new-require": [
      "error"
    ],
    "no-path-concat": [
      "error"
    ],
    "no-process-env": [
      "off"
    ],
    "no-process-exit": [
      "off"
    ],
    "no-restricted-modules": [
      "off"
    ],
    "no-sync": [
      "off"
    ],
    "for-direction": [
      "error"
    ],
    "getter-return": [
      "error",
      {
        "allowImplicit": true
      }
    ],
    "no-async-promise-executor": [
      "error"
    ],
    "no-await-in-loop": [
      "error"
    ],
    "no-compare-neg-zero": [
      "error"
    ],
    "no-cond-assign": [
      "error",
      "always"
    ],
    "no-console": [
      "warn"
    ],
    "no-control-regex": [
      "error"
    ],
    "no-debugger": [
      "error"
    ],
    "no-dupe-args": [
      "error"
    ],
    "no-dupe-else-if": [
      "error"
    ],
    "no-dupe-keys": [
      "error"
    ],
    "no-duplicate-case": [
      "error"
    ],
    "no-empty": [
      "error"
    ],
    "no-empty-character-class": [
      "error"
    ],
    "no-ex-assign": [
      "error"
    ],
    "no-extra-boolean-cast": [
      "error"
    ],
    "no-extra-semi": [
      "error"
    ],
    "no-func-assign": [
      "error"
    ],
    "no-import-assign": [
      "error"
    ],
    "no-inner-declarations": [
      "error"
    ],
    "no-invalid-regexp": [
      "error"
    ],
    "no-irregular-whitespace": [
      "error"
    ],
    "no-misleading-character-class": [
      "error"
    ],
    "no-obj-calls": [
      "error"
    ],
    "no-promise-executor-return": [
      "error"
    ],
    "no-prototype-builtins": [
      "error"
    ],
    "no-regex-spaces": [
      "error"
    ],
    "no-setter-return": [
      "error"
    ],
    "no-sparse-arrays": [
      "error"
    ],
    "no-template-curly-in-string": [
      "error"
    ],
    "no-unreachable": [
      "error"
    ],
    "no-unsafe-finally": [
      "error"
    ],
    "no-unsafe-negation": [
      "error"
    ],
    "no-unused-private-class-members": [
      "off"
    ],
    "no-useless-backreference": [
      "error"
    ],
    "no-negated-in-lhs": [
      "off"
    ],
    "require-atomic-updates": [
      "off"
    ],
    "use-isnan": [
      "error"
    ],
    "valid-typeof": [
      "error",
      {
        "requireStringLiterals": true
      }
    ],
    "accessor-pairs": [
      "off"
    ],
    "block-scoped-var": [
      "error"
    ],
    "complexity": [
      "off",
      20
    ],
    "class-methods-use-this": [
      "error",
      {
        "exceptMethods": [],
        "enforceForClassFields": true
      }
    ],
    "consistent-return": [
      "error"
    ],
    "default-case": [
      "error",
      {
        "commentPattern": "^no default$"
      }
    ],
    "default-case-last": [
      "error"
    ],
    "dot-notation": [
      "error",
      {
        "allowKeywords": true,
        "allowPattern": ""
      }
    ],
    "eqeqeq": [
      "error",
      "always",
      {
        "null": "ignore"
      }
    ],
    "grouped-accessor-pairs": [
      "error"
    ],
    "guard-for-in": [
      "error"
    ],
    "max-classes-per-file": [
      "error",
      1
    ],
    "no-alert": [
      "warn"
    ],
    "no-caller": [
      "error"
    ],
    "no-case-declarations": [
      "error"
    ],
    "no-constructor-return": [
      "error"
    ],
    "no-div-regex": [
      "off"
    ],
    "no-else-return": [
      "error",
      {
        "allowElseIf": false
      }
    ],
    "no-empty-pattern": [
      "error"
    ],
    "no-eq-null": [
      "off"
    ],
    "no-eval": [
      "error"
    ],
    "no-extend-native": [
      "error"
    ],
    "no-extra-bind": [
      "error"
    ],
    "no-extra-label": [
      "error"
    ],
    "no-fallthrough": [
      "error"
    ],
    "no-floating-decimal": [
      "error"
    ],
    "no-global-assign": [
      "error",
      {
        "exceptions": []
      }
    ],
    "no-native-reassign": [
      "off"
    ],
    "no-implicit-coercion": [
      "off",
      {
        "boolean": false,
        "number": true,
        "string": true,
        "allow": []
      }
    ],
    "no-implicit-globals": [
      "off"
    ],
    "no-implied-eval": [
      "error"
    ],
    "no-invalid-this": [
      "off"
    ],
    "no-iterator": [
      "error"
    ],
    "no-labels": [
      "error",
      {
        "allowLoop": false,
        "allowSwitch": false
      }
    ],
    "no-lone-blocks": [
      "error"
    ],
    "no-loop-func": [
      "error"
    ],
    "no-magic-numbers": [
      "off",
      {
        "ignore": [],
        "ignoreArrayIndexes": true,
        "enforceConst": true,
        "detectObjects": false
      }
    ],
    "no-multi-spaces": [
      "error",
      {
        "ignoreEOLComments": false
      }
    ],
    "no-multi-str": [
      "error"
    ],
    "no-new": [
      "error"
    ],
    "no-new-func": [
      "error"
    ],
    "no-new-wrappers": [
      "error"
    ],
    "no-nonoctal-decimal-escape": [
      "error"
    ],
    "no-octal": [
      "error"
    ],
    "no-octal-escape": [
      "error"
    ],
    "no-proto": [
      "error"
    ],
    "no-redeclare": [
      "error"
    ],
    "no-restricted-properties": [
      "error",
      {
        "object": "arguments",
        "property": "callee",
        "message": "arguments.callee is deprecated"
      },
      {
        "object": "global",
        "property": "isFinite",
        "message": "Please use Number.isFinite instead"
      },
      {
        "object": "self",
        "property": "isFinite",
        "message": "Please use Number.isFinite instead"
      },
      {
        "object": "window",
        "property": "isFinite",
        "message": "Please use Number.isFinite instead"
      },
      {
        "object": "global",
        "property": "isNaN",
        "message": "Please use Number.isNaN instead"
      },
      {
        "object": "self",
        "property": "isNaN",
        "message": "Please use Number.isNaN instead"
      },
      {
        "object": "window",
        "property": "isNaN",
        "message": "Please use Number.isNaN instead"
      },
      {
        "property": "__defineGetter__",
        "message": "Please use Object.defineProperty instead."
      },
      {
        "property": "__defineSetter__",
        "message": "Please use Object.defineProperty instead."
      },
      {
        "object": "Math",
        "property": "pow",
        "message": "Use the exponentiation operator (**) instead."
      }
    ],
    "no-return-assign": [
      "error",
      "always"
    ],
    "no-return-await": [
      "error"
    ],
    "no-script-url": [
      "error"
    ],
    "no-self-assign": [
      "error",
      {
        "props": true
      }
    ],
    "no-self-compare": [
      "error"
    ],
    "no-sequences": [
      "error"
    ],
    "no-throw-literal": [
      "error"
    ],
    "no-unused-expressions": [
      "error",
      {
        "allowShortCircuit": false,
        "allowTernary": false,
        "allowTaggedTemplates": false,
        "enforceForJSX": false
      }
    ],
    "no-unused-labels": [
      "error"
    ],
    "no-useless-catch": [
      "error"
    ],
    "no-useless-concat": [
      "error"
    ],
    "no-useless-escape": [
      "error"
    ],
    "no-useless-return": [
      "error"
    ],
    "no-void": [
      "error"
    ],
    "no-with": [
      "error"
    ],
    "prefer-promise-reject-errors": [
      "error",
      {
        "allowEmptyReject": true
      }
    ],
    "prefer-named-capture-group": [
      "off"
    ],
    "radix": [
      "error"
    ],
    "require-await": [
      "off"
    ],
    "require-unicode-regexp": [
      "off"
    ],
    "vars-on-top": [
      "error"
    ],
    "wrap-iife": [
      "error",
      "outside",
      {
        "functionPrototypeMethods": false
      }
    ],
    "yoda": [
      "error"
    ]
  },
  "settings": {
    "import/resolver": "webpack",
    "import/core-modules": [
      "../../resolver",
      "../../app",
      "./config/environment",
      "ember",
      "ember-qunit",
      "htmlbars-inline-precompile",
      "qunit"
    ],
    "import/extensions": [
      ".js",
      ".mjs",
      ".jsx"
    ],
    "import/ignore": [
      "node_modules",
      "\\.(coffee|scss|css|less|hbs|svg|json)$"
    ]
  },
  "ignorePatterns": [
    "/build/",
    "/config/",
    "/dist/",
    "/*.js",
    "/test/unit/coverage/",
    "/node_modules/"
  ]
}

What did you do?

<script>
  import Swiper, {
    Navigation,
    Pagination,
    Autoplay,
    Keyboard,
  } from 'swiper'; // <-- This line will throw an error.

  // ...
<script>

What did you expect to happen?
No linting error is given, since all idents are correct (closing bracket aligns with import line).

What actually happened?

A warning is given, that the closing bracket should be indented by one more step. This only happens if you import the default export and named exports at the same time.

grafik

Playground example (line 20)

Repository to reproduce this issue

You can use the following repository and branch to reproduce:
https://github.com/valantic/vue-template/tree/bugreport/eslint-plugin-vue_vue-script-indent

The error appears in the following files, when running npm run test:

  • src/components/c-swiper-gallery.vue
  • src/components/c-swiper-hero.vue
  • src/components/c-swiper-modal.vue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant