Skip to content

Don't try to read imported JSON files #267

Closed
Urigo/tortilla
#68
@sindresorhus

Description

In Node.js, this is valid and a common pattern:

var pkg = require('./package.json');

I got errors when I ran this plugin on got:

  test/headers.js:3
  ✖  3:17  Parse errors in imported module '../package.json': Line 2: Unexpected token (2:9)  import/namespace
  ✖  3:17  Parse errors in imported module '../package.json': Line 2: Unexpected token (2:9)  import/no-named-as-default-member
  ✖  3:17  Parse errors in imported module '../package.json': Line 2: Unexpected token (2:9)  import/no-named-as-default

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions