Skip to content

Commit d20572f

Browse files
nicolethoenclaude
andcommitted
chore(deps): bump dependencies and migrate to ESLint 9 flat config
- Bump @babel/core, @babel/preset-* to latest 7.x - Bump jest, babel-jest, jest-environment-jsdom to ^30.3.0 - Bump @testing-library/jest-dom to ^6.9.1 - Bump @testing-library/user-event to 14.6.1 - Bump concurrently to ^9.2.1, prettier to 3.8.1, typescript to ^5.9.3 - Bump file-saver to ^2.0.5, xterm to ^5.3.0, rimraf to ^6.1.3 - Bump monaco-editor to ^0.55.1, serve to ^14.2.6, tslib to ^2.8.1 - Migrate ESLint 8 to ESLint 9 with flat config - Replace @typescript-eslint/eslint-plugin + parser with typescript-eslint v8 - Replace eslint-plugin-markdown with @eslint/markdown - Remove eslint-config-standard-with-typescript, eslint-plugin-n, eslint-plugin-prettier, eslint-plugin-promise, eslint-plugin-import - Replace react-jss with inline styles (removes vulnerable @babel/runtime) - Reduce audit vulnerabilities from 91 to 73, eliminate critical severity Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f01469d commit d20572f

21 files changed

Lines changed: 4186 additions & 2342 deletions

.eslintignore

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

.eslintrc-md.json

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

.eslintrc.json

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

eslint-md.config.mjs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import markdown from '@eslint/markdown';
2+
import react from 'eslint-plugin-react';
3+
4+
export default [
5+
{
6+
ignores: [
7+
'**/dist/**',
8+
'**/public/**',
9+
'**/.cache/**',
10+
'**/node_modules/**',
11+
'**/generated/**',
12+
'**/CHANGELOG.md',
13+
'**/*.js',
14+
'**/*.jsx',
15+
'**/*.ts',
16+
'**/*.tsx'
17+
]
18+
},
19+
{
20+
files: ['packages/**/*.md'],
21+
plugins: {
22+
markdown
23+
},
24+
language: 'markdown/gfm',
25+
rules: {
26+
'markdown/no-multiple-h1': 'off',
27+
'markdown/heading-increment': 'off',
28+
'markdown/no-missing-label-refs': 'off'
29+
}
30+
},
31+
{
32+
files: ['packages/**/*.md/*.js', 'packages/**/*.md/*.jsx'],
33+
plugins: {
34+
react
35+
},
36+
languageOptions: {
37+
ecmaVersion: 2020,
38+
sourceType: 'module',
39+
parserOptions: {
40+
ecmaFeatures: {
41+
jsx: true
42+
}
43+
}
44+
},
45+
settings: {
46+
react: {
47+
version: '18'
48+
}
49+
},
50+
rules: {
51+
'eol-last': 'error',
52+
'spaced-comment': 'error',
53+
'no-unused-vars': 'off',
54+
'no-this-before-super': 'error',
55+
'react/jsx-uses-react': 'error',
56+
'react/jsx-uses-vars': 'error',
57+
'react/no-unknown-property': 'error',
58+
'react/jsx-no-undef': 'error'
59+
}
60+
}
61+
];

eslint.config.mjs

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
import js from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import react from 'eslint-plugin-react';
4+
import reactHooks from 'eslint-plugin-react-hooks';
5+
import prettier from 'eslint-config-prettier';
6+
import globals from 'globals';
7+
8+
export default [
9+
{
10+
ignores: [
11+
'**/dist/**',
12+
'**/public/**',
13+
'**/.cache/**',
14+
'**/node_modules/**',
15+
'**/*.md',
16+
'**/tsc_out/**',
17+
'**/.out/**',
18+
'**/.changelog/**',
19+
'**/coverage/**',
20+
'**/.tmp/**',
21+
'**/generated/**'
22+
]
23+
},
24+
js.configs.recommended,
25+
...tseslint.configs.recommended,
26+
prettier,
27+
{
28+
files: ['packages/**/*.{js,jsx,ts,tsx}'],
29+
plugins: {
30+
react,
31+
'react-hooks': reactHooks
32+
},
33+
languageOptions: {
34+
ecmaVersion: 'latest',
35+
sourceType: 'module',
36+
globals: {
37+
...globals.browser,
38+
...globals.node
39+
},
40+
parserOptions: {
41+
ecmaFeatures: {
42+
jsx: true
43+
}
44+
}
45+
},
46+
settings: {
47+
react: {
48+
version: 'detect'
49+
}
50+
},
51+
rules: {
52+
...react.configs.recommended.rules,
53+
...react.configs['jsx-runtime'].rules,
54+
...reactHooks.configs.recommended.rules,
55+
56+
'@typescript-eslint/adjacent-overload-signatures': 'error',
57+
'@typescript-eslint/array-type': 'error',
58+
'@typescript-eslint/consistent-type-assertions': 'error',
59+
'@typescript-eslint/consistent-type-definitions': 'error',
60+
'@typescript-eslint/no-misused-new': 'error',
61+
'@typescript-eslint/no-namespace': 'error',
62+
'@typescript-eslint/no-unused-vars': [
63+
'error',
64+
{
65+
argsIgnorePattern: '^_'
66+
}
67+
],
68+
'@typescript-eslint/prefer-for-of': 'error',
69+
'@typescript-eslint/prefer-function-type': 'error',
70+
'@typescript-eslint/prefer-namespace-keyword': 'error',
71+
'@typescript-eslint/unified-signatures': 'error',
72+
'@typescript-eslint/no-require-imports': 'off',
73+
'@typescript-eslint/no-explicit-any': 'off',
74+
'arrow-body-style': 'error',
75+
camelcase: [
76+
'error',
77+
{
78+
ignoreDestructuring: true
79+
}
80+
],
81+
'constructor-super': 'error',
82+
curly: 'error',
83+
'dot-notation': 'error',
84+
eqeqeq: ['error', 'smart'],
85+
'guard-for-in': 'error',
86+
'max-classes-per-file': ['error', 1],
87+
'no-nested-ternary': 'error',
88+
'no-bitwise': 'error',
89+
'no-caller': 'error',
90+
'no-cond-assign': 'error',
91+
'no-console': 'error',
92+
'no-debugger': 'error',
93+
'no-empty': 'error',
94+
'no-eval': 'error',
95+
'no-new-wrappers': 'error',
96+
'no-undef-init': 'error',
97+
'no-unsafe-finally': 'error',
98+
'no-unused-expressions': 'off',
99+
'@typescript-eslint/no-unused-expressions': [
100+
'error',
101+
{
102+
allowTernary: true,
103+
allowShortCircuit: true
104+
}
105+
],
106+
'no-unused-labels': 'error',
107+
'no-var': 'error',
108+
'object-shorthand': 'error',
109+
'one-var': ['error', 'never'],
110+
'prefer-const': 'error',
111+
radix: ['error', 'as-needed'],
112+
'react/prop-types': 0,
113+
'react/display-name': 0,
114+
'react-hooks/exhaustive-deps': 'warn',
115+
'react/no-unescaped-entities': ['error', { forbid: ['>', '}'] }],
116+
'spaced-comment': 'error',
117+
'use-isnan': 'error'
118+
}
119+
},
120+
{
121+
files: ['**/patternfly-docs/pages/*'],
122+
rules: {
123+
'arrow-body-style': 'off'
124+
}
125+
}
126+
];

0 commit comments

Comments
 (0)