mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
Merge 5ae03b10eb into 01a7583364
This commit is contained in:
commit
7a0114247c
10 changed files with 75 additions and 2198 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -63,4 +63,4 @@ node_modules
|
|||
/phasher
|
||||
dist
|
||||
.DS_Store
|
||||
/.local*
|
||||
/.local*
|
||||
6
Makefile
6
Makefile
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
BROWSER=none
|
||||
ESLINT_NO_DEV_ERRORS=true
|
||||
|
|
|
|||
|
|
@ -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
8
ui/v2.5/.gitignore
vendored
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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 aren’t 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 you’re 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 you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
|
|
|
|||
38
ui/v2.5/biome.json
Normal file
38
ui/v2.5/biome.json
Normal 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" } }
|
||||
}
|
||||
}
|
||||
|
|
@ -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
Loading…
Reference in a new issue