From a3440d3849cf94368ef1dcbd1524380ecc4d6a79 Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Fri, 11 Oct 2024 15:13:37 +0200 Subject: [PATCH] chore: migrate to eslint@9 Related to https://github.com/bpmn-io/internal-docs/issues/1042 --- .eslintignore | 4 --- .eslintrc | 3 -- eslint.config.mjs | 28 +++++++++++++++++++ package-lock.json | 18 +++++++----- package.json | 2 +- .../test/.eslintrc | 3 -- .../test/.eslintrc | 3 -- 7 files changed, 40 insertions(+), 21 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc create mode 100644 eslint.config.mjs delete mode 100644 packages/element-templates-json-schema/test/.eslintrc delete mode 100644 packages/zeebe-element-templates-json-schema/test/.eslintrc diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 4414073..0000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -*.json -.nyc_output -coverage -dist \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 34238a5..0000000 --- a/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "plugin:bpmn-io/node" -} \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..2f7cf99 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,28 @@ +import bpmnIoPlugin from 'eslint-plugin-bpmn-io'; + +export default [ + { + ignores: [ + '*.json', + '.nyc_output', + 'coverage', + 'dist' + ] + }, + ...bpmnIoPlugin.configs.node.map(config => { + return { + ...config, + files: [ + '**/*.js' + ] + }; + }), + ...bpmnIoPlugin.configs.mocha.map(config => { + return { + ...config, + files: [ + '**/test/**/*.js' + ] + }; + }) +]; diff --git a/package-lock.json b/package-lock.json index 2004678..939a28b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "ajv-errors": "^2.0.1", "chai": "^4.3.6", "eslint": "^9.0.0", - "eslint-plugin-bpmn-io": "^2.0.0", + "eslint-plugin-bpmn-io": "^2.0.2", "lerna": "^8.0.0", "min-dash": "^4.0.0", "mocha": "^10.0.0", @@ -3369,10 +3369,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", @@ -12993,9 +12997,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 f582d8f..dbf1766 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "ajv-errors": "^2.0.1", "chai": "^4.3.6", "eslint": "^9.0.0", - "eslint-plugin-bpmn-io": "^2.0.0", + "eslint-plugin-bpmn-io": "^2.0.2", "lerna": "^8.0.0", "min-dash": "^4.0.0", "mocha": "^10.0.0", diff --git a/packages/element-templates-json-schema/test/.eslintrc b/packages/element-templates-json-schema/test/.eslintrc deleted file mode 100644 index 2ef2123..0000000 --- a/packages/element-templates-json-schema/test/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "plugin:bpmn-io/mocha" -} \ No newline at end of file diff --git a/packages/zeebe-element-templates-json-schema/test/.eslintrc b/packages/zeebe-element-templates-json-schema/test/.eslintrc deleted file mode 100644 index 2ef2123..0000000 --- a/packages/zeebe-element-templates-json-schema/test/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "plugin:bpmn-io/mocha" -} \ No newline at end of file