Skip to content

Commit a438d12

Browse files
chore(deps): update dependency eslint to v9 (#196)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Kriese <[email protected]>
1 parent b7b2e57 commit a438d12

13 files changed

+606
-309
lines changed

.eslintignore

Lines changed: 0 additions & 16 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 85 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
/* eslint-disable import/no-named-as-default-member */
2+
import eslintContainerbase from '@containerbase/eslint-plugin';
3+
import js from '@eslint/js';
4+
import eslintConfigPrettier from 'eslint-config-prettier';
5+
import eslintPluginImport from 'eslint-plugin-import';
6+
import pluginPromise from 'eslint-plugin-promise';
7+
import globals from 'globals';
8+
import tseslint from 'typescript-eslint';
9+
import eslintJestPlugin from 'eslint-plugin-jest';
10+
11+
export default tseslint.config(
12+
{
13+
ignores: [
14+
'**/.git/',
15+
'**/.vscode',
16+
'**/node_modules/',
17+
'**/dist/',
18+
'**/coverage/',
19+
'**/__fixtures__/**/*',
20+
'**/__mocks__/**/*',
21+
'**/*.d.ts',
22+
'**/*.generated.ts',
23+
'tools/dist',
24+
'patches',
25+
],
26+
},
27+
{
28+
linterOptions: {
29+
reportUnusedDisableDirectives: true,
30+
},
31+
},
32+
js.configs.recommended,
33+
...tseslint.configs.recommendedTypeChecked.map((config) => ({
34+
...config,
35+
files: ['**/*.{ts,js,mjs,cjs}'],
36+
})),
37+
...tseslint.configs.stylisticTypeChecked.map((config) => ({
38+
...config,
39+
files: ['**/*.{ts,js,mjs,cjs}'],
40+
})),
41+
eslintPluginImport.flatConfigs.errors,
42+
eslintPluginImport.flatConfigs.warnings,
43+
eslintPluginImport.flatConfigs.recommended,
44+
eslintPluginImport.flatConfigs.typescript,
45+
eslintJestPlugin.configs['flat/recommended'],
46+
eslintJestPlugin.configs['flat/style'],
47+
pluginPromise.configs['flat/recommended'],
48+
eslintContainerbase.configs.all,
49+
eslintConfigPrettier,
50+
{
51+
files: ['**/*.{ts,js,mjs,cjs}'],
52+
53+
languageOptions: {
54+
globals: {
55+
...globals.node,
56+
},
57+
ecmaVersion: 'latest',
58+
sourceType: 'module',
59+
parserOptions: {
60+
projectService: true,
61+
tsconfigRootDir: import.meta.dirname,
62+
},
63+
},
64+
65+
settings: {
66+
'import/resolver': {
67+
typescript: {
68+
alwaysTryTypes: true,
69+
project: ['tsconfig.lint.json', 'tools/jsconfig.json'],
70+
},
71+
},
72+
},
73+
},
74+
{
75+
files: ['**/*.{ts,js,mjs,cjs}'],
76+
rules: {
77+
'import/no-extraneous-dependencies': [
78+
'error',
79+
{
80+
devDependencies: [
81+
'eslint.config.mjs',
82+
'test/**',
83+
'tools/**',
84+
'jest.config.js',
85+
'__mocks__/**',
86+
'**/*.test.ts',
87+
],
88+
},
89+
],
90+
91+
'require-await': 'error',
92+
'no-use-before-define': 0,
93+
'no-restricted-syntax': 0,
94+
'no-await-in-loop': 0,
95+
'prefer-destructuring': 'off',
96+
'prefer-template': 'off',
97+
'no-underscore-dangle': 0,
98+
'@typescript-eslint/camelcase': 'off',
99+
'@typescript-eslint/no-var-requires': 'off',
100+
'@typescript-eslint/explicit-member-accessibility': 0,
101+
'@typescript-eslint/explicit-function-return-type': 0,
102+
// '@typescript-eslint/no-explicit-any': 0,
103+
'@typescript-eslint/no-non-null-assertion': 0,
104+
105+
'@typescript-eslint/no-unused-vars': [
106+
'error',
107+
{
108+
vars: 'all',
109+
args: 'none',
110+
ignoreRestSiblings: false,
111+
},
112+
],
113+
114+
// TODO: fixme
115+
'@typescript-eslint/prefer-nullish-coalescing': 0,
116+
},
117+
},
118+
{
119+
files: ['**/*.test.ts'],
120+
121+
languageOptions: {
122+
globals: {
123+
...globals.jest,
124+
},
125+
},
126+
127+
rules: {
128+
'jest/expect-expect': 0,
129+
},
130+
},
131+
);

lib/ruby/requirement.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export type RawRequirement = Version | string | null;
2121
export type ParsedRequirement = [string, Version];
2222

2323
// TODO: consider richer `eql` semantics
24-
const defaultEql = (x: any, y: any): boolean => x === y;
25-
function uniq(array: any[], eql = defaultEql): any[] {
24+
const defaultEql = <T>(x: T, y: T): boolean => x === y;
25+
function uniq<T>(array: T[], eql = defaultEql): T[] {
2626
return array.filter((x, idx, arr) => arr.findIndex((y) => eql(x, y)) === idx);
2727
}
2828

lib/ruby/version.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ export class Version {
492492
let rhs = rhsegments[i] || 0;
493493
i += 1;
494494

495-
// eslint-disable-next-line no-continue
496495
if (lhs === rhs) continue;
497496

498497
const isLeftStr = typeof lhs === 'string';

package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,25 @@
2828
"prettier": "prettier --check --ignore-unknown '**/*.*'",
2929
"prettier-fix": "prettier --write --ignore-unknown '**/*.*'",
3030
"test": "run-s lint type-check jest",
31-
"type-check": "tsc --noEmit"
31+
"type-check": "tsc"
3232
},
3333
"devDependencies": {
34+
"@containerbase/eslint-plugin": "1.1.0",
35+
"@eslint/js": "9.14.0",
3436
"@renovate/eslint-plugin": "https://github.com/renovatebot/eslint-plugin#v0.0.5",
3537
"@tsconfig/node20": "20.1.4",
38+
"@types/eslint-config-prettier": "6.11.3",
3639
"@types/jest": "29.5.14",
37-
"@typescript-eslint/eslint-plugin": "8.13.0",
38-
"@typescript-eslint/parser": "8.13.0",
40+
"@types/node": "20.17.5",
3941
"conventional-changelog-conventionalcommits": "8.0.0",
40-
"eslint": "8.57.1",
42+
"eslint": "9.14.0",
4143
"eslint-config-prettier": "9.1.0",
4244
"eslint-formatter-gha": "1.5.1",
45+
"eslint-import-resolver-typescript": "3.6.3",
4346
"eslint-plugin-import": "2.31.0",
4447
"eslint-plugin-jest": "28.9.0",
4548
"eslint-plugin-promise": "7.1.0",
49+
"globals": "15.12.0",
4650
"husky": "9.1.6",
4751
"jest": "29.7.0",
4852
"jest-junit": "16.0.0",
@@ -53,7 +57,8 @@
5357
"prettier-plugin-packagejson": "2.5.3",
5458
"semantic-release": "24.2.0",
5559
"ts-jest": "29.2.5",
56-
"typescript": "5.6.3"
60+
"typescript": "5.6.3",
61+
"typescript-eslint": "8.14.0"
5762
},
5863
"packageManager": "[email protected]",
5964
"engines": {

0 commit comments

Comments
 (0)