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 0e83b34 commit cad86a9
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 33 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

41 changes: 41 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import bpmnIoPlugin from 'eslint-plugin-bpmn-io';

export default [
{
ignores: [
'dist'
]
},
...bpmnIoPlugin.configs.browser,
...bpmnIoPlugin.configs.jsx,
...bpmnIoPlugin.configs.node.map(config => {
return {
...config,
files: [
'karma.config.js',
'karma.distro.js',
'rollup.config.js',
'tasks/**/*.mjs',
'**/test/**/*.js'
]
};
}),
...bpmnIoPlugin.configs.mocha.map(config => {
return {
...config,
files: [
'**/test/**/*.js'
]
};
}),
{
languageOptions: {
globals: {
sinon: true
},
},
files: [
'**/test/**/*.js'
]
}
];
2 changes: 0 additions & 2 deletions karma.distro.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-env node */

// configures browsers to run test against
// any of [ 'ChromeHeadless', 'Chrome', 'Firefox', 'Safari' ]
var browsers = (process.env.TEST_BROWSERS || 'ChromeHeadless').split(',');
Expand Down
2 changes: 0 additions & 2 deletions lib/camunda-platform/features/simple-date-edit/Utils.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
const ISO_DATE_REGEX = /^\d{4}(?:-\d\d){2}T(?:\d\d:){2}\d\d$/;

// eslint-disable-next-line
const BETWEEN_DATE_REGEX = /^\[date and time\("(\d{4}(?:-\d\d){2}T(?:\d\d:){2}\d\d)"\)..date and time\("(\d{4}(?:-\d\d){2}T(?:\d\d:){2}\d\d)"/;

// eslint-disable-next-line
const BEFORE_AFTER_DATE_REGEX = /^(<|>)\s*date and time\("(\d{4}(?:-\d\d){2}T(?:\d\d:){2}\d\d)"\)/;

const EXACT_DATE_REGEX = /^date and time\("(\d{4}(?:-\d\d){2}T(?:\d\d:){2}\d\d)"\)$/;
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 @@ -75,7 +75,7 @@
"dmn-js-properties-panel": "^3.5.2",
"dmn-js-shared": "^16.7.1",
"eslint": "^9.0.0",
"eslint-plugin-bpmn-io": "^2.0.0",
"eslint-plugin-bpmn-io": "^2.0.2",
"execa": "^8.0.0",
"inferno": "~5.6.2",
"karma": "^6.4.2",
Expand Down
2 changes: 0 additions & 2 deletions tasks/test-distro.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-env node */

import { execaSync as execSync } from 'execa';

import { existsSync } from 'node:fs';
Expand Down
4 changes: 0 additions & 4 deletions test/.eslintrc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ describe('camunda-platform/simple-date-edit', function() {

// then
expect(inputEntry7.businessObject.text).to

// eslint-disable-next-line
.equal('[date and time("2018-01-25T00:00:00")..date and time("2000-01-01T00:00:00")]');
}));

Expand All @@ -162,8 +160,6 @@ describe('camunda-platform/simple-date-edit', function() {

// then
expect(inputEntry7.businessObject.text).to

// eslint-disable-next-line
.equal('[date and time("2018-01-25T00:00:00")..date and time("2018-01-25T23:59:59")]');
}));

Expand All @@ -182,8 +178,6 @@ describe('camunda-platform/simple-date-edit', function() {

// then
expect(inputEntry7.businessObject.text).to

// eslint-disable-next-line
.equal(`[date and time("2018-01-25T00:00:00")..date and time("${ getSampleDate() }")]`);
}));

Expand Down Expand Up @@ -220,7 +214,7 @@ describe('camunda-platform/simple-date-edit', function() {
// expect not to have been set yet
expect(inputEntry8.businessObject.text).to

// eslint-disable-next-line

.equal(`[date and time("${ getSampleDate() }")..date and time("${ getSampleDate() }")]`);
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('camunda-platform/simple-date-edit - utils', function() {
date: '2000-01-01T12:00:00'
}));

// eslint-disable-next-line

it('between', expectParsed('[date and time("2000-01-01T12:00:00")..date and time("2000-01-02T12:00:00")]', {
type: 'between',
dates: [ '2000-01-01T12:00:00', '2000-01-02T12:00:00' ]
Expand Down

0 comments on commit cad86a9

Please sign in to comment.