From 44ee22170fc55ca856412e482f7ccb09d2e12032 Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Fri, 11 Oct 2024 15:57:49 +0200 Subject: [PATCH] chore: migrate to eslint@9 Related to https://github.com/bpmn-io/internal-docs/issues/1042 --- .eslintrc | 3 --- eslint.config.mjs | 22 ++++++++++++++++++++++ package-lock.json | 18 +++++++++++------- package.json | 2 +- test/.eslintrc | 3 --- 5 files changed, 34 insertions(+), 14 deletions(-) delete mode 100644 .eslintrc create mode 100644 eslint.config.mjs delete mode 100644 test/.eslintrc diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 50ffed4..0000000 --- a/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "plugin:bpmn-io/browser" -} \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..5eafc65 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,22 @@ +import bpmnIoPlugin from 'eslint-plugin-bpmn-io'; + +export default [ + ...bpmnIoPlugin.configs.browser, + ...bpmnIoPlugin.configs.node.map(config => { + return { + ...config, + files: [ + 'karma.conf.js', + '**/test/**/*.js' + ] + }; + }), + ...bpmnIoPlugin.configs.mocha.map(config => { + return { + ...config, + files: [ + '**/test/**/*.js' + ] + }; + }) +]; diff --git a/package-lock.json b/package-lock.json index 0b1988c..13c5155 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "chai": "^4.4.0", "diagram-js": "^14.0.0", "eslint": "^9.0.0", - "eslint-plugin-bpmn-io": "^2.0.0", + "eslint-plugin-bpmn-io": "^2.0.2", "karma": "^6.4.2", "karma-chrome-launcher": "^3.2.0", "karma-mocha": "^2.0.1", @@ -3061,10 +3061,14 @@ } }, "node_modules/eslint-plugin-bpmn-io": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-bpmn-io/-/eslint-plugin-bpmn-io-2.0.0.tgz", - "integrity": "sha512-BJ1SWzjW3hDRbtDEgyLH4npyksNEuwBpYZZ2HGVI4SZr0miklzAVbGvVeQK0lOyD3Yt+WT6yRpkw8PsJrOMZRA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-bpmn-io/-/eslint-plugin-bpmn-io-2.0.2.tgz", + "integrity": "sha512-DiRhVFg+uPDn2WNC0pc2/BV8AtCPFz46SXetnLwLsFr+PbPQ70Py57kT8zAY/mbuAh39AXpABUz7J4hkq6N0WQ==", "dev": true, + "license": "MIT", + "workspaces": [ + "test" + ], "dependencies": { "eslint-plugin-mocha": "^10.5.0", "eslint-plugin-react": "^7.35.0", @@ -10768,9 +10772,9 @@ } }, "eslint-plugin-bpmn-io": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-bpmn-io/-/eslint-plugin-bpmn-io-2.0.0.tgz", - "integrity": "sha512-BJ1SWzjW3hDRbtDEgyLH4npyksNEuwBpYZZ2HGVI4SZr0miklzAVbGvVeQK0lOyD3Yt+WT6yRpkw8PsJrOMZRA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-bpmn-io/-/eslint-plugin-bpmn-io-2.0.2.tgz", + "integrity": "sha512-DiRhVFg+uPDn2WNC0pc2/BV8AtCPFz46SXetnLwLsFr+PbPQ70Py57kT8zAY/mbuAh39AXpABUz7J4hkq6N0WQ==", "dev": true, "requires": { "eslint-plugin-mocha": "^10.5.0", diff --git a/package.json b/package.json index 70cb1a7..2444699 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "chai": "^4.4.0", "diagram-js": "^14.0.0", "eslint": "^9.0.0", - "eslint-plugin-bpmn-io": "^2.0.0", + "eslint-plugin-bpmn-io": "^2.0.2", "karma": "^6.4.2", "karma-chrome-launcher": "^3.2.0", "karma-mocha": "^2.0.1", diff --git a/test/.eslintrc b/test/.eslintrc deleted file mode 100644 index 2ef2123..0000000 --- a/test/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "plugin:bpmn-io/mocha" -} \ No newline at end of file