diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 8378b193..00000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -example/dist -lib/icons/index.js -tmp \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 26a6a8ea..00000000 --- a/.eslintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "plugin:bpmn-io/browser", - "rules": { - "indent": [ 2, 2, { - "VariableDeclarator": { "var": 2, "let": 2, "const": 3 }, - "FunctionDeclaration": { "body": 1, "parameters": 2 }, - "FunctionExpression": { "body": 1, "parameters": 2 }, - "ignoredNodes": [ "TemplateLiteral > *" ] - } ], - "no-bitwise": 0 - } -} \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..b0e567b1 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,51 @@ +import bpmnIoPlugin from 'eslint-plugin-bpmn-io'; + +export default [ + { + ignores: [ + 'example/dist', + 'lib/icons/index.js', + 'tmp' + ] + }, + ...bpmnIoPlugin.configs.browser, + ...bpmnIoPlugin.configs.node.map(config => { + return { + ...config, + files: [ + 'karma.conf.js', + 'webpack.config.js', + '**/test/**/*.js' + ] + }; + }), + ...bpmnIoPlugin.configs.mocha.map(config => { + return { + ...config, + files: [ + '**/test/**/*.js' + ] + }; + }), + { + languageOptions: { + globals: { + sinon: true + }, + }, + files: [ + '**/test/**/*.js' + ] + }, + { + 'rules': { + 'indent': [ 2, 2, { + 'VariableDeclarator': { 'var': 2, 'let': 2, 'const': 3 }, + 'FunctionDeclaration': { 'body': 1, 'parameters': 2 }, + 'FunctionExpression': { 'body': 1, 'parameters': 2 }, + 'ignoredNodes': [ 'TemplateLiteral > *' ] + } ], + 'no-bitwise': 0 + } + } +]; diff --git a/karma.conf.js b/karma.conf.js index 318ed5f8..e11d2cf8 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,5 +1,3 @@ -/* eslint-env node */ - 'use strict'; // configures browsers to run test against diff --git a/package-lock.json b/package-lock.json index 0344370a..ca9c8b3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "cross-env": "^7.0.3", "downloadjs": "^1.4.7", "eslint": "^9.0.0", - "eslint-plugin-bpmn-io": "^2.0.0", + "eslint-plugin-bpmn-io": "^2.0.2", "file-drops": "^0.5.0", "file-open": "^0.1.1", "karma": "^6.4.4", @@ -3971,10 +3971,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", @@ -13960,9 +13964,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 d54c0556..7a260171 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "cross-env": "^7.0.3", "downloadjs": "^1.4.7", "eslint": "^9.0.0", - "eslint-plugin-bpmn-io": "^2.0.0", + "eslint-plugin-bpmn-io": "^2.0.2", "file-drops": "^0.5.0", "file-open": "^0.1.1", "karma": "^6.4.4", diff --git a/test/.eslintrc b/test/.eslintrc deleted file mode 100644 index 83c84cff..00000000 --- a/test/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "plugin:bpmn-io/mocha", - "globals": { - "sinon": true - } -} \ No newline at end of file diff --git a/test/spec/features/log/LogSpec.js b/test/spec/features/log/LogSpec.js index 362aae6d..4fde966f 100644 --- a/test/spec/features/log/LogSpec.js +++ b/test/spec/features/log/LogSpec.js @@ -151,7 +151,7 @@ describe('features/log', function() { }); - describe('icons', function() { + describe('icons - start events', function() { const diagram = require('./start-events.bpmn'); @@ -209,7 +209,7 @@ describe('features/log', function() { }); - describe('icons', function() { + describe('icons - end events', function() { const diagram = require('./end-events.bpmn'); @@ -284,7 +284,7 @@ describe('features/log', function() { }); - describe('icons', function() { + describe('icons - intermediate events', function() { const diagram = require('./intermediate-events.bpmn'); @@ -367,7 +367,7 @@ describe('features/log', function() { }); - describe('icons', function() { + describe('icons - gateways', function() { const diagram = require('./gateways.bpmn'); diff --git a/test/spec/simulator/SimulatorSpec.js b/test/spec/simulator/SimulatorSpec.js index e5444e47..a436d355 100644 --- a/test/spec/simulator/SimulatorSpec.js +++ b/test/spec/simulator/SimulatorSpec.js @@ -1251,7 +1251,7 @@ describe('simulator', function() { }); - describe('escalation', () => { + describe('escalation', function() { verify('escalation-no-catch', (fixture) => { @@ -2111,7 +2111,7 @@ function verifyOnly(name, test) { return verify(name, test, it.only); } -// eslint-disable-next-line + function verifySkip(name, test) { return verify(name, test, it.skip); } diff --git a/webpack.config.js b/webpack.config.js index c37adf46..d7400177 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,3 @@ -/* eslint-env node */ - const CopyWebpackPlugin = require('copy-webpack-plugin'); const { DefinePlugin } = require('webpack');