Skip to content

chore(lint): adopt eslint flat config with naming-convention policy#821

Merged
lcottercertinia merged 2 commits into
certinia:mainfrom
lukecotter:chore-eslint-flat-config
Jun 19, 2026
Merged

chore(lint): adopt eslint flat config with naming-convention policy#821
lcottercertinia merged 2 commits into
certinia:mainfrom
lukecotter:chore-eslint-flat-config

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

📝 PR Overview

Migrates ESLint to the flat config format (defineConfig/globalIgnores) and replaces the blanket naming-convention: warn with a structured policy. This lets the codebase drop a scattering of eslint-disable @typescript-eslint/naming-convention comments and scopes linting to TypeScript only, so eslint . no longer silently scans unconfigured .js/.mjs files.

🛠️ Changes made

  • Rewrite eslint.config.mjs to flat defineConfig/globalIgnores; pin files: ['**/*.ts'] so eslint . skips .js/.mjs/.cjs (which would otherwise be scanned with no rules).
  • Add a structured @typescript-eslint/naming-convention policy: PascalCase imports/consts, UPPER_CASE static readonly fields, and format: null for object keys that mirror external data (Salesforce fields, Apex event names).
  • Remove the now-redundant eslint-disable naming-convention comments across the timeline, soql, salesforce, and call-tree modules the new policy legitimately permits.
  • Drop the direct @typescript-eslint/parser devDependency (now transitive via typescript-eslint) and switch the lint script to eslint . --cache.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

📷 Screenshots / gifs / video [optional]

N/A — tooling/config only.

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site
  • 🧪 Marked any pre-release-only features (README 🧪 badge — see RELEASING.md)
  • 🙅 not needed

Anything else we need to know? [optional]

Reviewer note: the substantive change is eslint.config.mjs; the 18 source/test files are mechanical removals of disable comments (plus a few eqeqeq/prefer-const/anyunknown fixes the stricter config surfaced). pnpm lint passes with 0 errors.

- replace tseslint.config + manual @typescript-eslint/parser with defineConfig/globalIgnores, scoping lint to
**/*.ts so `eslint .` skips unconfigured js/mjs/cjs
- add structured @typescript-eslint/naming-convention selectors (PascalCase imports/consts, null format for external-data object keys) in place of the blanket warn
- drop now-redundant `eslint-disable naming-convention` comments across timeline, soql, and salesforce modules the new policy permits
- remove @typescript-eslint/parser dep (now transitive via typescript-eslint) and switch the lint script to `eslint . --cache`
@lcottercertinia lcottercertinia merged commit eee5e43 into certinia:main Jun 19, 2026
7 checks passed
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