mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-05-17 15:19:23 +08:00
chore: migrate config to eslint@9
This commit is contained in:

committed by
Nico Rehwaldt

parent
8190fcf542
commit
352d325682
@ -1,2 +0,0 @@
|
||||
coverage
|
||||
dist
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "plugin:bpmn-io/browser",
|
||||
"rules": {
|
||||
"no-restricted-imports": [ "error", {
|
||||
"name": "inherits",
|
||||
"message": "Use inherits-browser instead"
|
||||
} ]
|
||||
}
|
||||
}
|
53
eslint.config.mjs
Normal file
53
eslint.config.mjs
Normal file
@ -0,0 +1,53 @@
|
||||
import bpmnIoPlugin from 'eslint-plugin-bpmn-io';
|
||||
|
||||
const files = {
|
||||
ignored: [
|
||||
'dist',
|
||||
'coverage'
|
||||
],
|
||||
build: [
|
||||
'test/config/*.js',
|
||||
'tasks/**/*.mjs',
|
||||
'*.js',
|
||||
'*.mjs'
|
||||
],
|
||||
test: [
|
||||
'test/**/*.js'
|
||||
]
|
||||
};
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: files.ignored
|
||||
},
|
||||
...bpmnIoPlugin.configs.node.map(config => {
|
||||
|
||||
return {
|
||||
...config,
|
||||
files: files.build
|
||||
};
|
||||
}),
|
||||
...bpmnIoPlugin.configs.browser.map(config => {
|
||||
|
||||
return {
|
||||
...config,
|
||||
ignores: files.build
|
||||
};
|
||||
}),
|
||||
...bpmnIoPlugin.configs.mocha.map(config => {
|
||||
|
||||
return {
|
||||
...config,
|
||||
files: files.test,
|
||||
};
|
||||
}),
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
sinon: true,
|
||||
require: true
|
||||
}
|
||||
},
|
||||
files: files.test
|
||||
}
|
||||
];
|
@ -1,5 +1,3 @@
|
||||
/* eslint-env node */
|
||||
|
||||
import terser from '@rollup/plugin-terser';
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "plugin:bpmn-io/node"
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "plugin:bpmn-io/mocha"
|
||||
}
|
Reference in New Issue
Block a user