Skip to content

Commit 9258214

Browse files
committed
dependencies: bump eslint from 8.57.1 to 9.15.0
1 parent 41921ce commit 9258214

File tree

11 files changed

+1612
-4412
lines changed

11 files changed

+1612
-4412
lines changed

Diff for: .github/workflows/xpanse.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: npm install
2525
- name: Run EsLint
2626
working-directory: ./
27-
run: npx eslint . --ext .js,.jsx,.ts,.tsx --config package.json --max-warnings=0
27+
run: npx eslint . --max-warnings=0
2828
- name: Check Prettier Format
2929
working-directory: ./
3030
run: npx prettier --config .prettierrc --check .

Diff for: eslint.config.mjs

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
2+
import { FlatCompat } from '@eslint/eslintrc';
3+
import { default as eslint, default as js } from '@eslint/js';
4+
import tanstackQuery from '@tanstack/eslint-plugin-query';
5+
import cssModules from 'eslint-plugin-css-modules';
6+
import importPlugin from 'eslint-plugin-import';
7+
import react from 'eslint-plugin-react';
8+
import requireExplicitGenerics from 'eslint-plugin-require-explicit-generics';
9+
import path from 'node:path';
10+
import { fileURLToPath } from 'node:url';
11+
import tseslint from 'typescript-eslint';
12+
13+
const __filename = fileURLToPath(import.meta.url);
14+
const __dirname = path.dirname(__filename);
15+
const compat = new FlatCompat({
16+
baseDirectory: __dirname,
17+
recommendedConfig: js.configs.recommended,
18+
allConfig: js.configs.all,
19+
});
20+
21+
export default [
22+
{
23+
ignores: [
24+
'src/xpanse-api/**/*',
25+
'public/OidcServiceWorker.js',
26+
'public/inject.js',
27+
'**/dist',
28+
'**/node_modules',
29+
'public/OidcTrustedDomains.js',
30+
'eslint.config.mjs',
31+
],
32+
},
33+
{
34+
files: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
35+
},
36+
{
37+
languageOptions: {
38+
parserOptions: {
39+
sourceType: 'module',
40+
projectService: {
41+
defaultProject: './tsconfig.json',
42+
},
43+
},
44+
},
45+
},
46+
eslint.configs.recommended,
47+
...tseslint.configs.strictTypeChecked,
48+
...tseslint.configs.stylisticTypeChecked,
49+
...tseslint.configs.recommendedTypeChecked,
50+
importPlugin.flatConfigs.recommended,
51+
...fixupConfigRules(
52+
compat.extends(
53+
'eslint:recommended',
54+
'plugin:prettier/recommended',
55+
'plugin:react/recommended',
56+
'plugin:react-hooks/recommended',
57+
'plugin:import/typescript'
58+
)
59+
),
60+
{
61+
plugins: {
62+
react: fixupPluginRules(react),
63+
'@tanstack/query': tanstackQuery,
64+
'require-explicit-generics': requireExplicitGenerics,
65+
'css-modules': fixupPluginRules(cssModules),
66+
},
67+
rules: {
68+
'react/jsx-uses-react': 'error',
69+
'react/jsx-uses-vars': 'error',
70+
'no-undef': 'off',
71+
'@typescript-eslint/no-inferrable-types': 'off',
72+
'@tanstack/query/exhaustive-deps': 'error',
73+
'no-console': 'error',
74+
'@typescript-eslint/no-dynamic-delete': 'off',
75+
'react/react-in-jsx-scope': 'off',
76+
'@typescript-eslint/no-deprecated': 'error',
77+
'no-unused-vars': 'off',
78+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
79+
},
80+
settings: {
81+
'import/parsers': {
82+
'@typescript-eslint/parser': ['.ts', '.tsx'],
83+
},
84+
'import/resolver': {
85+
typescript: true,
86+
node: false,
87+
},
88+
react: {
89+
version: 'detect',
90+
defaultVersion: '',
91+
},
92+
},
93+
},
94+
];

0 commit comments

Comments
 (0)