Skip to content

Eslint next #1525

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

Merged
merged 9 commits into from
Apr 9, 2025
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 0 additions & 12 deletions automation/run-e2e/.eslintrc.cjs

This file was deleted.

25 changes: 25 additions & 0 deletions automation/run-e2e/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";

export default defineConfig([
{
files: ["**/*.{,m,c}js"],
languageOptions: {
globals: {
...globals.node,
...globals.es2021
},
ecmaVersion: 2021,
sourceType: "module"
}
},
{
files: ["**/*.{,m,c}js"],
plugins: { js },
extends: ["js/recommended"],
rules: {
"no-unused-vars": "warn"
}
}
]);
6 changes: 4 additions & 2 deletions automation/run-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/mendix/web-widgets.git"
},
"scripts": {
"lint": "eslint --ext .mjs .",
"lint": "eslint .",
"format": "prettier --write .",
"report:merge": "pnpm dlx ctrf merge ctrf --output merged-report.json --keep-reports"
},
Expand All @@ -32,9 +32,11 @@
"yargs-parser": "^21.1.1"
},
"devDependencies": {
"globals": "^16.0.0",
"@eslint/js": "^9.24.0",
"@axe-core/playwright": "^4.10.1",
"@playwright/test": "^1.51.1",
"@types/node": "^20.12.7",
"@types/node": "*",
"eslint-plugin-playwright": "^2.2.0",
"playwright-ctrf-json-reporter": "^0.0.20"
}
Expand Down
2 changes: 1 addition & 1 deletion automation/run-e2e/utils/read-excel.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-console */
const readXlsxFile = require("read-excel-file/node");

const readExcelFile = filename => {
Expand Down
24 changes: 12 additions & 12 deletions automation/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"name": "@mendix/scripts",
"version": "0.1.0",
"private": true,
"license": "Apache-2.0",
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
"type": "module",
"engines": {
"node": ">=18.20.4"
},
"license": "Apache-2.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/mendix/web-widgets.git"
},
"type": "module",
"scripts": {
"format": "prettier --write .",
"lint": "echo 'Lint disabled for now, please update package scripts'",
"lint:enableme": "eslint . --ext .mjs",
"format": "prettier --write .",
"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}\"",
"root-script:commitlint": "commitlint"
"root-script:commitlint": "commitlint",
"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}\""
},
"dependencies": {
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@commitlint/cli": "^19.8.0",
"@commitlint/config-conventional": "^19.8.0",
"@mendix/prettier-config-web-widgets": "workspace:*",
"pretty-quick": "^3.1.3"
"pretty-quick": "^4.1.1"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"engines": {
"node": ">=18.20.4"
}
}
13 changes: 0 additions & 13 deletions automation/snapshot-generator/.eslintrc.json

This file was deleted.

22 changes: 22 additions & 0 deletions automation/snapshot-generator/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { defineConfig } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";

export default defineConfig([
{
files: ["**/*.{,m,c}js"],
languageOptions: {
globals: {
...globals.node,
...globals.es2021
},
ecmaVersion: 2021,
sourceType: "module"
}
},
{
files: ["**/*.{,m,c}js"],
plugins: { js },
extends: ["js/recommended"]
}
]);
11 changes: 5 additions & 6 deletions automation/snapshot-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
"version": "1.1.0",
"description": "Generate fake data snapshot in json",
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
"license": "MIT",
"main": "./lib/index.js",
"files": [
"lib"
],
"engines": {
"node": ">= 18.20.4"
},
"license": "MIT",
"scripts": {
"format": "prettier --write .",
"lint": "eslint --ext .js lib/ bin/"
"lint": "eslint lib/ bin/"
},
"dependencies": {
"chance": "^1.1.12"
},
"devDependencies": {
"@mendix/prettier-config-web-widgets": "workspace:*"
"@eslint/js": "^9.24.0",
"@mendix/prettier-config-web-widgets": "workspace:*",
"globals": "^16.0.0"
}
}
2 changes: 0 additions & 2 deletions automation/utils/.eslintignore

This file was deleted.

4 changes: 0 additions & 4 deletions automation/utils/.eslintrc.json

This file was deleted.

8 changes: 8 additions & 0 deletions automation/utils/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import config from "@mendix/eslint-config-web-widgets/widget-ts.mjs";

