Skip to content

Commit 459de3f

Browse files
authored
Eslint next (#1525)
2 parents a2832af + d3d3601 commit 459de3f

File tree

312 files changed

+3699
-2493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+3699
-2493
lines changed

automation/run-e2e/.eslintrc.cjs

-12
This file was deleted.

automation/run-e2e/eslint.config.mjs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { defineConfig } from "eslint/config";
2+
import globals from "globals";
3+
import js from "@eslint/js";
4+
5+
export default defineConfig([
6+
{
7+
files: ["**/*.{,m,c}js"],
8+
languageOptions: {
9+
globals: {
10+
...globals.node,
11+
...globals.es2021
12+
},
13+
ecmaVersion: 2021,
14+
sourceType: "module"
15+
}
16+
},
17+
{
18+
files: ["**/*.{,m,c}js"],
19+
plugins: { js },
20+
extends: ["js/recommended"],
21+
rules: {
22+
"no-unused-vars": "warn"
23+
}
24+
}
25+
]);

automation/run-e2e/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"url": "https://github.com/mendix/web-widgets.git"
1717
},
1818
"scripts": {
19-
"lint": "eslint --ext .mjs .",
19+
"lint": "eslint .",
2020
"format": "prettier --write .",
2121
"report:merge": "pnpm dlx ctrf merge ctrf --output merged-report.json --keep-reports"
2222
},
@@ -32,9 +32,11 @@
3232
"yargs-parser": "^21.1.1"
3333
},
3434
"devDependencies": {
35+
"globals": "^16.0.0",
36+
"@eslint/js": "^9.24.0",
3537
"@axe-core/playwright": "^4.10.1",
3638
"@playwright/test": "^1.51.1",
37-
"@types/node": "^20.12.7",
39+
"@types/node": "*",
3840
"eslint-plugin-playwright": "^2.2.0",
3941
"playwright-ctrf-json-reporter": "^0.0.20"
4042
}

automation/run-e2e/utils/read-excel.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable no-console */
1+
22
const readXlsxFile = require("read-excel-file/node");
33

44
const readExcelFile = filename => {

automation/scripts/package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
{
22
"name": "@mendix/scripts",
33
"version": "0.1.0",
4-
"private": true,
5-
"license": "Apache-2.0",
64
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
7-
"type": "module",
8-
"engines": {
9-
"node": ">=18.20.4"
10-
},
5+
"license": "Apache-2.0",
6+
"private": true,
117
"repository": {
128
"type": "git",
139
"url": "https://github.com/mendix/web-widgets.git"
1410
},
11+
"type": "module",
1512
"scripts": {
13+
"format": "prettier --write .",
1614
"lint": "echo 'Lint disabled for now, please update package scripts'",
1715
"lint:enableme": "eslint . --ext .mjs",
18-
"format": "prettier --write .",
19-
"root-script:format-staged": "pretty-quick --staged --config \"./.prettierrc.cjs\" --pattern \"**/{src,script,typings,test,**}/**/*.{cjs,mjs,js,jsx,ts,tsx,scss,html,xml,md,json}\"",
20-
"root-script:commitlint": "commitlint"
16+
"root-script:commitlint": "commitlint",
17+
"root-script:format-staged": "pretty-quick --staged --config \"./.prettierrc.cjs\" --pattern \"**/{src,script,typings,test,**}/**/*.{cjs,mjs,js,jsx,ts,tsx,scss,html,xml,md,json}\""
2118
},
2219
"dependencies": {
23-
"@commitlint/cli": "^17.8.1",
24-
"@commitlint/config-conventional": "^17.8.1",
20+
"@commitlint/cli": "^19.8.0",
21+
"@commitlint/config-conventional": "^19.8.0",
2522
"@mendix/prettier-config-web-widgets": "workspace:*",
26-
"pretty-quick": "^3.1.3"
23+
"pretty-quick": "^4.1.1"
2724
},
2825
"commitlint": {
2926
"extends": [
3027
"@commitlint/config-conventional"
3128
]
29+
},
30+
"engines": {
31+
"node": ">=18.20.4"
3232
}
3333
}

automation/snapshot-generator/.eslintrc.json

-13
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { defineConfig } from "eslint/config";
2+
import globals from "globals";
3+
import js from "@eslint/js";
4+
5+
export default defineConfig([
6+
{
7+
files: ["**/*.{,m,c}js"],
8+
languageOptions: {
9+
globals: {
10+
...globals.node,
11+
...globals.es2021
12+
},
13+
ecmaVersion: 2021,
14+
sourceType: "module"
15+
}
16+
},
17+
{
18+
files: ["**/*.{,m,c}js"],
19+
plugins: { js },
20+
extends: ["js/recommended"]
21+
}
22+
]);

automation/snapshot-generator/package.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@
33
"version": "1.1.0",
44
"description": "Generate fake data snapshot in json",
55
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
6+
"license": "MIT",
67
"main": "./lib/index.js",
78
"files": [
89
"lib"
910
],
10-
"engines": {
11-
"node": ">= 18.20.4"
12-
},
13-
"license": "MIT",
1411
"scripts": {
1512
"format": "prettier --write .",
16-
"lint": "eslint --ext .js lib/ bin/"
13+
"lint": "eslint lib/ bin/"
1714
},
1815
"dependencies": {
1916
"chance": "^1.1.12"
2017
},
2118
"devDependencies": {
22-
"@mendix/prettier-config-web-widgets": "workspace:*"
19+
"@eslint/js": "^9.24.0",
20+
"@mendix/prettier-config-web-widgets": "workspace:*",
21+
"globals": "^16.0.0"
2322
}
2423
}

