Summary
The shared tsconfig and eslint-config packages currently only target TypeScript files. Consider extending support to JavaScript files (.js, .mjs, .cjs) and ensuring .mts/.cts coverage.
Context
The eslint-config strictTypeChecked preset and projectService require linted files to be part of a TypeScript project. JavaScript files outside the tsconfig include cause was not found by the project service errors.
Most plugin configs in eslint-config use **/*.ts without .mts/.cts — only node.ts includes all three. A shared tsFiles pattern would ensure consistency.
Areas to evaluate
- tsconfig: Add
allowJs: true and include JS file patterns in generated tsconfigs
- eslint-config: Define a shared
tsFiles glob (.ts, .mts, .cts) used by all plugin configs, and extend to JS when ready
disableTypeChecked: Currently covers JSON/YAML — may need to cover JS files if allowJs isn't enabled, or use allowDefaultProject as a fallback
- vitest: Test file patterns (
**/test/**/*.ts, **/e2e/**/*.ts) should also cover .mts/.cts
- entryPoints: Default patterns (
**/bin/**/*.ts, **/scripts/**/*.ts) should also cover .mts/.cts
Motivation
Consumer repos may have JS files (config files, scripts, legacy code) that should be linted by the shared config. Even without JS support, .mts/.cts files are currently missed by most plugin configs.
Summary
The shared tsconfig and eslint-config packages currently only target TypeScript files. Consider extending support to JavaScript files (
.js,.mjs,.cjs) and ensuring.mts/.ctscoverage.Context
The eslint-config
strictTypeCheckedpreset andprojectServicerequire linted files to be part of a TypeScript project. JavaScript files outside the tsconfigincludecausewas not found by the project serviceerrors.Most plugin configs in eslint-config use
**/*.tswithout.mts/.cts— onlynode.tsincludes all three. A sharedtsFilespattern would ensure consistency.Areas to evaluate
allowJs: trueand include JS file patterns in generated tsconfigstsFilesglob (.ts,.mts,.cts) used by all plugin configs, and extend to JS when readydisableTypeChecked: Currently covers JSON/YAML — may need to cover JS files ifallowJsisn't enabled, or useallowDefaultProjectas a fallback**/test/**/*.ts,**/e2e/**/*.ts) should also cover.mts/.cts**/bin/**/*.ts,**/scripts/**/*.ts) should also cover.mts/.ctsMotivation
Consumer repos may have JS files (config files, scripts, legacy code) that should be linted by the shared config. Even without JS support,
.mts/.ctsfiles are currently missed by most plugin configs.