Skip to content

Commit 19fe927

Browse files
authored
deps: update dependencies and ESLint configuration (#3576)
* deps: update hono and @hono/node-server to fix security vulnerabilities Update transitive dependencies: - hono: 4.12.2 → 4.12.5 (fixes 3 high severity vulnerabilities) - @hono/node-server: 1.19.9 → 1.19.11 (fixes 1 high severity vulnerability) These packages are indirect dependencies via @heroku/mcp-server → @modelcontextprotocol/sdk. Reduced total vulnerabilities from 24 to 22. * deps: update express-rate-limit to fix security vulnerability Update transitive dependency: - express-rate-limit: 8.2.1 → 8.3.1 (fixes high severity IPv4-mapped IPv6 bypass) This package is an indirect dependency via @heroku/mcp-server → @modelcontextprotocol/sdk. Reduced total vulnerabilities from 22 to 21. * update package.json * deps: update npm to fix bundled dependency vulnerabilities Update transitive dependency: - npm: 10.9.4 → 10.9.5 (via @oclif/plugin-plugins) This fixes vulnerabilities in npm's bundled dependencies: - diff (low severity DoS) - glob (high severity command injection) Reduced total vulnerabilities from 21 to 20. * deps: upgrade TypeScript ESLint to v8 and remove eslint-config-oclif-typescript - Upgrade @typescript-eslint/eslint-plugin and @typescript-eslint/parser to 8.57.0 - Remove eslint-config-oclif-typescript dependency (no longer needed, causes minimatch vulnerabilities) - Replace with direct ESLint configuration using plugin:@typescript-eslint/recommended - Add eslint-plugin-perfectionist as direct dependency - Ignore .d.ts files from linting (best practice) - Disable strict TypeScript ESLint rules that don't apply to this codebase This fixes 4 high severity minimatch vulnerabilities by removing the transitive dependency chain through eslint-config-oclif-typescript. Reduced total vulnerabilities from 20 to 16 (14 high → 10 high). * deps: update ESLint config and fix perfectionist plugin compatibility * deps: update Node.js and dev dependencies * npm install * this check doesn't work correctly when switching channels, because plugins are reinstalled after the hooks run in that event. removing this check to avoid confusion * delete test for removed hook
1 parent 78d1582 commit 19fe927

File tree

7 files changed

+1539
-1625
lines changed

7 files changed

+1539
-1625
lines changed

.eslintrc.cjs

Lines changed: 56 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
11
module.exports = {
2-
// Global settings
3-
plugins: ['import', 'mocha'],
42
extends: [
53
'oclif',
6-
'oclif-typescript',
4+
'plugin:@typescript-eslint/eslint-recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:n/recommended',
7+
'plugin:import/recommended',
8+
'plugin:import/typescript',
9+
'plugin:perfectionist/recommended-natural-legacy',
710
'plugin:mocha/recommended',
811
],
9-
ignorePatterns: ['**/test/**/*.js', '**/oldCommands/**/*', 'dist/**'],
10-
12+
ignorePatterns: ['**/test/**/*.js', 'dist/**', '**/*.d.ts'],
1113
// TypeScript settings
1214
overrides: [
13-
{
14-
files: ['**/*{.ts,tsx}'],
15-
settings: {
16-
'import/parsers': {
17-
'@typescript-eslint/parser': ['.ts', '.tsx'],
18-
},
19-
'import/resolver': {
20-
typescript: {
21-
project: 'tsconfig.json',
22-
},
23-
},
24-
},
25-
},
2615
{
2716
files: ['**/test/**/*.ts', '**/test/**/*.js', 'test/**/*.ts', 'test/**/*.js'],
2817
rules: {
@@ -31,12 +20,21 @@ module.exports = {
3120
},
3221
},
3322
],
23+
parser: '@typescript-eslint/parser',
24+
25+
// Global settings
26+
plugins: ['import', 'mocha', '@typescript-eslint'],
3427

3528
rules: {
3629
'@typescript-eslint/explicit-module-boundary-types': 'off',
37-
'@typescript-eslint/no-empty-function': 'off',
30+
'@typescript-eslint/no-empty-function': 'warn',
31+
'@typescript-eslint/no-empty-interface': 'warn',
3832
'@typescript-eslint/no-explicit-any': 'warn',
39-
'@typescript-eslint/no-unused-vars': ['warn', {ignoreRestSiblings: true}], // TODO: fix issues and turn this back on
33+
'@typescript-eslint/no-require-imports': 'warn',
34+
'@typescript-eslint/no-unused-expressions': 'warn',
35+
'@typescript-eslint/no-unused-vars': ['warn', {argsIgnorePattern: '^_', ignoreRestSiblings: true}], // TODO: fix issues and turn this back on
36+
'@typescript-eslint/no-useless-constructor': 'error',
37+
'@typescript-eslint/no-var-requires': 'off',
4038
camelcase: 'off',
4139
'func-names': 'warn', // TODO: fix issues and turn this back on
4240
'import/default': 'warn',
@@ -48,7 +46,9 @@ module.exports = {
4846
'mocha/no-mocha-arrows': 'warn',
4947
'mocha/no-setup-in-describe': 'warn',
5048
'n/no-deprecated-api': 'warn', // TODO: fix issues and turn this back on
49+
'n/no-missing-import': 'off',
5150
'n/no-unsupported-features/es-builtins': 'warn', // TODO: fix issues and turn this back on
51+
'n/no-unsupported-features/es-syntax': 'off',
5252
'n/no-unsupported-features/node-builtins': 'warn', // TODO: fix issues and turn this back on
5353
'no-await-in-loop': 'off', // Perfect legit to use await in loops, we should leave it off
5454
'no-constant-condition': ['error', {checkLoops: false}],
@@ -58,15 +58,38 @@ module.exports = {
5858
'no-promise-executor-return': 'warn', // TODO: fix issues and turn this back on
5959
'no-prototype-builtins': 'warn', // TODO: fix issues and turn this back on
6060
'no-return-await': 'warn', // TODO: fix issues and turn this back on
61+
'no-unused-expressions': 'off',
62+
'no-useless-constructor': 'off',
6163
'node/no-missing-import': 'off', // using import/no-unresolved instead
6264
'object-curly-newline': 'warn',
63-
'perfectionist/sort-classes': 'warn',
65+
'perfectionist/sort-classes': [
66+
'warn',
67+
{
68+
groups: [
69+
'index-signature',
70+
'static-property',
71+
'property',
72+
'private-property',
73+
'constructor',
74+
'static-method',
75+
'static-private-method',
76+
['get-method', 'set-method'],
77+
'method',
78+
'private-method',
79+
'unknown',
80+
],
81+
order: 'asc',
82+
type: 'alphabetical',
83+
},
84+
],
6485
'perfectionist/sort-imports': 'warn',
6586
'perfectionist/sort-interfaces': 'warn',
6687
'perfectionist/sort-intersection-types': 'warn',
88+
'perfectionist/sort-modules': 'warn',
6789
'perfectionist/sort-named-imports': 'warn',
6890
'perfectionist/sort-object-types': 'warn',
6991
'perfectionist/sort-objects': 'warn',
92+
'perfectionist/sort-switch-case': 'off',
7093
'perfectionist/sort-union-types': 'warn',
7194
'prefer-object-spread': 'warn',
7295
radix: 'warn', // TODO: fix issues and turn this back on
@@ -93,6 +116,18 @@ module.exports = {
93116
'unicorn/prefer-string-replace-all': 'warn',
94117
'unicorn/prefer-string-slice': 'warn', // TODO: fix issues and turn this back on
95118
'unicorn/prefer-ternary': 'off', // TODO: fix issues and turn this back on
119+
'valid-jsdoc': ['warn', {requireParamType: false, requireReturnType: false}],
96120
'wrap-iife': 'warn', // TODO: fix issues and turn this back on
97121
},
122+
settings: {
123+
'import/parsers': {
124+
'@typescript-eslint/parser': ['.ts', '.tsx'],
125+
},
126+
'import/resolver': {
127+
typescript: {
128+
alwaysTryTypes: true,
129+
project: 'tsconfig.json',
130+
},
131+
},
132+
},
98133
}

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 22.22.0
1+
nodejs 22.22.1

0 commit comments

Comments
 (0)