Skip to content

Commit e166a4a

Browse files
committed
chore: migrate to eslint@9
Related to bpmn-io/internal-docs#1042
1 parent ae30dc1 commit e166a4a

File tree

17 files changed

+728
-687
lines changed

17 files changed

+728
-687
lines changed

.eslintignore

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

.eslintrc

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

eslint.config.mjs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import bpmnIoPlugin from 'eslint-plugin-bpmn-io';
2+
import reactHooksPlugin from 'eslint-plugin-react-hooks';
3+
import importPlugin from 'eslint-plugin-import';
4+
5+
const buildScripts = [ '*.js', '*.mjs' ];
6+
7+
export default [
8+
{
9+
ignores: [
10+
'dist'
11+
]
12+
},
13+
...bpmnIoPlugin.configs.browser,
14+
...bpmnIoPlugin.configs.jsx,
15+
{
16+
plugins: {
17+
'react-hooks': reactHooksPlugin,
18+
import: importPlugin
19+
},
20+
rules: {
21+
...reactHooksPlugin.configs.recommended.rules,
22+
'import/first': 'error',
23+
'import/no-amd': 'error',
24+
'import/no-webpack-loader-syntax': 'error',
25+
'react-hooks/exhaustive-deps': 'off'
26+
}
27+
},
28+
...bpmnIoPlugin.configs.node.map(config => {
29+
return {
30+
...config,
31+
files: [
32+
...buildScripts,
33+
'**/test/**/*.js'
34+
]
35+
};
36+
}),
37+
...bpmnIoPlugin.configs.mocha.map(config => {
38+
return {
39+
...config,
40+
files: [
41+
'**/test/**/*.js'
42+
]
43+
};
44+
}),
45+
{
46+
languageOptions: {
47+
globals: {
48+
sinon: true
49+
},
50+
},
51+
files: [
52+
'**/test/**/*.js'
53+
]
54+
},
55+
{
56+
rules: {
57+
'react/display-name': 'off',
58+
'react/no-unescaped-entities': 'off'
59+
}
60+
}
61+
];

0 commit comments

Comments
 (0)