Skip to content

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

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
raul338 opened this issue Aug 11, 2020 · 2 comments · Fixed by #1332
Closed

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

raul338 opened this issue Aug 11, 2020 · 2 comments · Fixed by #1332

Comments

@raul338
Copy link

raul338 commented Aug 11, 2020

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

> puma@0.1.0 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! puma@0.1.0 lint: `vue-cli-service lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puma@0.1.0 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

@ota-meshi
Copy link
Member

Thank you for this issue.
This issue is related to parser issue.

vuejs/vue-eslint-parser#74

@tobiasdalhof
Copy link

Thank you for this issue.
This issue is related to parser issue.

mysticatea/vue-eslint-parser#74

Bummer that the PR's are not being merged. I feel like vue-eslint-parser should be a official vue package under the vuejs namespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants