Skip to content

AssertionError: 'baseToken' should not be null or undefined #1274

Closed
@raul338

Description

@raul338

Tell us about your environment

  • ESLint version: 6.8.0
  • eslint-plugin-vue version: 6.2.2
  • Node version: v12.18.3 on Windows

Please show your full configuration:

module.exports = {
  root: true,
  env: {
    node: true,
  },
  extends: [
    'plugin:vue/recommended',
    '@vue/standard',
  ],
  rules: {
    'comma-dangle': ['error', 'always-multiline'],
    strict: ['error', 'function'],
    'no-console': 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'vue/no-v-html': 'off',
    'vue/html-closing-bracket-newline': ['error', {
      singleline: 'never',
      multiline: 'never',
    }],
  },
  parserOptions: {
    parser: 'babel-eslint',
  },
}

What did you do?

<template>
  <div
    :style="{
      'top': top
    }"
    @click="backdropCloseEvent()" />
</template>
<script>
export default {
  name: 'Slider3',
  data () {
    return {
      top: 0,
    }
  },
  methods: {
    backdropCloseEvent () {
    },
  },
}
</script>

What did you expect to happen?
Run lint without errors.

What actually happened?

$ npm run lint

> [email protected] lint C:\REDACTED
> vue-cli-service lint

 ERROR  AssertionError [ERR_ASSERTION]: 'baseToken' should not be null or undefined.
Occurred while linting C:\REDACTED\src\components\Slider3.vue:9
AssertionError [ERR_ASSERTION]: 'baseToken' should not be null or undefined.
    at setOffset (C:\REDACTED\node_modules\eslint-plugin-vue\lib\utils\indent-common.js:292:5)
    at processNodeList (C:\REDACTED\node_modules\eslint-plugin-vue\lib\utils\indent-common.js:468:7)
    at EventEmitter.CallExpression (C:\REDACTED\node_modules\eslint-plugin-vue\lib\utils\indent-common.js:1074:7)
    at EventEmitter.emit (events.js:315:20)
    at NodeEventGenerator.applySelector (C:\REDACTED\node_modules\vue-eslint-parser\index.js:3309:26)
    at NodeEventGenerator.applySelectors (C:\REDACTED\node_modules\vue-eslint-parser\index.js:3323:22)
    at NodeEventGenerator.enterNode (C:\REDACTED\node_modules\vue-eslint-parser\index.js:3331:14)
    at traverse (C:\REDACTED\node_modules\vue-eslint-parser\index.js:115:13)
    at traverse (C:\REDACTED\node_modules\vue-eslint-parser\index.js:127:13)
    at traverse (C:\REDACTED\node_modules\vue-eslint-parser\index.js:122:21)
    at traverse (C:\REDACTED\node_modules\vue-eslint-parser\index.js:127:13)
    at traverse (C:\REDACTED\node_modules\vue-eslint-parser\index.js:127:13)
    at traverse (C:\REDACTED\node_modules\vue-eslint-parser\index.js:122:21)
    at traverse (C:\REDACTED\node_modules\vue-eslint-parser\index.js:127:13)
    at traverse (C:\REDACTED\node_modules\vue-eslint-parser\index.js:122:21)
    at traverseNodes (C:\REDACTED\node_modules\vue-eslint-parser\index.js:133:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `vue-cli-service lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

When changing @click="backdropCloseEvent()" /> to @click="backdropCloseEvent" /> it works and pass.

This error only appears when file is saved with CRLF line endings

Refs #1261

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions