-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add CodeRabbit automation improvements and AST-based handlers #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e079e2a
fix: migrate to ESLint v9 flat config format
AlmostBald-TRADING 8facebf
chore: trigger CI to test ESLint v9 configuration
AlmostBald-TRADING 646e976
fix: convert prepare.js to ES module syntax
AlmostBald-TRADING 0a6f118
refactor: extract shared TypeScript rules in ESLint config
AlmostBald-TRADING 7c95cb9
refactor: convert dev.js to ES module syntax
AlmostBald-TRADING 9952795
feat: integrate ESLint with Prettier to avoid conflicting rules
AlmostBald-TRADING b51e4d9
refactor: extract shared globals in ESLint config
AlmostBald-TRADING 03c056f
fix: update package-lock.json for eslint-config-prettier
AlmostBald-TRADING 02495e9
refactor: remove redundant global declarations from ESLint config
AlmostBald-TRADING 7730ab3
cleanup: remove legacy ESLint configuration file
AlmostBald-TRADING 09150aa
feat: add CodeRabbit automation improvements and AST-based handlers
AlmostBald-TRADING 169b04a
refactor: move test_json_handler.py to proper tests directory
AlmostBald-TRADING File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| import js from '@eslint/js'; | ||
| import typescript from '@typescript-eslint/eslint-plugin'; | ||
| import typescriptParser from '@typescript-eslint/parser'; | ||
| import globals from 'globals'; | ||
| import prettier from 'eslint-config-prettier'; | ||
|
|
||
| // Shared TypeScript rules used by both base and test configurations | ||
| const sharedTypeScriptRules = { | ||
| ...typescript.configs.recommended.rules, | ||
| '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], | ||
| '@typescript-eslint/explicit-function-return-type': ['error', { | ||
| allowExpressions: true, | ||
| allowTypedFunctionExpressions: true | ||
| }], | ||
| // Enforce explicit return types for exported/public APIs | ||
| '@typescript-eslint/explicit-module-boundary-types': 'error', | ||
| '@typescript-eslint/no-explicit-any': 'error', | ||
| '@typescript-eslint/no-inferrable-types': 'off', | ||
| '@typescript-eslint/strict-boolean-expressions': ['error', { | ||
| allowNullableObject: true | ||
| }], | ||
| 'prefer-const': 'error', | ||
| 'no-var': 'error', | ||
| 'no-unused-vars': 'off', // Turn off base rule as it can conflict with @typescript-eslint/no-unused-vars | ||
| }; | ||
|
|
||
| // Shared globals used by both base and test configurations | ||
| const sharedGlobals = { | ||
| ...globals.node, | ||
| ...globals.browser, | ||
| URL: 'readonly', | ||
| Response: 'readonly', | ||
| RequestInit: 'readonly', | ||
| AbortController: 'readonly', | ||
| }; | ||
|
|
||
| export default [ | ||
| js.configs.recommended, | ||
| prettier, | ||
| { | ||
| files: ['**/*.ts', '**/*.tsx'], | ||
| languageOptions: { | ||
| parser: typescriptParser, | ||
| parserOptions: { | ||
| ecmaVersion: 2020, | ||
| sourceType: 'module', | ||
| project: './tsconfig.json', | ||
| }, | ||
| globals: sharedGlobals, | ||
| }, | ||
| plugins: { | ||
| '@typescript-eslint': typescript, | ||
| }, | ||
| rules: sharedTypeScriptRules, | ||
| }, | ||
| { | ||
| files: ['tests/**/*.ts', '**/*.test.ts', '**/*.spec.ts'], | ||
| languageOptions: { | ||
| parser: typescriptParser, | ||
| parserOptions: { | ||
| ecmaVersion: 2020, | ||
| sourceType: 'module', | ||
| project: './tsconfig.test.json', | ||
| }, | ||
| globals: { | ||
| ...sharedGlobals, | ||
| ...globals.jest, | ||
| global: 'readonly', | ||
| Headers: 'readonly', | ||
| }, | ||
| }, | ||
| plugins: { | ||
| '@typescript-eslint': typescript, | ||
| }, | ||
| rules: sharedTypeScriptRules, | ||
| }, | ||
| { | ||
| ignores: [ | ||
| 'dist/**', | ||
| 'node_modules/**', | ||
| 'coverage/**', | ||
| '*.js', | ||
| '*.mjs', | ||
| ], | ||
| }, | ||
| ]; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| module.exports = { | ||
| export default { | ||
| preset: 'ts-jest/presets/default-esm', | ||
| globals: { | ||
| 'ts-jest': { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overly broad ignore pattern excludes all JavaScript files.
The current ignore pattern
*.jsand*.mjsexcludes ALL JavaScript files from linting, including:eslint.config.js)jest.config.js)scripts/dev.js,scripts/prepare.js)This prevents quality checks on configuration and tooling files that should be linted.
Consider replacing with more specific patterns that only ignore generated/compiled files:
ignores: [ 'dist/**', 'node_modules/**', 'coverage/**', - '*.js', - '*.mjs', + 'dist/**/*.js', + 'build/**/*.js', ],Or add a separate configuration block for
.jsand.mjsfiles if they should be linted with different rules:📝 Committable suggestion
🤖 Prompt for AI Agents