Repository navigation
🔧 Upgrade Tooling: ESLint + Rollup - #155
Conversation
- Dropped the old "eslint-config-google" package. - Updated typescript-eslint to v8
- Upgrade to Rollup 4 with compatible CommonJS, node-resolve, and TypeScript plugins - Upgrade glob to v13 for Node.js 20 support and use its globSync API
This version supports Node 20+
|
@armando-navarro bump |
armando-navarro
left a comment
There was a problem hiding this comment.
Hi @KingDarBoja, thanks for splitting this out of #123, and sorry for the long wait. I built the branch and compared its output with main's. Three things before I approve, then a few small ones.
Required: CommonJS output options in rollup.config.js
Rollup 4 changed some CommonJS defaults, which changes the published .cjs.js bundles:
performancenow keeps a nativeimport('firebase/performance'), so Jest users get "A dynamic import callback was invoked without --experimental-vm-modules".- Every sub-package bundle loses the
__esModulemarker, sojest.spyOnon a namespace import no longer replaces the real function.
These three options bring the bundles back to today's output, apart from comments:
{
file: resolve(component, main),
format: 'cjs',
dynamicImportInCjs: false,
esModule: true,
interop: 'auto',
sourcemap: true
},Required: leftovers from the removed lint directives
The deleted eslint-disable comments left whitespace-only lines behind (git diff 2f2bb97 --check lists them), and the comments explaining them, such as "auth is used as a namespace to access types", now explain nothing. Please delete both.
Required: the jsdoc rules
The old config had these rules switched off. Turning them on adds 177 warnings to every lint run, and yarn lint:fix fills 16 files with empty @param stubs. I'd drop the jsdoc block and eslint-plugin-jsdoc from this PR and leave JSDoc for a separate change.
Optional
ecmaVersionandsourceTypeunderparserOptionsare ignored in flat config. Move them up tolanguageOptionsor delete them.- Renaming
rollup.config.jstorollup.config.mjsremoves the warning Node prints on every build. eslint.config.mjsneeds a final newline, and@eslint/jsandtypescript-eslintare out of alphabetical order indevDependencies.
If I've misread anything about the Rollup options, let me know.
armando-navarro
left a comment
There was a problem hiding this comment.
Thanks @KingDarBoja for the commits addressing my review. Everything looks good now. Approving.
Tooling Improvements
ESLint Changes
require-jsdocandvalid-jsdocrules by adding theeslint-plugin-jsdocplugin per https://eslint.org/docs/latest/rules/valid-jsdoc#rule-detailsRollup
This is the second stage of #123 pull request but solely focused on ESLint and Rollup tools.