Skip to content

Conversation

@dangreen
Copy link
Member

@dangreen dangreen commented Jul 5, 2025

No description provided.

@dangreen dangreen force-pushed the feat-eslint-9 branch 2 times, most recently from 73e3221 to 788ecff Compare July 5, 2025 19:26
@dangreen dangreen requested a review from Copilot July 5, 2025 20:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js and remove legacy .eslintrc.json files in favor of centralized eslint.config.js using ESM imports.
  • Update @trigen/eslint-config package to v9: add "type": "module", revise exports field, 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 --flag option. 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, --flag is 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`)
Copy link

Copilot AI Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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}`)

Copilot uses AI. Check for mistakes.
@dangreen dangreen merged commit 399fe4d into main Jul 5, 2025
5 checks passed
@dangreen dangreen deleted the feat-eslint-9 branch July 5, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants