Skip to content

Commit

Permalink
chore: migrate to ESLint 9 and flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Oct 7, 2024
1 parent bb7340f commit 209303d
Show file tree
Hide file tree
Showing 9 changed files with 487 additions and 672 deletions.
10 changes: 0 additions & 10 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc

This file was deleted.

1 change: 0 additions & 1 deletion client/src/app/cached/WithCachedState.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export default function(Comp) {
} = this.props;

const {
// eslint-disable-next-line
__destroy,
cached
} = this.state;
Expand Down
2 changes: 1 addition & 1 deletion client/src/shared/ui/DropdownButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default class DropdownButton extends PureComponent {
items,
children,
onClick,
closeOnClick, // eslint-disable-line
closeOnClick,
title,
...rest
} = this.props;
Expand Down
87 changes: 87 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { merge } from 'min-dash';

import globals from 'globals';

import bpmnIoPlugin from 'eslint-plugin-bpmn-io';
import camundaLicensedPlugin from 'eslint-plugin-camunda-licensed';

export default [
...camundaLicensedPlugin.configs.mit.map((config) => {
return {
...config,
files: [
'app/lib/**/*.js',
'client/src/**/*.js'
]
}
}),
...bpmnIoPlugin.configs.node.map((config) => {
return merge({
...config,
files: [
'app/lib/**/*.js',
'resources/**/*.js',
'tasks/**/*.js'
]
}, {
languageOptions: {
globals: {
...globals.chai,
...globals.mocha
}
}
})
}),
...bpmnIoPlugin.configs.mocha.map((config) => {
return {
...config,
files: [
'**/__tests__/**/*.js',
'test/**/*.js'
]
};
}),
...bpmnIoPlugin.configs.browser.map((config) => {
return merge({
...config,
files: [
'client/src/**/*.js',
'resources/plugins/**/*.js'
]
}, {
languageOptions: {
globals: {
...globals.chai,
...globals.mocha,
...globals.node
}
}
});
}),
...bpmnIoPlugin.configs.jsx.map((config) => {
return merge({
...config,
files: [
'client/src/**/*.js',
'resources/plugins/**/*.js'
]
}, {
rules: {
'react/jsx-uses-react': 'error',
'react/react-in-jsx-scope': 'error'
}
});
}),
{
ignores: [
'**/dist',
'**/node_modules',
'app/public',
'app/preload',
'client/build',
'coverage',
'docs',
'tmp'
]
}
];
Loading

0 comments on commit 209303d

Please sign in to comment.