-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
index.js
:
#!/usr/bin/env node
import { example } from './foo.js'
export { example }
foo.js
:
export const example = true
.eslintrc.yml
:
parserOptions:
ecmaVersion: 2019
sourceType: module
plugins: [import]
rules:
import/no-unused-modules: [2, {unusedExports: true}]
Then:
$ eslint
/home/user/example/foo.js
1:1 error exported declaration 'example' not used within other modules import/no-unused-modules
✖ 1 problem (1 error, 0 warnings)
However this works when removing #!/usr/bin/env node
.
eslint
: 5.16.0
eslint-plugin-import
: 2.17.3
node
: 12.3.1
OS: Ubuntu 19.04
silverwind and kevinoid