Skip to content
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

file-extension-in-import does not work with scoped packages #160

Closed
ehmicky opened this issue May 3, 2019 · 2 comments
Closed

file-extension-in-import does not work with scoped packages #160

ehmicky opened this issue May 3, 2019 · 2 comments
Labels

Comments

@ehmicky
Copy link

ehmicky commented May 3, 2019

Packages are skipped by file-extension-in-import (which is good). However @scoped/packages are not skipped.

index.js:

import '@gulp-sourcemaps/map-sources'

.eslintrc.yml:

parserOptions:
  ecmaVersion: 2019
  sourceType: module
plugins: [node]
rules:
  node/file-extension-in-import: 2

package.json:

{
  "name": "eslint-plugin-node-bug",
  "version": "1.0.0",
  "license": "ISC",
  "devDependencies": {
    "@gulp-sourcemaps/map-sources": "^1.0.0",
    "eslint": "^5.16.0",
    "eslint-plugin-node": "^9.0.0"
  }
}
$ eslint index.js

/home/ehmicky/eslint-plugin-node-bug/index.js
  1:8  error  require file extension '.js'  node/file-extension-in-import

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.
@ehmicky ehmicky changed the title node/file-extension-in-import does not work with scoped packages file-extension-in-import does not work with scoped packages May 3, 2019
@mysticatea mysticatea added the bug label May 4, 2019
@mysticatea
Copy link
Owner

Thank you for the report. Yes, it's a bug.

@ehmicky
Copy link
Author

ehmicky commented May 4, 2019

Thanks for the quick fix!

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

No branches or pull requests

2 participants