-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Add ESLint 9, TypeScript ESLint, and Prettier configuration #1200
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
Merged
braedonsaunders
merged 2 commits into
main
from
claude/add-eslint-prettier-config-ieHMS
Jan 31, 2026
Merged
Changes from 1 commit
Commits
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 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,21 @@ | ||
| # Dependencies | ||
| node_modules/ | ||
|
|
||
| # Build outputs | ||
| .next/ | ||
| out/ | ||
| dist-tests/ | ||
|
|
||
| # Public assets | ||
| public/ | ||
|
|
||
| # WASM files | ||
| wasm/ | ||
|
|
||
| # Package manager files | ||
| package-lock.json | ||
| pnpm-lock.yaml | ||
|
|
||
| # Generated files | ||
| *.min.js | ||
| *.min.css |
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,10 @@ | ||
| { | ||
| "semi": true, | ||
| "singleQuote": true, | ||
| "tabWidth": 2, | ||
| "trailingComma": "es5", | ||
| "printWidth": 100, | ||
| "bracketSpacing": true, | ||
| "arrowParens": "always", | ||
| "endOfLine": "lf" | ||
| } |
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,49 @@ | ||
| import nextConfig from 'eslint-config-next'; | ||
| import eslintConfigPrettier from 'eslint-config-prettier'; | ||
| import tseslint from 'typescript-eslint'; | ||
|
|
||
| const eslintConfig = [ | ||
| // Global ignores (must be first) | ||
| { | ||
| ignores: [ | ||
| 'dist-tests/', | ||
| 'node_modules/', | ||
| 'public/', | ||
| 'wasm/', | ||
| '.next/', | ||
| 'out/', | ||
| ], | ||
| }, | ||
|
|
||
| // Next.js recommended config (includes TypeScript ESLint, React, etc.) | ||
| ...nextConfig, | ||
|
|
||
| // TypeScript-specific rule overrides | ||
| { | ||
| files: ['**/*.ts', '**/*.tsx'], | ||
| plugins: { | ||
| '@typescript-eslint': tseslint.plugin, | ||
| }, | ||
| rules: { | ||
| '@typescript-eslint/no-explicit-any': 'warn', | ||
| '@typescript-eslint/no-unused-vars': [ | ||
| 'error', | ||
| { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, | ||
| ], | ||
| }, | ||
| }, | ||
|
|
||
| // General rules for all files | ||
| { | ||
| rules: { | ||
| 'no-console': ['warn', { allow: ['warn', 'error'] }], | ||
| 'prefer-const': 'error', | ||
| eqeqeq: ['error', 'always'], | ||
| }, | ||
| }, | ||
|
|
||
| // Prettier config (must be last to override formatting rules) | ||
| eslintConfigPrettier, | ||
| ]; | ||
|
|
||
| export default eslintConfig; | ||
Oops, something went wrong.
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.
Because
eslint-config-nextexports a single legacy config object (not an array),...nextConfigwill throw aTypeError: object is not iterableas soon as ESLint loadseslint.config.mjs, sonpm run lintwill fail before any rules execute. This happens whenever the lint config is evaluated, so CI/dev linting is broken until the Next config is adapted (e.g., viaFlatCompator by using a flat-config export).Useful? React with 👍 / 👎.