This commit is contained in:
feederbox826 2026-05-05 08:03:25 -05:00 committed by GitHub
commit 7a0114247c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 75 additions and 2198 deletions

2
.gitignore vendored
View file

@ -63,4 +63,4 @@ node_modules
/phasher
dist
.DS_Store
/.local*
/.local*

View file

@ -398,7 +398,7 @@ fmt-ui-quick:
cd ui/v2.5 && \
files=$$(git diff --name-only --relative --diff-filter d . ../../graphql); \
if [ -n "$$files" ]; then \
npm run prettier -- --write $$files; \
npm run biome -- format --write $$files; \
fi
# does not run tsc checks, as they are slow
@ -407,9 +407,9 @@ validate-ui-quick:
tsfiles=$$(git diff --name-only --relative --diff-filter d src | grep -e "\.tsx\?\$$"); \
scssfiles=$$(git diff --name-only --relative --diff-filter d src | grep "\.scss"); \
prettyfiles=$$(git diff --name-only --relative --diff-filter d . ../../graphql); \
if [ -n "$$tsfiles" ]; then npm run eslint -- $$tsfiles; fi && \
if [ -n "$$tsfiles" ]; then npm run biome -- check $$tsfiles; fi && \
if [ -n "$$scssfiles" ]; then npm run stylelint -- $$scssfiles; fi && \
if [ -n "$$prettyfiles" ]; then npm run prettier -- --check $$prettyfiles; fi
if [ -n "$$prettyfiles" ]; then npm run biome -- format --check $$prettyfiles; fi
# runs all of the backend PR-acceptance steps
.PHONY: validate-backend

View file

@ -1,2 +1 @@
BROWSER=none
ESLINT_NO_DEV_ERRORS=true

View file

@ -1,79 +0,0 @@
{
"env": {
"browser": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "jsx-a11y"],
"extends": [
"airbnb-typescript",
"plugin:import/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"airbnb/hooks",
"prettier"
],
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": [
"node_modules/",
"src/core/generated-graphql.ts",
"src/pluginApi.d.ts"
],
"rules": {
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
],
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-use-before-define": [
"error",
{ "functions": false, "classes": false }
],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"import/named": "off",
"import/namespace": "off",
"import/no-unresolved": "off",
"lines-between-class-members": "off",
"no-nested-ternary": "off",
"prefer-destructuring": [
"error",
{
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
}
],
"react/display-name": "off",
"react/prop-types": "off",
"react/style-prop-object": ["error", { "allow": ["FormattedNumber"] }],
"spaced-comment": ["error", "always", { "markers": ["/"] }]
}
}

8
ui/v2.5/.gitignore vendored
View file

@ -3,8 +3,6 @@ src/core/generated-graphql.ts
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
@ -20,9 +18,5 @@ src/core/generated-graphql.ts
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.eslintcache
.stylelintcache
.stylelintcache

View file

@ -1,18 +0,0 @@
*.md
# dependencies
/node_modules
pnpm-lock.yaml
pnpm-workspace.yaml
# locales
src/locales/**/*.json
# testing
/coverage
# production
/build
# generated
src/core/generated-graphql.ts

View file

@ -29,7 +29,7 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
### `npm run format`
Formats the whitespace of all typescript and scss code with prettier, to ease editing and ensure a common code style.
Formats the whitespace of all typescript and scss code with biome, to ease editing and ensure a common code style.
Should ideally be run before all frontend PRs.
@ -39,7 +39,7 @@ Should ideally be run before all frontend PRs.
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.

38
ui/v2.5/biome.json Normal file
View file

@ -0,0 +1,38 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.10/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": {
"ignoreUnknown": false,
"includes": [
"**",
"../../graphql/**",
"!src/core/generated-graphql.ts",
"!src/pluginApi.d.ts"
]
},
"formatter": { "enabled": false, "indentStyle": "space" },
"linter": {
"enabled": true,
"domains": {
"react": "recommended",
"types": "recommended"
},
"rules": {
"recommended": false,
"style": { "noNestedTernary": "off", "useBlockStatements": "off" },
"correctness": {
"useExhaustiveDependencies": "off",
"useJsxKeyInIterable": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noArrayIndexKey": "off"
}
}
},
"javascript": { "formatter": { "quoteStyle": "double" } },
"assist": {
"enabled": true,
"actions": { "source": { "organizeImports": "off" } }
}
}

View file

@ -13,13 +13,11 @@
"validate": "npm run lint && npm run check && npm run format-check",
"lint": "npm run lint:js && npm run lint:css",
"lint:css": "stylelint --cache \"src/**/*.scss\"",
"lint:js": "eslint --cache src/",
"lint:js": "biome check src/",
"check": "tsc --noEmit",
"eslint": "eslint",
"prettier": "prettier",
"stylelint": "stylelint",
"format": "prettier --write . ../../graphql",
"format-check": "prettier --check . ../../graphql",
"format": "biome format --write . ../../graphql",
"format-check": "biome format --check . ../../graphql",
"gqlgen": "gql-gen --config codegen.ts",
"extract": "NODE_ENV=development extract-messages -l=en,de -o src/locale -d en --flat false 'src/**/!(*.test).tsx'"
},
@ -107,22 +105,9 @@
"@types/video.js": "^7.3.58",
"@types/videojs-mobile-ui": "^0.8.3",
"@types/videojs-seek-buttons": "^2.1.3",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitejs/plugin-react": "^5.2.0",
"eslint": "^8.57.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^8.10.2",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^4.6.2",
"extract-react-intl-messages": "^4.1.1",
"postcss": "^8.5.8",
"postcss-scss": "^4.0.9",
"prettier": "^2.8.8",
"sass": "^1.98.0",
"stylelint": "^17.6.0",
"stylelint-order": "^8.1.1",

File diff suppressed because it is too large Load diff