Skip to content

Commit

Permalink
chore: migrate to eslint@9
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Oct 14, 2024
1 parent c0bb35e commit 6e66391
Show file tree
Hide file tree
Showing 17 changed files with 728 additions and 687 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions .eslintrc

This file was deleted.

61 changes: 61 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import bpmnIoPlugin from 'eslint-plugin-bpmn-io';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import importPlugin from 'eslint-plugin-import';

const buildScripts = [ '*.js', '*.mjs' ];

export default [
{
ignores: [
'dist'
]
},
...bpmnIoPlugin.configs.browser,
...bpmnIoPlugin.configs.jsx,
{
plugins: {
'react-hooks': reactHooksPlugin,
import: importPlugin
},
rules: {
...reactHooksPlugin.configs.recommended.rules,
'import/first': 'error',
'import/no-amd': 'error',
'import/no-webpack-loader-syntax': 'error',
'react-hooks/exhaustive-deps': 'off'
}
},
...bpmnIoPlugin.configs.node.map(config => {
return {
...config,
files: [
...buildScripts,
'**/test/**/*.js'
]
};
}),
...bpmnIoPlugin.configs.mocha.map(config => {
return {
...config,
files: [
'**/test/**/*.js'
]
};
}),
{
languageOptions: {
globals: {
sinon: true
},
},
files: [
'**/test/**/*.js'
]
},
{
rules: {
'react/display-name': 'off',
'react/no-unescaped-entities': 'off'
}
}
];
Loading

0 comments on commit 6e66391

Please sign in to comment.