Skip to content

Commit

Permalink
chore: update to eslint@9
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Dec 27, 2024
1 parent ce7a42d commit 9eb9658
Show file tree
Hide file tree
Showing 11 changed files with 879 additions and 632 deletions.
1,315 changes: 735 additions & 580 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"af": "npm audit fix"
},
"devDependencies": {
"eslint": "^8.57.1",
"eslint-plugin-bpmn-io": "^1.0.1",
"eslint": "^9.17.0",
"eslint-plugin-bpmn-io": "^2.0.2",
"lerna": "^8.1.9",
"npm-run-all2": "^7.0.2"
},
Expand Down
1 change: 0 additions & 1 deletion packages/app/.eslintignore

This file was deleted.

21 changes: 0 additions & 21 deletions packages/app/.eslintrc

This file was deleted.

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

const files = {
build: [
'*.js'
],
test: [
'test/**/*.js',
'test/**/*.ts',
'test/**/*.cjs'
],
ignored: [
'public',
'tmp',
]
};

export default [
{
'ignores': files.ignored
},

// lib
...bpmnIoPlugin.configs.node.map(config => {

return {
...config,
ignores: [
...files.build,
...files.test
]
};
}),
{
files: [ '**/*.graphql', '**/*.js' ],
ignores: [
...files.build,
...files.test
],
processor: graphqlPlugin.processor
},
{
files: [ '**/*.graphql' ],
languageOptions: {
parser: graphqlPlugin.parser
},
plugins: {
'@graphql-eslint': graphqlPlugin
},
rules: graphqlPlugin.configs['schema-recommended'].rules
},

// build + test
...bpmnIoPlugin.configs.node.map(config => {

return {
...config,
files: [
...files.build,
...files.test
]
};
}),

// test
...bpmnIoPlugin.configs.mocha.map(config => {

return {
...config,
files: files.test
};
})
];
4 changes: 2 additions & 2 deletions packages/app/lib/util/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function parseTemporalFilter(str) {
}

const [
_, // eslint-disable-line
_,
qualifier,
dateString,
range
Expand Down Expand Up @@ -75,7 +75,7 @@ export function parseSearch(str) {
while ((match = regexp.exec(str))) {

const [
_, // eslint-disable-line
_,
text,
textEscaped,
negated,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"smee-client": "^2.0.4"
},
"devDependencies": {
"@graphql-eslint/eslint-plugin": "^3.20.1",
"@graphql-eslint/eslint-plugin": "^4.3.0",
"@octokit/graphql-schema": "^15.25.0",
"@types/compression": "^1.7.2",
"@types/express-session": "^1.18.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/test/apps.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function enableConnect() {
}


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

before(disableConnect);

Expand Down
22 changes: 0 additions & 22 deletions packages/board/.eslintrc.js

This file was deleted.

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

const files = {
build: [
'*.js'
],
test: [
'test/**/*.js',
'test/**/*.ts',
'test/**/*.cjs'
],
ignored: [ ]
};

export default [
{
'ignores': files.ignored
},

// lib
...sveltePlugin.configs['flat/recommended'].map(config => {

return {
...config,
ignores: [
...files.build,
...files.test
]
};
}),
...bpmnIoPlugin.configs.browser.map(config => {

return {
...config,
ignores: [
...files.build,
...files.test
]
};
}),

// build + test
...bpmnIoPlugin.configs.node.map(config => {

return {
...config,
files: [
...files.build,
...files.test
]
};
}),

// test
...bpmnIoPlugin.configs.mocha.map(config => {

return {
...config,
files: files.test
};
})
];
3 changes: 1 addition & 2 deletions packages/board/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-url": "^8.0.2",
"bootstrap": "^4.6.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-svelte": "^2.46.1",
"min-dash": "^4.2.2",
"npm-run-all2": "^7.0.2",
Expand All @@ -29,7 +28,7 @@
},
"scripts": {
"test": "echo \"no tests\"",
"lint": "eslint --ext js,svelte .",
"lint": "eslint .",
"build": "run-p build:*:prod",
"build:watch": "run-p build:*:watch",
"build:js": "rollup -c",
Expand Down

0 comments on commit 9eb9658

Please sign in to comment.