Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .eslintrc.js

This file was deleted.

45 changes: 45 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import eslint from '@eslint/js';
import prettierConfig from 'eslint-config-prettier';
import prettierPlugin from 'eslint-plugin-prettier';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import tsdoc from 'eslint-plugin-tsdoc';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default [
// Base ESLint recommended rules
eslint.configs.recommended,

// TypeScript ESLint recommended rules
...tseslint.configs.recommended,

// Prettier config (disables conflicting rules)
prettierConfig,

// Main configuration
{
files: ['**/*.ts', '**/*.tsx'],
plugins: {
'@typescript-eslint': tseslint.plugin,
'simple-import-sort': simpleImportSort,
'tsdoc': tsdoc,
'prettier': prettierPlugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: './tsconfig.json',
},
globals: {
...globals.node,
...globals.es2021,
},
},
rules: {
'prettier/prettier': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'tsdoc/syntax': 'warn',
},
},
];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Explicit ignores needed in ESLint 9 flat config

The new ESLint 9 flat config is missing an ignores configuration. ESLint 9 does not automatically respect .eslintignore files - ignores must be explicitly configured in the flat config. Without this, ESLint will attempt to lint files in dist/, node_modules/, coverage/, and other build artifacts, which can cause errors or significantly slow down linting. The configuration should include an ignores array, e.g., { ignores: ['dist/**', 'coverage/**', 'node_modules/**', 'docs/**', '**/*.js', '**/*.mjs', '**/*.cjs'] } as a separate config object at the beginning of the array.

Fix in Cursor Fix in Web

18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"devDependencies": {
"@commitlint/config-conventional": "^20.0.0",
"@eslint/js": "^9.39.1",
"@mxssfd/typedoc-theme": "^1.1.3",
"@semantic-release/git": "^10.0.1",
"@size-limit/esbuild": "^11.2.0",
Expand All @@ -62,21 +63,24 @@
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"commitlint": "^20.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-formatter-unix": "^9.0.1",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-tsdoc": "^0.4.0",
"globals": "^16.5.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
"lint-staged": "^16.2.6",
"prettier": "^3.3.0",
"prettier": "^3.6.2",
"semantic-release": "^24.0.0",
"size-limit": "^11.2.0",
"ts-jest": "^29.2.0",
"tsup": "^8.3.0",
"type-coverage": "^2.29.7",
"typedoc": "^0.27.0",
"typescript": "^5.6.3"
"typescript": "^5.6.3",
"typescript-eslint": "^8.46.3"
}
}
Loading