export default [
...config,
{
ignores: ["src/changelog-parser/parser/module/module.js", "src/changelog-parser/parser/widget/widget.js"]
}
];
34 changes: 17 additions & 17 deletions automation/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,32 @@
"name": "@mendix/automation-utils",
"version": "1.0.1",
"description": "Set of helpers for release processes",
"private": true,
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
"main": "index.ts",
"types": "index.ts",
"private": true,
"bin": {
"rui-create-gh-release": "bin/rui-create-gh-release.ts",
"rui-create-translation": "bin/rui-create-translation.ts",
"rui-publish-marketplace": "bin/rui-publish-marketplace.ts",
"rui-update-changelog-module": "bin/rui-update-changelog-module.ts",
"rui-update-changelog-widget": "bin/rui-update-changelog-widget.ts",
"rui-verify-package-format": "bin/rui-verify-package-format.ts",
"rui-create-translation": "bin/rui-create-translation.ts"
"rui-verify-package-format": "bin/rui-verify-package-format.ts"
},
"types": "index.ts",
"main": "index.ts",
"files": [
"shell.ts",
"steps.ts",
"utils.ts",
"tsconfig.json"
],
"scripts": {
"start": "tsc --watch",
"lint": "eslint --ext .jsx,.js,.ts,.tsx src/",
"format": "prettier --write .",
"compile:parser:widget": "peggy -o ./src/changelog-parser/parser/module/module.js ./src/changelog-parser/parser/module/module.pegjs",
"changelog": "ts-node bin/rui-changelog-helper.ts",
"compile:parser:module": "peggy -o ./src/changelog-parser/parser/widget/widget.js ./src/changelog-parser/parser/widget/widget.pegjs",
"compile:parser:widget": "peggy -o ./src/changelog-parser/parser/module/module.js ./src/changelog-parser/parser/module/module.pegjs",
"format": "prettier --write .",
"lint": "eslint --ext .jsx,.js,.ts,.tsx src/",
"prepare": "pnpm run compile:parser:widget && pnpm run compile:parser:module && tsc",
"changelog": "ts-node bin/rui-changelog-helper.ts",
"start": "tsc --watch",
"version": "ts-node bin/rui-bump-version.ts"
},
"devDependencies": {
Expand All @@ -40,11 +46,5 @@
"shelljs": "^0.8.5",
"ts-node": "^10.9.1",
"zod": "^3.20.6"
},
"files": [
"shell.ts",
"steps.ts",
"utils.ts",
"tsconfig.json"
]
}
}
10 changes: 8 additions & 2 deletions automation/utils/src/changelog-parser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ function mergeUnreleased<T extends UnreleasedVersionEntry>(unreleased: T, sectio
export class WidgetChangelogFileWrapper {
changelog: WidgetChangelogFile;

private constructor(changelog: WidgetChangelogFile, public changelogPath: string) {
private constructor(
changelog: WidgetChangelogFile,
public changelogPath: string
) {
this.changelog = Object.freeze(changelog);
}

Expand Down Expand Up @@ -185,7 +188,10 @@ export class ModuleChangelogFileWrapper {
changelog: ModuleChangelogFile;
moduleName: string;

private constructor(changelog: ModuleChangelogFile, public changelogPath: string) {
private constructor(
changelog: ModuleChangelogFile,
public changelogPath: string
) {
this.changelog = Object.freeze(changelog);
this.moduleName = changelog.moduleName;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@mendix/pluggable-widgets-tools": "10.18.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"prettier": "~2.8.8",
"prettier": "3.5.3",
"@types/node": "~22.14.0",
"@types/react": ">=18.2.36",
"@types/big.js": "^6.2.2",
Expand Down
45 changes: 22 additions & 23 deletions packages/customWidgets/any-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
"name": "@mendix/any-chart-web",
"version": "3.0.4",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "Apache-2.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/mendix/web-widgets"
},
"mxpackage": {
"name": "AnyChart",
"type": "widget",
"mpkName": "AnyChart.mpk"
},
"packagePath": "com.mendix.widget.custom",
"marketplace": {
"minimumMXVersion": "9.18.4.62522",
"appName": "AnyChart"
Expand All @@ -20,16 +22,27 @@
"githubUrl": "https://github.com/mendix/testProjects",
"branchName": "anychart-buildingblocks"
},
"packagePath": "com.mendix.widget.custom",
"repository": {
"type": "git",
"url": "https://github.com/mendix/web-widgets"
},
"main": "index.js",
"scripts": {
"build": "ts-node --project scripts/tsconfig.json scripts/build.ts development",
"release": "ts-node --project scripts/tsconfig.json scripts/build.ts production",
"test": "echo 'FIXME: Finish any-chart-web unit test migration'"
},
"dependencies": {
"ace-builds": "^1.33.1",
"classnames": "^2.3.2",
"date-format": "^4.0.14",
"deep-equal": "^2.2.3",
"deepmerge": "^4.3.1",
"fast-json-patch": "^3.1.1",
"json-source-map": "^0.6.1",
"plotly.js": "^2.35.2",
"react-ace": "^10.1.0",
"react-redux": "^8.1.3",
"react-resize-detector": "^9.1.1",
"redux": "^4.2.1",
"redux-thunk": "^2.4.2"
},
"devDependencies": {
"@mendix/automation-utils": "workspace:*",
"@mendix/prettier-config-web-widgets": "workspace:*",
Expand All @@ -46,19 +59,5 @@
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"ace-builds": "^1.33.1",
"classnames": "^2.3.2",
"date-format": "^4.0.14",
"deep-equal": "^2.2.3",
"deepmerge": "^4.3.1",
"fast-json-patch": "^3.1.1",
"json-source-map": "^0.6.1",
"plotly.js": "^2.35.2",
"react-ace": "^10.1.0",
"react-redux": "^8.1.3",
"react-resize-detector": "^9.1.1",
"redux": "^4.2.1",
"redux-thunk": "^2.4.2"
}
"keywords": []
}
4 changes: 0 additions & 4 deletions packages/customWidgets/calendar-web/.eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions packages/customWidgets/calendar-web/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from "@mendix/eslint-config-web-widgets/widget-ts.mjs";

export default config;
Loading
Loading