Skip to content

Commit

Permalink
chore: migrate to eslint@9
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Oct 11, 2024
1 parent 242f64f commit 5edabfe
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 39 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc

This file was deleted.

51 changes: 51 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -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
}
}
];
2 changes: 0 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-env node */

'use strict';

// configures browsers to run test against
Expand Down
18 changes: 11 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions test/.eslintrc

This file was deleted.

8 changes: 4 additions & 4 deletions test/spec/features/log/LogSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe('features/log', function() {
});


describe('icons', function() {
describe('icons - start events', function() {

const diagram = require('./start-events.bpmn');

Expand Down Expand Up @@ -209,7 +209,7 @@ describe('features/log', function() {
});


describe('icons', function() {
describe('icons - end events', function() {

const diagram = require('./end-events.bpmn');

Expand Down Expand Up @@ -284,7 +284,7 @@ describe('features/log', function() {
});


describe('icons', function() {
describe('icons - intermediate events', function() {

const diagram = require('./intermediate-events.bpmn');

Expand Down Expand Up @@ -367,7 +367,7 @@ describe('features/log', function() {
});


describe('icons', function() {
describe('icons - gateways', function() {

const diagram = require('./gateways.bpmn');

Expand Down
4 changes: 2 additions & 2 deletions test/spec/simulator/SimulatorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ describe('simulator', function() {
});


describe('escalation', () => {
describe('escalation', function() {

verify('escalation-no-catch', (fixture) => {

Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 0 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-env node */

const CopyWebpackPlugin = require('copy-webpack-plugin');
const { DefinePlugin } = require('webpack');

Expand Down

0 comments on commit 5edabfe

Please sign in to comment.