Skip to content

arbitrary-module-namespace-identifier is showing an error in tests #3010

Open

Description

When running the tests locally, I see an odd error:

$ npm run test
...
Error while parsing D:\Source\eslint-plugin-import\tests\files\no-unused-modules\arbitrary-module-namespace-identifier-name-a.js
Line 2, column 17: Line 2: Unexpected token

  1 | const foo = 333
> 2 | export { foo as "foo" }
    |                 ^
  3 |
`parseForESLint` from parser `D:\Source\eslint-plugin-import\node_modules\babel-eslint\lib\index.js` is invalid and will just be ignored

Module export names can indeed be string literals in JavaScript.

But note that module export names cannot be string literals in TypeScript, and it seems the TypeScript compiler also mangles these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions