From 44d7bee70f46e5246e41e76e9773d2b6747cb9ac Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Wed, 6 Nov 2024 23:33:08 +0100 Subject: [PATCH] chore: clean eslint config --- eslint.config.mjs | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0a46c76..12151a4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,46 +1,55 @@ import bpmnIoPlugin from 'eslint-plugin-bpmn-io'; -const buildScripts = [ - '*.js', - '*.mjs', - 'test/distro/karma.conf.js' -]; +const files = { + build: [ + '*.js', + '*.mjs', + 'test/distro/karma.conf.js' + ], + ignored: [ + 'dist' + ], + test: [ + 'test/**/*.js' + ] +}; + export default [ { - ignores: [ - 'dist' - ] + ignores: files.ignored }, - ...bpmnIoPlugin.configs.browser.map(config => { + + // build + ...bpmnIoPlugin.configs.node.map(config => { return { ...config, - ignores: buildScripts + files: files.build }; }), - ...bpmnIoPlugin.configs.node.map(config => { + + // lib + test + ...bpmnIoPlugin.configs.browser.map(config => { return { ...config, - files: buildScripts + ignores: files.build }; }), + + // test ...bpmnIoPlugin.configs.mocha.map(config => { return { ...config, - files: [ - 'test/**/*.js' - ] + files: files.test }; }), { - files: [ - 'test/**/*.js' - ], languageOptions: { globals: { require: false, sinon: false } - } + }, + files: files.test } ];