From fc5c64991f52fe55677622250622c9e76118a200 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Fri, 11 Oct 2024 19:16:19 +0200 Subject: [PATCH] chore: improve eslint config --- eslint.config.mjs | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index b38b10c..fdd5ab6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -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 }; }) ]; \ No newline at end of file