Conversation
73e3221 to
788ecff
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the ESLint configuration to v9 by converting all configs to ESM modules, reorganizing into subconfigs, and updating package metadata and lint commands.
- Refactor all
packages/*/eslint.config.jsand remove legacy.eslintrc.jsonfiles in favor of centralizedeslint.config.jsusing ESM imports. - Update
@trigen/eslint-configpackage to v9: add"type": "module", reviseexportsfield, bump peer/dependencies, and switch to@eslint/js. - Change lint scripts and nano-staged patterns to use new CLI flag (though flag validity should be verified).
Reviewed Changes
Copilot reviewed 61 out of 64 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/scripts/src/utils/files.js | Use bare catch instead of catch (err). |
| packages/scripts/src/utils/args.spec.js | Remove /* eslint-disable camelcase */ directive. |
| package.json | Update lint script to use --flag v10_config_lookup_from_file and bump ESLint to v9. |
| .nano-staged.json | Align staged file pattern and update lint command flag. |
Comments suppressed due to low confidence (3)
package.json:22
- The ESLint CLI does not recognize a
--flagoption. Please replace this with a valid flag (e.g.,--config,--resolve-plugins-relative-to) or remove it to ensure the lint script runs correctly.
"lint": "eslint --flag v10_config_lookup_from_file",
.nano-staged.json:2
- As above,
--flagis not a valid ESLint CLI option. Update this to use a supported flag or remove it to prevent failures during pre-commit linting.
"*.{c,m,}{js,ts}{x,}": "eslint --flag v10_config_lookup_from_file --fix"
packages/scripts/src/utils/args.spec.js:1
- [nitpick] The removal of
/* eslint-disable camelcase */may reintroduce lint errors if any identifiers use snake_case. Either revert the disable directive or rename identifiers to conform to camelCase.
import { describe, it, expect } from 'vitest'
Comment on lines
+38
to
39
| } catch { | ||
| throw new Error(`Can't find package.json`) |
There was a problem hiding this comment.
[nitpick] Using a bare catch without retaining the error object loses context. Consider using catch (err) and including err.message in the thrown error to aid debugging.
Suggested change
| } catch { | |
| throw new Error(`Can't find package.json`) | |
| } catch (err) { | |
| throw new Error(`Can't find package.json: ${err.message}`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.