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.

Use of promisify breaks compatibility with vscode eslint @vue/airbnb

See original GitHub issue

Version

3.0.0-beta.15

Reproduction link

https://codesandbox.io/s/vue

Steps to reproduce

Create a sample Vue project. Ensure eslint config includes: { “extends”: [ “plugin:vue/recommended”, “@vue/airbnb” ] } Open project in VS Code with eslint plugin. Open “Home.vue” file, wait for errors to come.

What is expected?

No error in “Problems” tab.

What is actually happening?

Resolve error: require(…).promisify is not a function (import/no-unresolved) Resolve error: require(…).promisify is not a function (import/no-extraneous-dependencies) Resolve error: require(…).promisify is not a function (import/no-duplicates) Resolve error: require(…).promisify is not a function (import/extensions) Resolve error: require(…).promisify is not a function (import/no-named-as-default) Resolve error: require(…).promisify is not a function (import/no-named-as-default-member) Unable to resolve path to module ‘@/components/HelloWorld.vue’. (import/no-unresolved)


Why This Happens

  1. eslintrc imports: @vue/airbnb
  2. https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/eslint-config-airbnb/index.js#L8
  3. https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/webpack.config.js#L7
  4. https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/Service.js#L11
  5. https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-shared-utils/index.js

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
sebj54commented, Jun 5, 2018

@yyx990803 You’re right, my bad… All my apologies, I’ll pay more attention at my repro scenarios next times.

I understand that you don’t have to lose too much time recreating the context of the issues, but you know your projects very well and it can be very hard for us (users) to figure out what we did wrong. Plus, the “closed” aspect of your message made me think the issue wasn’t taken seriously while the problem was actually my scenario. Maybe it would have been different with an open end to your message like “please add details to your scenario in a new issue”.

I’m not blaming you here, just trying to explain what happened and maybe enhance your issues.

Thanks for having taken your time to explain what was wrong in my issue. 🙏

1reaction
yyx990803commented, Jun 5, 2018

As I said:

  1. I can’t reproduce this with the latest VSCode (1.23.1) + VSCode ESLint plugin (1.4.12) + the exact project setup (@vue/airbnb) you described. Everything works as expected for me. Please make sure to update everything to the latest.

  2. Your ESLint plugin is linting files that are not even part of your project source code. The files containing util.promisify is inside your dependency, and your ESLint plugin is attempting to lint a dependency which is obviously wrong. This has nothing to do with what version of Node VSCode is using and there’s nothing Vue CLI can do about it - this is a problem with your editor/plugin setup. If anything, please report a bug to the VSCode ESLint plugin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate from TSLint to ESLint - Visual Studio Code
A guide to migrating extension projects from the TSLint linter to ESLint. ... For further options, check the utility's usage guide.
Read more >
Having a tough time setting up EsLint/Prettier to work with Volar
I'm having a tough time understanding how VSCode with the Volar extension, Eslint and Prettier all work together. I followed this article to ......
Read more >
How To Lint and Format Code with ESLint in Visual Studio Code
You can use a linter to do this. Linters check your code for syntax errors and highlight errors to make sure you can...
Read more >
How to configure Prettier and VSCode - Gleb Bahmutov
Use Eslint with Prettier. Disable style rules in ESLint; ESLint and React; Integrate ESLint in VSCode; Run Prettier from ESLint; VSCode + ...
Read more >
VS Code Can Do That?
This includes multiple then statements, Promise.all() and Promise.race() . ... Use the Breadcrumbs feature in VS Code to quickly jump between folders, ...
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