Skip to content

Fix the new recommended ruleset #6

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

Merged
merged 1 commit into from
Nov 26, 2019
Merged

Conversation

DavidRouyer
Copy link
Contributor

Otherwise it fails with the following errors:

Error: Cannot read config file: C:\myrepo\node_modules\@vue\eslint-config-typescript\index
Error: ENOENT: no such file or directory, open 'C:\myrepo\node_modules\@vue\eslint-config-typescript\index'

Otherwise it fails with the following errors:
```
Error: Cannot read config file: C:\myrepo\node_modules\@VUE\eslint-config-typescript\index
Error: ENOENT: no such file or directory, open 'C:\myrepo\node_modules\@VUE\eslint-config-typescript\index'
```
@haoqunjiang
Copy link
Member

How did you encounter this problem? I've never seen such errors.
I believe the file extension is certainly omittable, as it has been also used in the airbnb config since a long time ago: https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/index.js

@DavidRouyer
Copy link
Contributor Author

@sodatea Here is a minimum reproducible example https://github.com/DavidRouyer/vue-cli-eslint

My environment:

  • Windows 10
  • Node.js 13.2.0
  • Vue CLI 4.0.5
  • Yarn 1.19.1

It failed on my Docker setup too so it's not related to Windows

Maybe something is misconfigured? You can take a look at the commit https://github.com/DavidRouyer/vue-cli-eslint/commit/295a76950f93d3480372291a74bb71fd18ce2fc1

@haoqunjiang
Copy link
Member

haoqunjiang commented Nov 26, 2019

Reproduced it. Really weird that I did not encounter the error before.
Thanks for the help!

@haoqunjiang haoqunjiang merged commit 1f4d6c6 into vuejs:master Nov 26, 2019
@vue-bot
Copy link

vue-bot commented Nov 26, 2019

Thanks again! 💚

@DavidRouyer
Copy link
Contributor Author

@sodatea The Airbnb config has an additional .map(require.resolve) on the extends array, which should do the trick to resolve files by omitting the extension

@haoqunjiang
Copy link
Member

But somehow it passed our tests… 🤔

@DavidRouyer
Copy link
Contributor Author

Are you sure you're testing both configurations? The @vue/typescript/recommended config doesn't seem to be tested

@haoqunjiang
Copy link
Member

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 this pull request may close these issues.

3 participants