google / google/gts

eslint.config.js at package root references nonexistent ./src/index.js

Open
#963 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.3k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

**Description:**

`gts/eslint.config.js` shipped at the package root does require('./src/index.js'), but only `build/src/index.js` is included in the published tarball.

Consumers doing `require('gts/eslint.config.js')` from their own flat ESLint config get `MODULE_NOT_FOUND`. The working path is
`gts/build/eslint.config.js`. Suggested fix: either remove the top-level `eslint.config.js` / `eslint.ignores.js` from files in `package.json` and point users at the build/ copy, or change the top-level file to `require('./build/src/index.js')`. Or add an exports map to disambiguate.

**Reproducer:**

see test in any consumer project — node -e "require('gts/eslint.config.js')" throws; node -e "require('gts/build/eslint.config.js')" works.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.