Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eslint 9 #908

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 49 additions & 18 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,35 +1,49 @@
import bpmnIoPlugin from 'eslint-plugin-bpmn-io';

const files = {
build: [
'*.mjs',
'*.js',
'packages/*/*.mjs',
'packages/*/*.mjs',
'packages/*/*.js',
'tasks/*.mjs',
'packages/*/tasks/*.mjs',
'packages/dmn-js/test/distro/karma.conf.js'
],
test: [
'**/test/**/*.js'
],
ignored: [
'**/lib',
'**/dist'
]
};

export default [
{
ignores: [
'**/lib',
'**/dist'
]
ignores: files.ignored
},
...bpmnIoPlugin.configs.browser.map(config => {

// build
...bpmnIoPlugin.configs.node.map(config => {
return {
...config,
files: [
'**/src/**/*.js'
]
files: files.build
};
}),
...bpmnIoPlugin.configs.jsx.map(config => {

// lib + test
...bpmnIoPlugin.configs.browser.map(config => {
return {
...config,
files: [
'**/src/**/*.js',
'**/test/**/*.js'
]
ignores: files.build
};
}),
...bpmnIoPlugin.configs.mocha.map(config => {
...bpmnIoPlugin.configs.jsx.map(config => {
return {
...config,
files: [
'**/test/**/*.js'
]
ignores: files.build
};
}),
{
Expand All @@ -42,6 +56,23 @@ export default [
'react/no-deprecated': 'off',
'react/jsx-key': 'off', // TODO(@barmac): reenable and fix problems
'react/no-unknown-property': 'off',
}
},
ignores: files.build
},

// test
...bpmnIoPlugin.configs.mocha.map(config => {
return {
...config,
files: files.test
};
}),
{
languageOptions: {
globals: {
require: true
}
},
files: files.test
}
];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "lerna run build --parallel --stream",
"lerna-publish": "lerna publish -m \"chore(project): publish %s\"",
"lint": "run-s lint:*",
"lint:js": "eslint packages",
"lint:js": "eslint .",
"lint:style": "stylelint \"packages/**/*.css\"",
"reinstall": "npm ci",
"release": "run-s distro test \"lerna-publish -- {@}\" --",
Expand Down
1 change: 1 addition & 0 deletions packages/dmn-js-decision-table/test/spec/ViewerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('DecisionTable', function() {

let dmnJS;

// eslint-disable-next-line no-constant-binary-expression
false && afterEach(function() {
if (dmnJS) {
dmnJS.destroy();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

import Inferno from 'inferno';

import { bootstrapModeler, inject } from 'test/helper';

import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

import Inferno from 'inferno';

import { bootstrapModeler, inject } from 'test/helper';

import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

import Inferno from 'inferno';

import { bootstrapModeler, inject } from 'test/helper';

import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

import Inferno from 'inferno';

/* global sinon */

import { bootstrapModeler, inject } from 'test/helper';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('simple date edit', function() {
// then
expect(inputEntry7.businessObject.text).to


.equal('[date("2018-01-25")..date("2000-01-01")]');
}));

Expand All @@ -175,7 +175,7 @@ describe('simple date edit', function() {
// then
expect(inputEntry7.businessObject.text).to


.equal('[date("2018-01-25")..date("foo")]');
}));

Expand All @@ -195,7 +195,7 @@ describe('simple date edit', function() {
// then
expect(inputEntry7.businessObject.text).to


.equal(`[date("2018-01-25")..date("${ getSampleDate() }")]`);
}));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('simple date edit - utils', function() {
date: '2000-01-01'
}));


it('between', expectParsed('[date("2000-01-01")..date("2000-01-02")]', {
type: 'between',
dates: [ '2000-01-01', '2000-01-02' ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ describe('simple date time edit', function() {
// then
expect(inputEntry7.businessObject.text).to


.equal('[date and time("2018-01-25T00:00:00Z")..date and time("foo")]');
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('simple time edit', function() {
// then
expect(inputEntry7.businessObject.text).to


.equal('[time("08:00:00Z")..time("18:00:00Z")]');
}));

Expand All @@ -175,7 +175,7 @@ describe('simple time edit', function() {
// then
expect(inputEntry7.businessObject.text).to


.equal('[time("08:00:00Z")..time("foo")]');
}));

Expand All @@ -195,7 +195,7 @@ describe('simple time edit', function() {
// then
expect(inputEntry7.businessObject.text).to


.equal(`[time("08:00:00Z")..time("${ getSampleTime() }")]`);
}));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('simple time edit - utils', function() {
time: '08:00:00Z'
}));


it('between', expectParsed('[time("08:00:00Z")..time("08:00:00Z")]', {
type: 'between',
times: [ '08:00:00Z', '08:00:00Z' ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import { triggerInputEvent } from 'test/util/EventUtil';


import ValidatedInput from 'src/components/ValidatedInput';


Expand Down
Loading