Skip to content

Commit

Permalink
chore: improve eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Oct 14, 2024
1 parent d027af4 commit fc5c649
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
import bpmnIoPlugin from 'eslint-plugin-bpmn-io';

const buildScripts = [
'*.js',
'*.mjs',
'test/*.js'
];
const files = {
ignored: [
'coverage/**/*.js',
],
build: [
'*.js',
'*.mjs',
],
test: [
'test/**/*.js'
]
};

export default [
...bpmnIoPlugin.configs.recommended,
{
ignores: files.ignored
},
...bpmnIoPlugin.configs.browser.map((config) => {
return {
...config,
files: [ 'lib/**/*.js', 'test/**/*.js' ],
ignores: buildScripts
ignores: files.build
};
}),
...bpmnIoPlugin.configs.node.map((config) => {
return {
...config,
files: buildScripts
files: files.build
};
}),
...bpmnIoPlugin.configs.mocha.map((config) => {
return {
...config,
files: [ 'test/**/*.js' ]
files: files.test
};
})
];

0 comments on commit fc5c649

Please sign in to comment.