diff --git a/ui/.eslintignore b/ui/.eslintignore index 07a1d39f6..6d8bc7a10 100644 --- a/ui/.eslintignore +++ b/ui/.eslintignore @@ -8,10 +8,6 @@ # generated sources /src/generated -# disabling for copy-pasted tailwind plugins -/tailwind-plugins - # hidden configuration files !.eslintrc.js !.prettierrc.js -!.postcssrc.js diff --git a/ui/.eslintrc.js b/ui/.eslintrc.js index cea5aad82..f5db34973 100644 --- a/ui/.eslintrc.js +++ b/ui/.eslintrc.js @@ -22,6 +22,8 @@ module.exports = { 'react/prop-types': 'off', 'react/require-default-props': 'off', + 'no-nested-ternary': 'off', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], 'import/no-extraneous-dependencies': [ @@ -29,9 +31,7 @@ module.exports = { { devDependencies: [ '**/.eslintrc.js', - 'tailwind.config.js', '.prettierrc.js', - '.postcssrc.js', 'src/setupProxy.js', 'src/setupTests.ts', '**/*.test.tsx', diff --git a/ui/.postcssrc.js b/ui/.postcssrc.js deleted file mode 100644 index f67d7c756..000000000 --- a/ui/.postcssrc.js +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint @typescript-eslint/no-var-requires: 0 */ - -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -const tailwindcss = require('tailwindcss'); - -module.exports = { - plugins: [tailwindcss], -}; diff --git a/ui/.prettierignore b/ui/.prettierignore index 487b96b07..e1478a2fd 100644 --- a/ui/.prettierignore +++ b/ui/.prettierignore @@ -7,4 +7,4 @@ # generated sources /src/generated -/src/index.css +/src/infra.css diff --git a/ui/Makefile b/ui/Makefile index e785ee854..b46ced268 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -9,7 +9,7 @@ all: deps lint-check test build deps: package.json yarn install --frozen-lockfile -SOURCES := $(shell ls *.json) tailwind.config.js yarn.lock +SOURCES := $(shell ls *.json) yarn.lock SOURCES += $(shell find public) SOURCES += $(shell find src -name '*.ts' -print) SOURCES += $(shell find src -name '*.tsx' -print) diff --git a/ui/README.md b/ui/README.md index 09284adf0..2b349ccc6 100644 --- a/ui/README.md +++ b/ui/README.md @@ -21,19 +21,6 @@ https://github.com/stackrox/stackrox-env. machine, consider using [nvm](https://github.com/creationix/nvm)) - [Yarn](https://yarnpkg.com/en/) -### GitHub Packages NPM Registry - -This project depends on packages with `@stackrox` scope accessible from GitHub -Packages NPM registry. Get access with: - -``` -npm login --auth-type=legacy --registry=https://npm.pkg.github.com -``` - -Use your github username and a token with `repo` and `read:packages` rights. -More details can be found -[here](https://docs.engineering.redhat.com/display/StackRox/Using+GitHub+Packages+with+NPM). - ### UI Dev Server To avoid a connection error with node v1.17+ set: diff --git a/ui/package.json b/ui/package.json index a9c41dc57..b3eb81453 100644 --- a/ui/package.json +++ b/ui/package.json @@ -3,14 +3,8 @@ "version": "0.1.0", "private": true, "scripts": { - "clean": "npm-run-all clean:*", - "clean:tailwind": "rm -f src/index.css", - "start": "npm-run-all clean -p start:*", - "start:tailwind": "NODE_ENV=development postcss ./src/app.tw.css -o ./src/index.css -w", - "start:cra": "wait-on src/index.css && PORT=3001 HTTPS=true NODE_OPTIONS=--openssl-legacy-provider EXTEND_ESLINT=true react-scripts start", - "build": "npm-run-all build:tailwind build:cra", - "build:tailwind": "NODE_ENV=production postcss ./src/app.tw.css -o ./src/index.css", - "build:cra": "NODE_OPTIONS=--openssl-legacy-provider EXTEND_ESLINT=true react-scripts build", + "start": "PORT=3001 HTTPS=true NODE_OPTIONS=--openssl-legacy-provider EXTEND_ESLINT=true react-scripts start", + "build": "NODE_OPTIONS=--openssl-legacy-provider EXTEND_ESLINT=true react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", "lint-check": "npm-run-all lint-check:*", @@ -22,35 +16,30 @@ "gen:src": "./scripts/generate-client.sh" }, "dependencies": { - "@patternfly/patternfly": "^5.4.2", - "@patternfly/react-core": "^5.4.8", - "@patternfly/react-icons": "^5.4.2", + "@patternfly/patternfly": "^6.1.0", + "@patternfly/react-core": "^6.0.0", + "@patternfly/react-icons": "^6.0.0", "axios": "^0.21.4", "formik": "^2.4.2", "history": "^5.0.1", "lodash": "^4.17.21", "moment": "^2.29.4", "namor": "^2.0.3", - "prop-types": "^15.8.1", - "react": "^17.0.1", - "react-dom": "^17.0.1", - "react-feather": "^2.0.9", + "react": "^18.3.1", + "react-dom": "^18.3.1", "react-markdown": "^8.0.0", "react-router-dom": "^6.14.1", - "react-spinners": "^0.13.8", - "use-clipboard-copy": "^0.2.0", "yup": "^1.3.3" }, "devDependencies": { - "@stackrox/tailwind-config": "^0.2.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^12.1.1", "@testing-library/user-event": "^13.2.1", "@types/jest": "^27.0.2", "@types/lodash": "^4.14.195", "@types/node": "^20.5.4", - "@types/react": "^17.0.20", - "@types/react-dom": "^17.0.9", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", "autoprefixer": "^10.4.14", "eslint-config-airbnb-typescript": "^12.0.0", "eslint-config-prettier": "^7.2.0", @@ -58,13 +47,9 @@ "eslint-plugin-prettier": "^3.4.1", "http-proxy-middleware": "^2.0.6", "npm-run-all": "^4.1.5", - "postcss": "^8.4.31", - "postcss-cli": "^10.1.0", "prettier": "^2.2.1", "react-scripts": "^4.0.1", - "tailwindcss": "^2.2.9", - "typescript": "~5.1.6", - "wait-on": "^7.0.1" + "typescript": "~5.1.6" }, "browserslist": { "production": [ diff --git a/ui/public/index.html b/ui/public/index.html index 51b2c337c..d9ae652dd 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -25,7 +25,7 @@ -->