question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IDE ESLint integrations do not get full configuration

See original GitHub issue

Version

3.0.0-beta.6

Reproduction link

https://github.com/yangmingshan/vue-cli-demo

Steps to reproduce

If use import() ESLint will show error message [eslint] Parsing error: Unexpected token import in VS Code, but npm run lint is ok, don’t know why.

What is expected?

ESLint can parse experimental syntax

What is actually happening?

ESLint can’t parse experimental syntax


eslint-config-prettier eslint-config-standard eslint-config-airbnb both use default parser which can’t parse experimental syntax like import() for now, use babel-eslint can solve this problem.

Is this on purpose or a mistake?

If this is a mistake, I’m happy to open a PR 😜

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
yyx990803commented, Apr 26, 2018

This is because vue-cli-service lint has additional config that’s not included in the .eslintrc file, so your IDEs can’t figure it out.

Not really a bug of vue-cli itself, but can be improved so that it works with IDE linters out of the box.

1reaction
LinusBorgcommented, Mar 19, 2018

vue-cli 3.0.0-beta.6 not use babel-eslint by default

I think we may be missing this entry here:

parserOptions: {
  parser: 'babel-eslint'
}

according to this

I can’t run the reproduction until this evening, roughtly 9-10 hours away.

Thanks for the report!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint | IntelliJ IDEA Documentation - JetBrains
You can also configure ESLint to fix all the problems in a file when this file is saved. To configure such behavior, select...
Read more >
Configuring ESLint - ESLint - Pluggable JavaScript Linter
ESLint is designed to be flexible and configurable for your use case. ... JSON, or YAML file to specify configuration information for an...
Read more >
How To Lint and Format Code with ESLint in Visual Studio Code
Before you can access your ESLint configuration file, you will be prompted with different questions about your project. These questions are ...
Read more >
Eslint Basic Configuration - Medium
How to configure ESLint for Javascript Development and setup in Visual Studio Code, WebStorm, Atom and Sublime. If you don't use it already,...
Read more >
ESLint IDE Integration - Crafty
With the crafty ide command, a configuration file is generated to be read by your IDE. Note that these configuration files should not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found