Add ESLint configuration with flat config and integrate into CI workflow #32
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.
This PR adds ESLint to the project with a modern flat configuration setup and integrates it into the GitHub Actions workflow.
Changes Made
ESLint Setup
eslint- Core linting functionality@typescript-eslint/parser- TypeScript parser for ESLint@typescript-eslint/eslint-plugin- TypeScript-specific linting ruleseslint-config-prettier- Ensures compatibility with existing Prettier setupConfiguration Files
eslint.config.js- Modern flat config file with:src/**/*.tsfilesconsole.log(since this is a CLI tool)tsconfig.eslint.json- Extended TypeScript config for ESLint that includes test filesScripts
Added new npm scripts:
lint- Run ESLint on the codebaselint:fix- Run ESLint with automatic fixesCI Integration
Updated
.github/workflows/main.ymlto include a linting step that runs after formatting checks and before building.Code Cleanup
Fixed minor linting issues:
fsandpathin EntityParser.test.ts and MethodParser.test.ts)Testing
npm run lintandnpm run lint:fixwork as expectedThe ESLint configuration is designed to complement the existing TypeScript strict mode and Prettier setup, providing additional code quality checks without interfering with the current development workflow.
Fixes #17.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.