gts icon indicating copy to clipboard operation
gts copied to clipboard

no-unpublished-import no longer throws an error by default

Open IchordeDionysos opened this issue 1 year ago • 3 comments

Steps to reproduce:

  1. Run npx gts init
  2. Use default options
  3. Add the following code at the top of index.ts
import * as gts from 'gts';
  1. Run npm run lint

Expected behaviour

It throws an error:

1:22  error  "gts" is not published  n/no-unpublished-import

Actual behaviour

There is no error being thrown.

Additional information

When adding src to the files array in the package.json, the behaviour is fixed, though it is debatable whether this is a desirable fix.

  "files": [
    "build/src",
    "src"
  ],

IchordeDionysos avatar Jun 12 '24 23:06 IchordeDionysos

I'll look into this.

tonycoco avatar Jun 13 '24 02:06 tonycoco

It seems like this is the proper fix: https://stackoverflow.com/questions/67551956/node-no-unpublished-import-chai-is-not-published/78616594#78616594

IchordeDionysos avatar Jun 13 '24 13:06 IchordeDionysos

Interesting but in my initial test that doesn't seem to work in our case

tonycoco avatar Jun 13 '24 21:06 tonycoco