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

Deps: node, pnpm and eslint #1524

Merged
merged 5 commits into from
Nov 12, 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
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Run eslint on changed files
uses: tj-actions/eslint-changed-files@v18
with:
config_path: "src/main/webapp/.eslintrc.js"
config_path: "src/main/webapp/eslint.config.mjs"
extra_args: "--max-warnings=0"
file_extensions: |
src/main/webapp/resources/js/**/*.ts
Expand All @@ -63,4 +63,4 @@ jobs:
reporter: github-pr-review
fail_on_error: true
level: error
checkstyle_config: './checkstyle.xml'
checkstyle_config: './checkstyle.xml'
9 changes: 7 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ tasks.war {

node {
download.set(true)
version.set("16.15.1")
pnpmVersion.set("7.4.0")
version.set("20.14.0")
pnpmVersion.set("9.12.3")
workDir.set(file("${project.projectDir}/.gradle/nodejs"))
nodeProjectDir.set(file("${project.projectDir}/src/main/webapp"))
}
Expand All @@ -312,6 +312,11 @@ tasks.named<PnpmTask>("pnpmInstall") {
finalizedBy(":pnpmCachePrune")
}

tasks.register<PnpmTask>("lintWebapp") {
dependsOn(":pnpmInstall")
pnpmCommand.set(listOf("lint"))
}

tasks.register<PnpmTask>("cleanWebapp") {
dependsOn(":pnpmInstall")
pnpmCommand.set(listOf("clean"))
Expand Down
52 changes: 0 additions & 52 deletions src/main/webapp/.eslintrc.js

This file was deleted.

35 changes: 35 additions & 0 deletions src/main/webapp/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";

/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
{
languageOptions: {
globals: {
...globals.browser,
...globals.jest,
i18n: true,
__webpack_public_path__: true,
},
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
rules: {
"react/prop-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": "off",
},
settings: {
react: {
version: "detect",
},
},
},
];
197 changes: 98 additions & 99 deletions src/main/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "run-z --then rm -rf dist/ pages/templates/i18n/",
"test": "run-z --then jest resources/js/**/*.test.js",
"test_watch": "run-z --then jest --watch resources/js/**/*.test.js",
"lint": "run-z --then eslint --ext resources/js/**/*.{js,jsx,ts,tsx}"
"lint": "run-z --then eslint resources/js/**/*.{js,jsx,ts,tsx}"
},
"browserslist": [
"last 2 Chrome versions",
Expand All @@ -18,114 +18,113 @@
"last 2 Opera versions"
],
"dependencies": {
"@ag-grid-community/csv-export": "^27.1.0",
"@ant-design/icons": "^4.7.0",
"@ant-design/plots": "^1.0.9",
"@antv/color-util": "^2.0.6",
"@antv/matrix-util": "^3.0.4",
"@antv/path-util": "^2.0.15",
"@antv/scale": "^0.3.17",
"@antv/util": "^2.0.17",
"@loaders.gl/core": "^3.2.4",
"@loaders.gl/gltf": "^3.2.4",
"@loaders.gl/images": "^3.2.4",
"@luma.gl/engine": "^8.5.14",
"@luma.gl/gltools": "^8.5.14",
"@luma.gl/shadertools": "^8.5.14",
"@luma.gl/webgl": "^8.5.14",
"@phylocanvas/phylocanvas.gl": "^1.43.0",
"@ag-grid-community/csv-export": "27.1.0",
"@ant-design/icons": "4.7.0",
"@ant-design/plots": "1.0.9",
"@antv/color-util": "2.0.6",
"@antv/matrix-util": "3.0.4",
"@antv/path-util": "2.0.15",
"@antv/scale": "0.3.17",
"@antv/util": "2.0.17",
"@loaders.gl/core": "3.4.0",
"@loaders.gl/gltf": "3.2.4",
"@loaders.gl/images": "3.2.4",
"@luma.gl/engine": "8.5.14",
"@luma.gl/gltools": "8.5.14",
"@luma.gl/shadertools": "8.5.14",
"@luma.gl/webgl": "8.5.14",
"@phylocanvas/phylocanvas.gl": "1.43.0",
"@reduxjs/toolkit": "1.8.5",
"ag-grid-community": "^27.1.0",
"ag-grid-react": "^27.1.0",
"ag-grid-community": "27.1.0",
"ag-grid-react": "27.1.0",
"antd": "4.19.5",
"axios": "^0.26.1",
"clipboard": "^1.7.1",
"dayjs": "^1.11.1",
"deck.gl": "^8.7.12",
"flexlayout-react": "^0.7.4",
"gl-matrix": "^3.4.3",
"i": "^0.3.7",
"immutability-helper": "^3.1.1",
"lodash": "^4.17.21",
"moment": "^2.29.2",
"postcss-nested": "^5.0.6",
"process": "^0.11.10",
"qs": "^6.10.3",
"rc-util": "^5.20.1",
"rc-virtual-list": "^3.4.6",
"axios": "0.26.1",
"clipboard": "1.7.1",
"dayjs": "1.11.1",
"deck.gl": "8.7.12",
"flexlayout-react": "0.7.4",
"gl-matrix": "3.4.3",
"i": "0.3.7",
"immutability-helper": "3.1.1",
"lodash": "4.17.21",
"moment": "2.29.2",
"postcss-nested": "5.0.6",
"process": "0.11.10",
"qs": "6.10.3",
"rc-util": "5.43.0",
"rc-virtual-list": "3.4.6",
"react": "17.0.2",
"react-dnd": "^15.1.2",
"react-dnd-html5-backend": "^15.1.3",
"react-dnd": "15.1.2",
"react-dnd-html5-backend": "15.1.3",
"react-dom": "17.0.2",
"react-dom-factories": "^1.0.2",
"react-iframe": "^1.8.0",
"react-markdown": "^8.0.2",
"react-mde": "^11.5.0",
"react-redux": "^7.2.8",
"react-router-dom": "^6.4.3",
"react-virtualized-auto-sizer": "^1.0.6",
"react-window": "^1.8.6",
"reactour": "^1.18.7",
"react-dom-factories": "1.0.2",
"react-iframe": "1.8.0",
"react-markdown": "8.0.2",
"react-mde": "11.5.0",
"react-redux": "7.2.8",
"react-router-dom": "6.4.3",
"react-virtualized-auto-sizer": "1.0.6",
"react-window": "1.8.6",
"reactour": "1.18.7",
"redux": "4.1.2",
"redux-saga": "^1.1.3",
"styled-components": "^5.3.5",
"tslib": "^2.3.1",
"uniqolor": "^1.0.2",
"uuid": "^8.3.2",
"xlsx": "^0.18.5"
"redux-saga": "1.1.3",
"styled-components": "5.3.5",
"tslib": "2.3.1",
"typescript-eslint": "8.13.0",
"uniqolor": "1.0.2",
"uuid": "8.3.2",
"xlsx": "0.18.5"
},
"devDependencies": {
"@babel/core": "^7.19.6",
"@babel/plugin-proposal-export-default-from": "^7.18.10",
"@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.20.1",
"@types/lodash": "^4.14.182",
"@types/lodash.uniqby": "^4.7.7",
"@types/node": "^17.0.39",
"@types/react": "^17.0.45",
"@types/react-dom": "^17.0.17",
"@types/react-redux": "^7.1.24",
"@types/react-virtualized-auto-sizer": "^1.0.1",
"@types/react-window": "^1.8.5",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"autoprefixer": "^10.4.4",
"babel-loader": "^8.2.4",
"babel-plugin-import": "^1.13.5",
"browserslist": "^4.20.2",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.4.1",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"expose-loader": "^3.1.0",
"jest": "^27.5.1",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"mini-css-extract-plugin": "^2.6.0",
"postcss": "^8.4.12",
"postcss-import": "^14.1.0",
"postcss-loader": "^6.2.1",
"postcss-preset-env": "^7.4.3",
"prettier": "^2.7.1",
"properties-reader": "^2.2.0",
"react-is": "^17.0.2",
"run-z": "^1.10.1",
"speed-measure-webpack-plugin": "^1.5.0",
"terser-webpack-plugin": "^5.3.1",
"typescript": "^4.7.2",
"webpack": "^5.72.0",
"webpack-assets-manifest": "^5.1.0",
"webpack-cli": "^4.9.2"
"@babel/core": "7.19.6",
"@babel/plugin-proposal-export-default-from": "7.18.10",
"@babel/preset-env": "7.19.4",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "7.18.6",
"@babel/runtime": "7.20.1",
"@types/lodash": "4.14.182",
"@types/lodash.uniqby": "4.7.7",
"@types/node": "17.0.39",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.17",
"@types/react-redux": "7.1.24",
"@types/react-virtualized-auto-sizer": "1.0.1",
"@types/react-window": "1.8.5",
"@types/styled-components": "5.1.25",
"@typescript-eslint/eslint-plugin": "8.13.0",
"@typescript-eslint/parser": "8.13.0",
"autoprefixer": "10.4.4",
"babel-loader": "8.2.4",
"babel-plugin-import": "1.13.5",
"browserslist": "4.20.2",
"css-loader": "6.7.1",
"css-minimizer-webpack-plugin": "3.4.1",
"eslint": "9.14.0",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.37.2",
"expose-loader": "3.1.0",
"jest": "27.5.1",
"less": "4.1.2",
"less-loader": "10.2.0",
"mini-css-extract-plugin": "2.6.0",
"postcss": "8.4.12",
"postcss-import": "14.1.0",
"postcss-loader": "6.2.1",
"postcss-preset-env": "7.4.3",
"prettier": "2.7.1",
"properties-reader": "2.2.0",
"react-is": "17.0.2",
"run-z": "1.10.1",
"speed-measure-webpack-plugin": "1.5.0",
"terser-webpack-plugin": "5.3.1",
"typescript": "4.7.2",
"webpack": "5.96.1",
"webpack-assets-manifest": "5.1.0",
"webpack-cli": "4.10.0"
},
"resolutions": {
"fstream": "1.0.12",
"globals": "^15.0.0",
"ini": "3.0.0",
"jquery": "3.5.1",
"path-parse": "1.0.7",
Expand Down
Loading
Loading