automation/utils/.eslintignore

-2
This file was deleted.

automation/utils/.eslintrc.json

-4
This file was deleted.

automation/utils/eslint.config.mjs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import config from "@mendix/eslint-config-web-widgets/widget-ts.mjs";
2+
3+
export default [
4+
...config,
5+
{
6+
ignores: ["src/changelog-parser/parser/module/module.js", "src/changelog-parser/parser/widget/widget.js"]
7+
}
8+
];

automation/utils/package.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,32 @@
22
"name": "@mendix/automation-utils",
33
"version": "1.0.1",
44
"description": "Set of helpers for release processes",
5-
"private": true,
65
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
7-
"main": "index.ts",
8-
"types": "index.ts",
6+
"private": true,
97
"bin": {
108
"rui-create-gh-release": "bin/rui-create-gh-release.ts",
9+
"rui-create-translation": "bin/rui-create-translation.ts",
1110
"rui-publish-marketplace": "bin/rui-publish-marketplace.ts",
1211
"rui-update-changelog-module": "bin/rui-update-changelog-module.ts",
1312
"rui-update-changelog-widget": "bin/rui-update-changelog-widget.ts",
14-
"rui-verify-package-format": "bin/rui-verify-package-format.ts",
15-
"rui-create-translation": "bin/rui-create-translation.ts"
13+
"rui-verify-package-format": "bin/rui-verify-package-format.ts"
1614
},
15+
"types": "index.ts",
16+
"main": "index.ts",
17+
"files": [
18+
"shell.ts",
19+
"steps.ts",
20+
"utils.ts",
21+
"tsconfig.json"
22+
],
1723
"scripts": {
18-
"start": "tsc --watch",
19-
"lint": "eslint --ext .jsx,.js,.ts,.tsx src/",
20-
"format": "prettier --write .",
21-
"compile:parser:widget": "peggy -o ./src/changelog-parser/parser/module/module.js ./src/changelog-parser/parser/module/module.pegjs",
24+
"changelog": "ts-node bin/rui-changelog-helper.ts",
2225
"compile:parser:module": "peggy -o ./src/changelog-parser/parser/widget/widget.js ./src/changelog-parser/parser/widget/widget.pegjs",
26+
"compile:parser:widget": "peggy -o ./src/changelog-parser/parser/module/module.js ./src/changelog-parser/parser/module/module.pegjs",
27+
"format": "prettier --write .",
28+
"lint": "eslint --ext .jsx,.js,.ts,.tsx src/",
2329
"prepare": "pnpm run compile:parser:widget && pnpm run compile:parser:module && tsc",
24-
"changelog": "ts-node bin/rui-changelog-helper.ts",
30+
"start": "tsc --watch",
2531
"version": "ts-node bin/rui-bump-version.ts"
2632
},
2733
"devDependencies": {
@@ -40,11 +46,5 @@
4046
"shelljs": "^0.8.5",
4147
"ts-node": "^10.9.1",
4248
"zod": "^3.20.6"
43-
},
44-
"files": [
45-
"shell.ts",
46-
"steps.ts",
47-
"utils.ts",
48-
"tsconfig.json"
49-
]
49+
}
5050
}

