chore: upgrade repository to ESLint v10#8265
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the project to ESLint Flat Config by introducing eslint.config.mjs files and updating package.json dependencies across the repository. Feedback highlights several critical issues: the specified ESLint version (^10.0.0) is not yet stable and should be changed to ^9.0.0 to prevent installation errors. Additionally, the new configuration files currently only define global ignores and lack actual linting rules, which effectively disables linting. The removal of ESLint templates for generated libraries without providing replacements is also noted as a regression. Finally, a suggestion was made to standardize the coverage directory name in the ignore list for consistency.
I am having trouble creating individual review comments. Click here to see my feedback.
package.json (43)
ESLint version ^10.0.0 is specified, but version 10 has not been released as a stable version (the current major version is 9). This will cause installation failures as the package cannot be found on npm. Please use ^9.0.0 instead. Please verify this version status manually as automated checks can occasionally report valid versions as non-existent.
"eslint": "^9.0.0",
References
- Verify bot claims regarding non-existent npm package versions, as automated checks may occasionally report valid versions as non-existent.
handwritten/eslint.config.mjs (1-10)
This configuration file only defines global ignores. In ESLint Flat Config, an object containing only ignores acts as a global ignore, but since no other configuration objects are provided in the array, no linting rules will be applied. You need to import and include the base configuration (e.g., gts) and define language options to ensure linting remains active and follows the project's style guide.
packages/eslint.config.mjs (1-13)
Similar to the configuration in the handwritten directory, this file lacks any rules or parser settings, effectively disabling linting for the packages/ directory. Please ensure that the base configuration is correctly imported and applied to maintain code quality.
core/generator/gapic-generator-typescript/templates/cjs/typescript_gapic/.eslintrc.json.njk (1-4)
The ESLint configuration template for generated libraries has been removed without a Flat Config replacement (e.g., eslint.config.mjs.njk). This will cause all newly generated libraries to lack linting configuration, which is a significant regression in the generator's output.
core/generator/gapic-generator-typescript/templates/esm/typescript_gapic/.eslintrc.json.njk (1-4)
The ESLint configuration template for ESM-based generated libraries has been removed without a replacement. This will result in generated libraries missing their linting setup.
handwritten/bigquery-storage/package.json (48)
ESLint version ^10.0.0 is not yet available as a stable release. This should be updated to ^9.0.0 to match the current stable major version and avoid installation errors. Please verify this version status manually as automated checks can occasionally report valid versions as non-existent.
"eslint": "^9.0.0",
References
- Verify bot claims regarding non-existent npm package versions, as automated checks may occasionally report valid versions as non-existent.
packages/eslint.config.mjs (5)
Inconsistent coverage directory name. Other parts of the repository use coverage/ (without the leading dot). Using **/coverage/** would be more consistent with handwritten/eslint.config.mjs and standard tools like c8.
"**/coverage/**",
Upgrade ESLint dependencies to version 10 for both gapic libraries and handwritten libraries
Fixes #4590 🦕