Skip to content
Open
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
21 changes: 10 additions & 11 deletions configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ const typescriptRules = {
'semi': 'off',
'@typescript-eslint/semi': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
// @typescript-eslint/member-delimiter-style was moved to @typescript-eslint/eslint-plugin stylistic package in v6
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/indent': ['error', 2],
'indent': 'off',
'@typescript-eslint/indent': ['error', 2], // overrides base indent rule for TypeScript files to handle TS-specific syntax correctly
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true, allowTypedFunctionExpressions: true }],
'@typescript-eslint/explicit-module-boundary-types': ['error', { allowArgumentsExplicitlyTypedAsAny: true }],
'@typescript-eslint/ban-types': ['error', { 'types': { '{}': false } }],
// @typescript-eslint/ban-types was removed in @typescript-eslint v6; @typescript-eslint/no-restricted-types is the replacement
'@typescript-eslint/no-restricted-types': ['error', { 'types': { '{}': false } }],
'@typescript-eslint/no-inferrable-types': ['error', { 'ignoreParameters': false, 'ignoreProperties': true }]
};

Expand All @@ -24,7 +27,6 @@ module.exports = {
],
plugins: [
'mocha',
'babel',
'react',
'react-hooks',
'import',
Expand Down Expand Up @@ -102,9 +104,7 @@ module.exports = {
'valid-typeof': 'error',
'wrap-iife': [ 'error', 'outside' ],
yoda: 'off',

'object-curly-spacing': 'off', // overridden with babel/object-curly-spacing
'babel/object-curly-spacing': [ 'error', 'always' ],
'object-curly-spacing': [ 'error', 'always' ], // replaces babel/object-curly-spacing (eslint-plugin-babel is deprecated; core rule covers the same functionality)

'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
Expand All @@ -120,13 +120,12 @@ module.exports = {
'import/export': 'error',
'import/no-named-as-default': 'error',
'import/no-named-as-default-member': 'error',
'import/no-duplicates': 'error',
'import/no-duplicates': 'error', // covers duplicate imports including TypeScript's 'import type'; replaces @typescript-eslint/no-duplicate-imports (removed in @typescript-eslint v6)

'@typescript-eslint/no-duplicate-imports': 'error',
'@typescript-eslint/no-extra-semi': 'error',
// '@typescript-eslint/no-duplicate-imports' was removed in @typescript-eslint v6; use import/no-duplicates instead
'@typescript-eslint/no-use-before-define': ['error', { 'functions': false, 'classes': false }],
'no-duplicate-imports': 'off',
'no-extra-semi': 'off',
'no-duplicate-imports': 'off', // disabled in favour of import/no-duplicates which handles TypeScript import type syntax
'no-extra-semi': 'off', // disabled in favour of @typescript-eslint/no-extra-semi for TS files; handled in typescriptRules
'no-use-before-define': 'off',
'eol-last': 'error',
'import/no-default-export': 'off',
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-siren",
"version": "2.4.8",
"version": "2.4.9",
"description": "Provides custom eslint rules developed by Siren",
"main": "index.js",
"license": "MIT",
Expand All @@ -17,30 +17,30 @@
"test": "jest"
},
"devDependencies": {
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-eslint-plugin": "^5.0.0",
"husky": "^4.3.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": ">=8 <10",
"eslint-plugin-eslint-plugin": "^6.0.0",
"husky": "^9.0.0",
"jest": "^29.0.0",
"typescript": ">=4.0.0"
"typescript": ">=4.7.0"
},
"husky": {
"hooks": {
"pre-commit": "yarn run lint && yarn run test"
}
},
Comment on lines 27 to 31
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Husky v9 no longer supports configuring Git hooks via the \"husky\": { \"hooks\": ... } block in package.json (that format was for older Husky versions like v4). With husky: ^9.0.0, this will likely stop your pre-commit hook from running. Migrate to the modern Husky setup (add a prepare script that runs Husky install, and move hooks into the .husky/ directory), or keep Husky on a compatible major version if you want to retain this config style.

Copilot uses AI. Check for mistakes.
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.0.0",
"eslint-plugin-mocha": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": ">=8 <10",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.0.0",
"eslint-plugin-mocha": "^10.5.0",
"eslint-plugin-prefer-object-spread": "^1.2.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-hooks": "^5.0.0",
"sync-request": "^6.1.0",
"typescript": ">=4.0.0"
"typescript": ">=4.7.0"
},
"packageManager": "yarn@4.10.3"
}