automation/utils/src/changelog-parser/index.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ function mergeUnreleased<T extends UnreleasedVersionEntry>(unreleased: T, sectio
105105
export class WidgetChangelogFileWrapper {
106106
changelog: WidgetChangelogFile;
107107

108-
private constructor(changelog: WidgetChangelogFile, public changelogPath: string) {
108+
private constructor(
109+
changelog: WidgetChangelogFile,
110+
public changelogPath: string
111+
) {
109112
this.changelog = Object.freeze(changelog);
110113
}
111114

@@ -185,7 +188,10 @@ export class ModuleChangelogFileWrapper {
185188
changelog: ModuleChangelogFile;
186189
moduleName: string;
187190

188-
private constructor(changelog: ModuleChangelogFile, public changelogPath: string) {
191+
private constructor(
192+
changelog: ModuleChangelogFile,
193+
public changelogPath: string
194+
) {
189195
this.changelog = Object.freeze(changelog);
190196
this.moduleName = changelog.moduleName;
191197
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@mendix/pluggable-widgets-tools": "10.18.2",
4242
"react": "^18.0.0",
4343
"react-dom": "^18.0.0",
44-
"prettier": "~2.8.8",
44+
"prettier": "3.5.3",
4545
"@types/node": "~22.14.0",
4646
"@types/react": ">=18.2.36",
4747
"@types/big.js": "^6.2.2",

packages/customWidgets/any-chart-web/package.json

+22-23
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
"name": "@mendix/any-chart-web",
33
"version": "3.0.4",
44
"description": "",
5-
"main": "index.js",
6-
"keywords": [],
7-
"author": "",
85
"license": "Apache-2.0",
96
"private": true,
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/mendix/web-widgets"
10+
},
1011
"mxpackage": {
1112
"name": "AnyChart",
1213
"type": "widget",
1314
"mpkName": "AnyChart.mpk"
1415
},
16+
"packagePath": "com.mendix.widget.custom",
1517
"marketplace": {
1618
"minimumMXVersion": "9.18.4.62522",
1719
"appName": "AnyChart"
@@ -20,16 +22,27 @@
2022
"githubUrl": "https://github.com/mendix/testProjects",
2123
"branchName": "anychart-buildingblocks"
2224
},
23-
"packagePath": "com.mendix.widget.custom",
24-
"repository": {
25-
"type": "git",
26-
"url": "https://github.com/mendix/web-widgets"
27-
},
25+
"main": "index.js",
2826
"scripts": {
2927
"build": "ts-node --project scripts/tsconfig.json scripts/build.ts development",
3028
"release": "ts-node --project scripts/tsconfig.json scripts/build.ts production",
3129
"test": "echo 'FIXME: Finish any-chart-web unit test migration'"
3230
},
31+
"dependencies": {
32+
"ace-builds": "^1.33.1",
33+
"classnames": "^2.3.2",
34+
"date-format": "^4.0.14",
35+
"deep-equal": "^2.2.3",
36+
"deepmerge": "^4.3.1",
37+
"fast-json-patch": "^3.1.1",
38+
"json-source-map": "^0.6.1",
39+
"plotly.js": "^2.35.2",
40+
"react-ace": "^10.1.0",
41+
"react-redux": "^8.1.3",
42+
"react-resize-detector": "^9.1.1",
43+
"redux": "^4.2.1",
44+
"redux-thunk": "^2.4.2"
45+
},
3346
"devDependencies": {
3447
"@mendix/automation-utils": "workspace:*",
3548
"@mendix/prettier-config-web-widgets": "workspace:*",
@@ -46,19 +59,5 @@
4659
"webpack": "^5.96.1",
4760
"webpack-cli": "^5.1.4"
4861
},
49-
"dependencies": {
50-
"ace-builds": "^1.33.1",
51-
"classnames": "^2.3.2",
52-
"date-format": "^4.0.14",
53-
"deep-equal": "^2.2.3",
54-
"deepmerge": "^4.3.1",
55-
"fast-json-patch": "^3.1.1",
56-
"json-source-map": "^0.6.1",
57-
"plotly.js": "^2.35.2",
58-
"react-ace": "^10.1.0",
59-
"react-redux": "^8.1.3",
60-
"react-resize-detector": "^9.1.1",
61-
"redux": "^4.2.1",
62-
"redux-thunk": "^2.4.2"
63-
}
62+
"keywords": []
6463
}

packages/customWidgets/calendar-web/.eslintrc.json

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import config from "@mendix/eslint-config-web-widgets/widget-ts.mjs";
2+
3+
export default config;

0 commit comments

Comments
 (0)