Update dependency "eslint" to v9.x
v9.39.4
This commit is contained in:
@@ -1,2 +0,0 @@
|
|||||||
.eslintrc.cjs
|
|
||||||
src/lib/graphql/generated
|
|
||||||
108
.eslintrc.cjs
108
.eslintrc.cjs
@@ -1,108 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
extends: ['airbnb', 'airbnb-typescript', 'prettier', 'plugin:lingui/recommended'],
|
|
||||||
plugins: [
|
|
||||||
'unused-imports',
|
|
||||||
'eslint-plugin-import',
|
|
||||||
'@typescript-eslint',
|
|
||||||
'no-relative-import-paths',
|
|
||||||
'prettier',
|
|
||||||
'header',
|
|
||||||
],
|
|
||||||
parserOptions: {
|
|
||||||
project: ['./tsconfig.json', './tsconfig.node.json', './tools/scripts/tsconfig.json'],
|
|
||||||
},
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: ['*'],
|
|
||||||
rules: {
|
|
||||||
'lingui/no-expression-in-message': 'off',
|
|
||||||
|
|
||||||
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsForRegex: ["^draft"] }],
|
|
||||||
|
|
||||||
'unused-imports/no-unused-imports': 'error',
|
|
||||||
|
|
||||||
'import/prefer-default-export': 'off',
|
|
||||||
'import/no-default-export': 'error',
|
|
||||||
|
|
||||||
'header/header': [
|
|
||||||
'error',
|
|
||||||
'block', // comment type
|
|
||||||
[
|
|
||||||
// expected file header comment
|
|
||||||
// the spaces are important, otherwise, the rule will mark it as an error
|
|
||||||
'',
|
|
||||||
' * Copyright (C) Contributors to the Suwayomi project',
|
|
||||||
' *',
|
|
||||||
' * This Source Code Form is subject to the terms of the Mozilla Public',
|
|
||||||
' * License, v. 2.0. If a copy of the MPL was not distributed with this',
|
|
||||||
' * file, You can obtain one at https://mozilla.org/MPL/2.0/.',
|
|
||||||
' ',
|
|
||||||
],
|
|
||||||
2, // number of new lines after comment
|
|
||||||
],
|
|
||||||
|
|
||||||
'prettier/prettier': 'error',
|
|
||||||
|
|
||||||
'class-methods-use-this': 'off',
|
|
||||||
|
|
||||||
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
|
|
||||||
|
|
||||||
// just why
|
|
||||||
'react/jsx-uses-react': 'off',
|
|
||||||
'react/react-in-jsx-scope': 'off',
|
|
||||||
'react/jsx-no-bind': 'off',
|
|
||||||
'react/jsx-props-no-spreading': 'off',
|
|
||||||
'react/require-default-props': 'off',
|
|
||||||
'react/function-component-definition': 'off',
|
|
||||||
|
|
||||||
'react/no-unstable-nested-components': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
allowAsProps: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
// seems to be bugged for aliases
|
|
||||||
'import/extensions': ['error', 'ignorePackages', { '': 'never' }],
|
|
||||||
|
|
||||||
'no-relative-import-paths/no-relative-import-paths': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
rootDir: 'src',
|
|
||||||
prefix: '@',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
'no-restricted-imports': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
patterns: [
|
|
||||||
{
|
|
||||||
group: ['@mui/*', '!@mui/material/', '!@mui/icons-material/', '!@mui/x-date-pickers/'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
group: ['@mui/*/*/*'],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
'no-restricted-syntax': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
selector: 'TSTypeReference[typeName.name="SxProps"]:not([typeParameters])',
|
|
||||||
message: 'SxProps must have Theme parameter to avoid significant compiler slowdown.',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: ['tools/scripts/**/*'],
|
|
||||||
rules: {
|
|
||||||
'no-console': 'off',
|
|
||||||
'no-relative-import-paths/no-relative-import-paths': 'off',
|
|
||||||
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
331
eslint.config.js
Normal file
331
eslint.config.js
Normal file
@@ -0,0 +1,331 @@
|
|||||||
|
import js from '@eslint/js';
|
||||||
|
import globals from 'globals';
|
||||||
|
import tseslint from 'typescript-eslint';
|
||||||
|
import reactPlugin from 'eslint-plugin-react';
|
||||||
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
||||||
|
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
||||||
|
import importX, { importXResolverCompat } from 'eslint-plugin-import-x';
|
||||||
|
import * as tsResolver from 'eslint-import-resolver-typescript';
|
||||||
|
import unusedImports from 'eslint-plugin-unused-imports';
|
||||||
|
import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';
|
||||||
|
import header from '@tony.ganchev/eslint-plugin-header';
|
||||||
|
import lingui from 'eslint-plugin-lingui';
|
||||||
|
import prettierRecommended from 'eslint-plugin-prettier/recommended';
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
{ ignores: ['src/lib/graphql/generated/**'] },
|
||||||
|
|
||||||
|
// Base configs
|
||||||
|
js.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
reactPlugin.configs.flat.recommended,
|
||||||
|
reactPlugin.configs.flat['jsx-runtime'],
|
||||||
|
reactHooksPlugin.configs['recommended-latest'],
|
||||||
|
jsxA11y.flatConfigs.recommended,
|
||||||
|
importX.flatConfigs.recommended,
|
||||||
|
lingui.configs['flat/recommended'],
|
||||||
|
|
||||||
|
// Main rules
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: { ...globals.browser },
|
||||||
|
parserOptions: {
|
||||||
|
projectService: true,
|
||||||
|
tsconfigRootDir: import.meta.dirname,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
react: { version: 'detect' },
|
||||||
|
'import-x/extensions': ['.ts', '.tsx', '.js', '.jsx'],
|
||||||
|
'import-x/external-module-folders': ['node_modules', 'node_modules/@types'],
|
||||||
|
'import-x/parsers': {
|
||||||
|
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
||||||
|
},
|
||||||
|
'import-x/resolver-next': [
|
||||||
|
importXResolverCompat(tsResolver, {
|
||||||
|
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
'unused-imports': unusedImports,
|
||||||
|
'no-relative-import-paths': noRelativeImportPaths,
|
||||||
|
header,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// Lingui
|
||||||
|
'lingui/no-expression-in-message': 'off',
|
||||||
|
|
||||||
|
// Core JS rules from Airbnb
|
||||||
|
'no-console': 'warn',
|
||||||
|
'no-nested-ternary': 'error',
|
||||||
|
'no-else-return': ['error', { allowElseIf: false }],
|
||||||
|
'no-lonely-if': 'error',
|
||||||
|
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
||||||
|
'no-multi-assign': 'error',
|
||||||
|
'no-return-assign': ['error', 'always'],
|
||||||
|
'no-sequences': 'error',
|
||||||
|
'no-new': 'error',
|
||||||
|
'no-new-func': 'error',
|
||||||
|
'no-new-wrappers': 'error',
|
||||||
|
'no-eval': 'error',
|
||||||
|
'no-script-url': 'error',
|
||||||
|
'no-self-compare': 'error',
|
||||||
|
'no-proto': 'error',
|
||||||
|
'no-extend-native': 'error',
|
||||||
|
'no-caller': 'error',
|
||||||
|
'no-alert': 'warn',
|
||||||
|
'no-void': 'error',
|
||||||
|
'no-bitwise': 'error',
|
||||||
|
'no-continue': 'error',
|
||||||
|
'no-restricted-globals': ['error', 'isFinite', 'isNaN'],
|
||||||
|
'no-await-in-loop': 'error',
|
||||||
|
'no-promise-executor-return': 'error',
|
||||||
|
'no-template-curly-in-string': 'error',
|
||||||
|
'no-constructor-return': 'error',
|
||||||
|
'no-unreachable-loop': 'error',
|
||||||
|
'no-useless-concat': 'error',
|
||||||
|
'no-useless-return': 'error',
|
||||||
|
'no-useless-computed-key': 'error',
|
||||||
|
'no-useless-rename': 'error',
|
||||||
|
'no-underscore-dangle': 'error',
|
||||||
|
'no-restricted-exports': ['error', { restrictedNamedExports: ['default', 'then'] }],
|
||||||
|
eqeqeq: ['error', 'always', { null: 'ignore' }],
|
||||||
|
'consistent-return': 'error',
|
||||||
|
'guard-for-in': 'error',
|
||||||
|
'default-case': ['error', { commentPattern: '^no default$' }],
|
||||||
|
'default-case-last': 'error',
|
||||||
|
radix: 'error',
|
||||||
|
yoda: 'error',
|
||||||
|
'one-var': ['error', 'never'],
|
||||||
|
'max-classes-per-file': ['error', 1],
|
||||||
|
'prefer-template': 'error',
|
||||||
|
'prefer-destructuring': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
VariableDeclarator: { array: false, object: true },
|
||||||
|
AssignmentExpression: { array: true, object: false },
|
||||||
|
},
|
||||||
|
{ enforceForRenamedProperties: false },
|
||||||
|
],
|
||||||
|
'prefer-exponentiation-operator': 'error',
|
||||||
|
'prefer-object-spread': 'error',
|
||||||
|
'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }],
|
||||||
|
'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],
|
||||||
|
'object-shorthand': ['error', 'always', { ignoreConstructors: false, avoidQuotes: true }],
|
||||||
|
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsForRegex: ['^draft'] }],
|
||||||
|
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
|
||||||
|
'class-methods-use-this': 'off',
|
||||||
|
|
||||||
|
// TypeScript rules (non-type-checked)
|
||||||
|
'no-shadow': 'off',
|
||||||
|
'@typescript-eslint/no-shadow': 'error',
|
||||||
|
'no-loop-func': 'off',
|
||||||
|
'@typescript-eslint/no-loop-func': 'error',
|
||||||
|
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
|
||||||
|
'default-param-last': 'off',
|
||||||
|
'@typescript-eslint/default-param-last': 'error',
|
||||||
|
|
||||||
|
// TypeScript rules (type-checked)
|
||||||
|
'no-implied-eval': 'off',
|
||||||
|
'@typescript-eslint/no-implied-eval': 'error',
|
||||||
|
'@typescript-eslint/only-throw-error': 'error',
|
||||||
|
'dot-notation': 'off',
|
||||||
|
'@typescript-eslint/dot-notation': 'error',
|
||||||
|
'@typescript-eslint/return-await': ['error', 'in-try-catch'],
|
||||||
|
'@typescript-eslint/naming-convention': [
|
||||||
|
'error',
|
||||||
|
{ selector: 'variable', format: ['camelCase', 'PascalCase', 'UPPER_CASE'] },
|
||||||
|
{ selector: 'function', format: ['camelCase', 'PascalCase'] },
|
||||||
|
{ selector: 'typeLike', format: ['PascalCase'] },
|
||||||
|
],
|
||||||
|
|
||||||
|
// TypeScript — relax rules not effectively enforced in old config
|
||||||
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
'@typescript-eslint/no-unused-vars': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
vars: 'all',
|
||||||
|
args: 'after-used',
|
||||||
|
ignoreRestSiblings: true,
|
||||||
|
argsIgnorePattern: '^_',
|
||||||
|
varsIgnorePattern: '^_',
|
||||||
|
caughtErrorsIgnorePattern: '^_|^e$|^error$',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'@typescript-eslint/no-empty-object-type': 'off',
|
||||||
|
'@typescript-eslint/no-unsafe-function-type': 'off',
|
||||||
|
'@typescript-eslint/ban-ts-comment': 'off',
|
||||||
|
|
||||||
|
// Unused imports
|
||||||
|
'unused-imports/no-unused-imports': 'error',
|
||||||
|
|
||||||
|
// Import rules from Airbnb
|
||||||
|
'import-x/no-cycle': 'off', // TODO: enable after resolving circular dependencies
|
||||||
|
'import-x/no-mutable-exports': 'error',
|
||||||
|
'import-x/first': 'error',
|
||||||
|
'import-x/newline-after-import': 'error',
|
||||||
|
'import-x/no-amd': 'error',
|
||||||
|
'import-x/no-absolute-path': 'error',
|
||||||
|
'import-x/no-self-import': 'error',
|
||||||
|
'import-x/no-useless-path-segments': ['error', { noUselessIndex: true }],
|
||||||
|
'import-x/no-extraneous-dependencies': 'error',
|
||||||
|
'import-x/order': ['error', { groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'] }],
|
||||||
|
|
||||||
|
// Import rules (import → import-x)
|
||||||
|
'import-x/prefer-default-export': 'off',
|
||||||
|
'import-x/no-default-export': 'error',
|
||||||
|
'import-x/extensions': 'off',
|
||||||
|
'import-x/no-named-as-default': 'off',
|
||||||
|
'import-x/no-named-as-default-member': 'off',
|
||||||
|
'import-x/named': 'off',
|
||||||
|
'import-x/no-unresolved': ['error', { ignore: ['^@dnd-kit/core/dist', '^i18next$', '^public/'] }],
|
||||||
|
|
||||||
|
// Header
|
||||||
|
'header/header': [
|
||||||
|
'error',
|
||||||
|
'block',
|
||||||
|
[
|
||||||
|
'',
|
||||||
|
' * Copyright (C) Contributors to the Suwayomi project',
|
||||||
|
' *',
|
||||||
|
' * This Source Code Form is subject to the terms of the Mozilla Public',
|
||||||
|
' * License, v. 2.0. If a copy of the MPL was not distributed with this',
|
||||||
|
' * file, You can obtain one at https://mozilla.org/MPL/2.0/.',
|
||||||
|
' ',
|
||||||
|
],
|
||||||
|
2,
|
||||||
|
],
|
||||||
|
|
||||||
|
// Prettier
|
||||||
|
'prettier/prettier': 'error',
|
||||||
|
|
||||||
|
// React hooks — relax rules that are stricter in v5
|
||||||
|
'react-hooks/exhaustive-deps': 'off',
|
||||||
|
|
||||||
|
// React rules from Airbnb
|
||||||
|
'react/destructuring-assignment': ['error', 'always'],
|
||||||
|
'react/no-unused-prop-types': 'error',
|
||||||
|
'react/no-array-index-key': 'error',
|
||||||
|
'react/jsx-no-useless-fragment': 'error',
|
||||||
|
'react/jsx-no-constructed-context-values': 'error',
|
||||||
|
'react/self-closing-comp': 'error',
|
||||||
|
'react/jsx-boolean-value': ['error', 'never'],
|
||||||
|
'react/jsx-pascal-case': ['error', { allowAllCaps: true }],
|
||||||
|
'react/button-has-type': 'error',
|
||||||
|
'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }],
|
||||||
|
'react/jsx-fragments': ['error', 'syntax'],
|
||||||
|
'react/jsx-no-script-url': 'error',
|
||||||
|
'react/style-prop-object': 'error',
|
||||||
|
'react/void-dom-elements-no-children': 'error',
|
||||||
|
'react/no-danger': 'warn',
|
||||||
|
'react/no-this-in-sfc': 'error',
|
||||||
|
'react/state-in-constructor': ['error', 'always'],
|
||||||
|
|
||||||
|
// React — match Airbnb overrides
|
||||||
|
'react/jsx-uses-react': 'off',
|
||||||
|
'react/react-in-jsx-scope': 'off',
|
||||||
|
'react/jsx-no-bind': 'off',
|
||||||
|
'react/jsx-props-no-spreading': 'off',
|
||||||
|
'react/require-default-props': 'off',
|
||||||
|
'react/function-component-definition': 'off',
|
||||||
|
'react/display-name': 'off',
|
||||||
|
'react/no-unstable-nested-components': ['error', { allowAsProps: true }],
|
||||||
|
|
||||||
|
// jsx-a11y — match Airbnb (allow autoFocus on non-DOM elements)
|
||||||
|
'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }],
|
||||||
|
|
||||||
|
// Restricted imports (MUI pattern)
|
||||||
|
'no-restricted-imports': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
patterns: [
|
||||||
|
{
|
||||||
|
group: ['@mui/*', '!@mui/material/', '!@mui/icons-material/', '!@mui/x-date-pickers/'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: ['@mui/*/*/*'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
// Restricted syntax (SxProps check)
|
||||||
|
'no-restricted-syntax': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
selector: 'TSTypeReference[typeName.name="SxProps"]:not([typeArguments])',
|
||||||
|
message: 'SxProps must have Theme parameter to avoid significant compiler slowdown.',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
// No relative import paths
|
||||||
|
'no-relative-import-paths/no-relative-import-paths': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
rootDir: 'src',
|
||||||
|
prefix: '@',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// Files using hooks in class static methods (valid namespace pattern, flagged by react-hooks v5)
|
||||||
|
{
|
||||||
|
files: [
|
||||||
|
'src/base/components/settings/NumberSetting.tsx',
|
||||||
|
'src/base/utils/MediaQuery.tsx',
|
||||||
|
'src/features/authentication/AuthManager.ts',
|
||||||
|
'src/features/browse/extensions/components/ExtensionCard.tsx',
|
||||||
|
'src/features/chapter/services/Chapters.ts',
|
||||||
|
'src/features/extension/info/components/ActionButton.tsx',
|
||||||
|
'src/features/manga/components/TrackMangaButton.tsx',
|
||||||
|
'src/features/manga/services/Mangas.ts',
|
||||||
|
'src/features/metadata/services/MetadataMigrations.ts',
|
||||||
|
'src/features/migration/components/MigrateDialog.tsx',
|
||||||
|
'src/features/navigation-bar/components/MobileBottomBar.tsx',
|
||||||
|
'src/features/reader/services/ReaderControls.ts',
|
||||||
|
'src/features/reader/services/ReaderService.ts',
|
||||||
|
'src/features/settings/screens/ImageProcessingSetting.tsx',
|
||||||
|
'src/features/source/browse/components/SourceOptions.tsx',
|
||||||
|
'src/features/source/browse/components/filters/SelectFilter.tsx',
|
||||||
|
'src/features/source/services/Sources.ts',
|
||||||
|
'src/lib/dayjs/LocaleImporter.ts',
|
||||||
|
'src/lib/dnd-kit/DndKitUtil.ts',
|
||||||
|
'src/lib/requests/RequestManager.ts',
|
||||||
|
'src/lib/requests/client/GraphQLClient.ts',
|
||||||
|
'src/lib/service-worker/ImageCache.ts',
|
||||||
|
'src/lib/virtuoso/Virtuoso.util.tsx',
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'react-hooks/rules-of-hooks': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// Tools/scripts override
|
||||||
|
{
|
||||||
|
files: ['tools/scripts/**/*'],
|
||||||
|
rules: {
|
||||||
|
'no-console': 'off',
|
||||||
|
'no-relative-import-paths/no-relative-import-paths': 'off',
|
||||||
|
'import-x/no-extraneous-dependencies': ['error', { devDependencies: true }],
|
||||||
|
'@typescript-eslint/naming-convention': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// Config files — not part of tsconfig, disable type-checked linting and project-specific rules
|
||||||
|
{
|
||||||
|
files: ['eslint.config.js'],
|
||||||
|
...tseslint.configs.disableTypeChecked,
|
||||||
|
rules: {
|
||||||
|
...tseslint.configs.disableTypeChecked.rules,
|
||||||
|
'header/header': 'off',
|
||||||
|
'import-x/no-default-export': 'off',
|
||||||
|
'import-x/no-extraneous-dependencies': 'off',
|
||||||
|
'import-x/default': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// Prettier must be last
|
||||||
|
prettierRecommended,
|
||||||
|
);
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { CodegenConfig } from '@graphql-codegen/cli';
|
import type { CodegenConfig } from '@graphql-codegen/cli';
|
||||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
// eslint-disable-next-line import-x/no-extraneous-dependencies
|
||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
|
|
||||||
const config: CodegenConfig = {
|
const config: CodegenConfig = {
|
||||||
@@ -36,5 +36,5 @@ const config: CodegenConfig = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import-x/no-default-export
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { defineConfig } from '@lingui/cli';
|
import { defineConfig } from '@lingui/cli';
|
||||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
// eslint-disable-next-line import-x/no-extraneous-dependencies
|
||||||
import { formatter } from '@lingui/format-po';
|
import { formatter } from '@lingui/format-po';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import-x/no-default-export
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
sourceLocale: 'en',
|
sourceLocale: 'en',
|
||||||
// !!!IMPORTANT!!!: 'locales' is auto-generated by tools/scripts/weblate/generatei18nResources.ts. Do not edit manually.
|
// !!!IMPORTANT!!!: 'locales' is auto-generated by tools/scripts/weblate/generatei18nResources.ts. Do not edit manually.
|
||||||
|
|||||||
21
package.json
21
package.json
@@ -13,7 +13,7 @@
|
|||||||
"test": "node -e \"console.log('imagine')\"",
|
"test": "node -e \"console.log('imagine')\"",
|
||||||
"build-md5": "find build -type f | sort | xargs md5sum | awk '{ print $1 }' | tr -d '\n' | md5sum| awk '{ print $1 }' > buildZip/md5sum ",
|
"build-md5": "find build -type f | sort | xargs md5sum | awk '{ print $1 }' | tr -d '\n' | md5sum| awk '{ print $1 }' > buildZip/md5sum ",
|
||||||
"build-zip": "cd build && rev=$(git rev-list HEAD --count) && echo r$rev > revision && zip -9 -r ../buildZip/Suwayomi-WebUI-r$rev *",
|
"build-zip": "cd build && rev=$(git rev-list HEAD --count) && echo r$rev > revision && zip -9 -r ../buildZip/Suwayomi-WebUI-r$rev *",
|
||||||
"lint": "eslint src tools --ext .ts,.tsx,.js,.jsx --max-warnings=0 --cache",
|
"lint": "eslint src tools --max-warnings=0 --cache",
|
||||||
"createCommitChangelog": "tsx tools/scripts/release/createCommitChangelog.ts",
|
"createCommitChangelog": "tsx tools/scripts/release/createCommitChangelog.ts",
|
||||||
"createTranslationChangelog": "tsx tools/scripts/release/createTranslationChangelog.ts",
|
"createTranslationChangelog": "tsx tools/scripts/release/createTranslationChangelog.ts",
|
||||||
"createReleaseChangelog": "tsx tools/scripts/release/createReleaseChangelog.ts",
|
"createReleaseChangelog": "tsx tools/scripts/release/createReleaseChangelog.ts",
|
||||||
@@ -110,24 +110,22 @@
|
|||||||
"@types/stylis": "4.2.7",
|
"@types/stylis": "4.2.7",
|
||||||
"@types/webfontloader": "1.6.38",
|
"@types/webfontloader": "1.6.38",
|
||||||
"@types/yargs": "17.0.35",
|
"@types/yargs": "17.0.35",
|
||||||
"@typescript-eslint/eslint-plugin": "7.16.1",
|
"@tony.ganchev/eslint-plugin-header": "3.2.6",
|
||||||
"@typescript-eslint/parser": "7.16.1",
|
|
||||||
"@vitejs/plugin-legacy": "7.2.1",
|
"@vitejs/plugin-legacy": "7.2.1",
|
||||||
"@vitejs/plugin-react-swc": "4.2.3",
|
"@vitejs/plugin-react-swc": "4.2.3",
|
||||||
"dotenv": "17.3.1",
|
"dotenv": "17.3.1",
|
||||||
"eslint": "8.57.0",
|
"eslint": "9.39.4",
|
||||||
"eslint-config-airbnb": "19.0.4",
|
"eslint-config-prettier": "10.1.8",
|
||||||
"eslint-config-airbnb-typescript": "18.0.0",
|
"eslint-import-resolver-typescript": "4.4.4",
|
||||||
"eslint-config-prettier": "9.1.0",
|
"eslint-plugin-import-x": "4.16.1",
|
||||||
"eslint-plugin-header": "3.1.1",
|
|
||||||
"eslint-plugin-import": "2.32.0",
|
|
||||||
"eslint-plugin-jsx-a11y": "6.10.2",
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
||||||
"eslint-plugin-lingui": "0.11.0",
|
"eslint-plugin-lingui": "0.11.0",
|
||||||
"eslint-plugin-no-relative-import-paths": "1.6.1",
|
"eslint-plugin-no-relative-import-paths": "1.6.1",
|
||||||
"eslint-plugin-prettier": "5.5.5",
|
"eslint-plugin-prettier": "5.5.5",
|
||||||
"eslint-plugin-react": "7.37.5",
|
"eslint-plugin-react": "7.37.5",
|
||||||
"eslint-plugin-react-hooks": "4.6.2",
|
"eslint-plugin-react-hooks": "5.2.0",
|
||||||
"eslint-plugin-unused-imports": "3.2.0",
|
"eslint-plugin-unused-imports": "4.4.1",
|
||||||
|
"globals": "15.15.0",
|
||||||
"husky": "9.1.7",
|
"husky": "9.1.7",
|
||||||
"lint-staged": "16.3.2",
|
"lint-staged": "16.3.2",
|
||||||
"prettier": "3.8.1",
|
"prettier": "3.8.1",
|
||||||
@@ -136,6 +134,7 @@
|
|||||||
"tsx": "4.21.0",
|
"tsx": "4.21.0",
|
||||||
"@typescript/native-preview": "7.0.0-dev.20260309.1",
|
"@typescript/native-preview": "7.0.0-dev.20260309.1",
|
||||||
"typescript": "5.9.3",
|
"typescript": "5.9.3",
|
||||||
|
"typescript-eslint": "8.57.0",
|
||||||
"vite": "7.3.1",
|
"vite": "7.3.1",
|
||||||
"vite-plugin-node-polyfills": "0.25.0",
|
"vite-plugin-node-polyfills": "0.25.0",
|
||||||
"vite-plugin-pwa": "1.2.0",
|
"vite-plugin-pwa": "1.2.0",
|
||||||
|
|||||||
2
src/apollo-upload-client.d.ts
vendored
2
src/apollo-upload-client.d.ts
vendored
@@ -10,7 +10,7 @@ declare module 'apollo-upload-client/UploadHttpLink.mjs' {
|
|||||||
import { ApolloLink } from '@apollo/client';
|
import { ApolloLink } from '@apollo/client';
|
||||||
import type { BaseHttpLink } from '@apollo/client/link/http';
|
import type { BaseHttpLink } from '@apollo/client/link/http';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import-x/no-default-export
|
||||||
export default class UploadHttpLink extends ApolloLink {
|
export default class UploadHttpLink extends ApolloLink {
|
||||||
constructor(options?: BaseHttpLink.ConstructorOptions);
|
constructor(options?: BaseHttpLink.ConstructorOptions);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,9 @@ class RealErrorBoundary extends Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
|
public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line no-console
|
||||||
console.error('Uncaught error:', error, errorInfo);
|
console.error('Uncaught error:', error, errorInfo);
|
||||||
|
|
||||||
// eslint-disable-next-line react/destructuring-assignment
|
// eslint-disable-next-line react/destructuring-assignment
|
||||||
this.props.setTrackPathChange(true);
|
this.props.setTrackPathChange(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,8 @@ export const ExtensionMetadata = ({
|
|||||||
<Metadata
|
<Metadata
|
||||||
{...props}
|
{...props}
|
||||||
stackProps={{
|
stackProps={{
|
||||||
// eslint-disable-next-line react/destructuring-assignment
|
|
||||||
...props.stackProps,
|
...props.stackProps,
|
||||||
sx: {
|
sx: {
|
||||||
// eslint-disable-next-line react/destructuring-assignment
|
|
||||||
...props.stackProps?.sx,
|
...props.stackProps?.sx,
|
||||||
flexDirection: 'column-reverse',
|
flexDirection: 'column-reverse',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -30,7 +28,6 @@ export const ExtensionMetadata = ({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
titleProps={{
|
titleProps={{
|
||||||
// eslint-disable-next-line react/destructuring-assignment
|
|
||||||
...props.titleProps,
|
...props.titleProps,
|
||||||
variant: 'body2',
|
variant: 'body2',
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
import { findDuplicatesByTitleAndAlternativeTitles } from '@/features/library/util/LibraryDuplicates.util.ts';
|
import { findDuplicatesByTitleAndAlternativeTitles } from '@/features/library/util/LibraryDuplicates.util.ts';
|
||||||
import { LibraryDuplicatesDescriptionWorkerInput } from '@/features/library/Library.types.ts';
|
import { LibraryDuplicatesDescriptionWorkerInput } from '@/features/library/Library.types.ts';
|
||||||
|
|
||||||
// eslint-disable-next-line no-restricted-globals
|
|
||||||
self.onmessage = (event: MessageEvent<LibraryDuplicatesDescriptionWorkerInput>) => {
|
self.onmessage = (event: MessageEvent<LibraryDuplicatesDescriptionWorkerInput>) => {
|
||||||
const { mangasToCheck, mangas } = event.data;
|
const { mangasToCheck, mangas } = event.data;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import { enhancedCleanup } from '@/base/utils/Strings.ts';
|
|||||||
const queue = new Queue((navigator.hardwareConcurrency ?? 5) - 1);
|
const queue = new Queue((navigator.hardwareConcurrency ?? 5) - 1);
|
||||||
const MANGAS_PER_CHUNK = 200;
|
const MANGAS_PER_CHUNK = 200;
|
||||||
|
|
||||||
// eslint-disable-next-line no-restricted-globals
|
|
||||||
self.onmessage = async (event: MessageEvent<LibraryDuplicatesWorkerInput>) => {
|
self.onmessage = async (event: MessageEvent<LibraryDuplicatesWorkerInput>) => {
|
||||||
const { mangas, checkAlternativeTitles } = event.data;
|
const { mangas, checkAlternativeTitles } = event.data;
|
||||||
|
|
||||||
|
|||||||
@@ -168,16 +168,16 @@ const VerticalGrid = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
{/* render div to prevent UI jumping around when showing/hiding loading placeholder */
|
{/* render div to prevent UI jumping around when showing/hiding loading placeholder */}
|
||||||
/* eslint-disable-next-line no-nested-ternary */}
|
{/* eslint-disable no-nested-ternary */}
|
||||||
{isSelectModeActive && gridLayout === GridLayout.List ? (
|
{isSelectModeActive && gridLayout === GridLayout.List ? (
|
||||||
<Box sx={{ paddingBottom: DEFAULT_FULL_FAB_HEIGHT }} />
|
<Box sx={{ paddingBottom: DEFAULT_FULL_FAB_HEIGHT }} />
|
||||||
) : // eslint-disable-next-line no-nested-ternary
|
) : isLoading ? (
|
||||||
isLoading ? (
|
|
||||||
<LoadingPlaceholder />
|
<LoadingPlaceholder />
|
||||||
) : hasNextPage ? (
|
) : hasNextPage ? (
|
||||||
<div style={{ height: '75px' }} />
|
<div style={{ height: '75px' }} />
|
||||||
) : null}
|
) : null}
|
||||||
|
{/* eslint-enable no-nested-ternary */}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -548,6 +548,7 @@ export class Mangas {
|
|||||||
for (const migrationAction of migrationActions) {
|
for (const migrationAction of migrationActions) {
|
||||||
// the migration actions (copy, cleanup) are supposed to be run sequentially to ensure that the cleanup
|
// the migration actions (copy, cleanup) are supposed to be run sequentially to ensure that the cleanup
|
||||||
// only happens in case the copy succeeded
|
// only happens in case the copy succeeded
|
||||||
|
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
await performMigrationAction(migrationAction, ...actions);
|
await performMigrationAction(migrationAction, ...actions);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-extraneous-dependencies,no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import deepmerge from '@mui/utils/deepmerge';
|
import deepmerge from '@mui/utils/deepmerge';
|
||||||
import { AppMetadataKeys, IMetadataMigration } from '@/features/metadata/Metadata.types.ts';
|
import { AppMetadataKeys, IMetadataMigration } from '@/features/metadata/Metadata.types.ts';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export const MobileBottomBar = ({ navBarItems }: { navBarItems: NavbarItem[] })
|
|||||||
>
|
>
|
||||||
{navBarItems.map(({ path, title, IconComponent, SelectedIconComponent, useBadge }) => (
|
{navBarItems.map(({ path, title, IconComponent, SelectedIconComponent, useBadge }) => (
|
||||||
<BottomNavigationAction
|
<BottomNavigationAction
|
||||||
|
key={path}
|
||||||
value={path}
|
value={path}
|
||||||
label={t(title)}
|
label={t(title)}
|
||||||
icon={
|
icon={
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { useEffect, useMemo } from 'react';
|
import { useEffect, useMemo } from 'react';
|
||||||
// eslint-disable-next-line import/no-extraneous-dependencies,no-restricted-imports
|
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import {
|
import {
|
||||||
requestMangaMetadataUpdate,
|
requestMangaMetadataUpdate,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const getMetadataServerSettings = async (): Promise<MetadataServerSetting
|
|||||||
const { data, error } = await requestManager.getGlobalMeta().response;
|
const { data, error } = await requestManager.getGlobalMeta().response;
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import { SortFilter } from '@/features/source/browse/components/filters/SortFilt
|
|||||||
import { TextFilter } from '@/features/source/browse/components/filters/TextFilter.tsx';
|
import { TextFilter } from '@/features/source/browse/components/filters/TextFilter.tsx';
|
||||||
import { TriStateFilter } from '@/features/source/browse/components/filters/TriStateFilter.tsx';
|
import { TriStateFilter } from '@/features/source/browse/components/filters/TriStateFilter.tsx';
|
||||||
// this can only cycle once, so should be fine
|
// this can only cycle once, so should be fine
|
||||||
// eslint-disable-next-line import/no-cycle
|
|
||||||
import { GroupFilter } from '@/features/source/browse/components/filters/GroupFilter.tsx';
|
import { GroupFilter } from '@/features/source/browse/components/filters/GroupFilter.tsx';
|
||||||
import { SeparatorFilter } from '@/features/source/browse/components/filters/SeparatorFilter.tsx';
|
import { SeparatorFilter } from '@/features/source/browse/components/filters/SeparatorFilter.tsx';
|
||||||
import { StyledFab } from '@/base/components/buttons/StyledFab.tsx';
|
import { StyledFab } from '@/base/components/buttons/StyledFab.tsx';
|
||||||
@@ -249,6 +249,7 @@ export function SourceOptions({
|
|||||||
<Stack sx={{ flexDirection: 'row' }}>
|
<Stack sx={{ flexDirection: 'row' }}>
|
||||||
{savedSearchNames.map((savedSearch) => (
|
{savedSearchNames.map((savedSearch) => (
|
||||||
<Chip
|
<Chip
|
||||||
|
key={savedSearch}
|
||||||
label={savedSearch}
|
label={savedSearch}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setFilterOptions(false);
|
setFilterOptions(false);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import ListItemText from '@mui/material/ListItemText';
|
|||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
// eslint-disable-next-line import/no-cycle
|
|
||||||
import { Options } from '@/features/source/browse/components/SourceOptions.tsx';
|
import { Options } from '@/features/source/browse/components/SourceOptions.tsx';
|
||||||
import { SourceFilters } from '@/features/source/Source.types.ts';
|
import { SourceFilters } from '@/features/source/Source.types.ts';
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
useTheme,
|
useTheme,
|
||||||
} from '@mui/material/styles';
|
} from '@mui/material/styles';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
// eslint-disable-next-line import/no-extraneous-dependencies,no-restricted-imports
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { deepmerge } from '@mui/utils';
|
import { deepmerge } from '@mui/utils';
|
||||||
import { complement, hsl, parseToHsl } from 'polished';
|
import { complement, hsl, parseToHsl } from 'polished';
|
||||||
import { HslaColor, HslColor } from 'polished/lib/types/color';
|
import { HslaColor, HslColor } from 'polished/lib/types/color';
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ const TrackerActiveHeader = ({
|
|||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
/>,
|
/>,
|
||||||
<TrackerUpdatePrivateStatus
|
<TrackerUpdatePrivateStatus
|
||||||
|
key={`tracker-active-menu-item-private-${tracker.id}`}
|
||||||
trackRecordId={trackRecord.id}
|
trackRecordId={trackRecord.id}
|
||||||
isPrivate={trackRecord.private}
|
isPrivate={trackRecord.private}
|
||||||
closeMenu={onClose}
|
closeMenu={onClose}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import { AuthManager } from '@/features/authentication/AuthManager.ts';
|
|||||||
import { UserRefreshMutation } from '@/lib/graphql/generated/graphql.ts';
|
import { UserRefreshMutation } from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { AbortableApolloMutationResponse } from '@/lib/requests/RequestManager.ts';
|
import { AbortableApolloMutationResponse } from '@/lib/requests/RequestManager.ts';
|
||||||
|
|
||||||
/* eslint-disable no-underscore-dangle */
|
|
||||||
const typePolicies: StrictTypedTypePolicies = {
|
const typePolicies: StrictTypedTypePolicies = {
|
||||||
MangaType: {
|
MangaType: {
|
||||||
fields: {
|
fields: {
|
||||||
@@ -177,7 +176,6 @@ const typePolicies: StrictTypedTypePolicies = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
/* eslint-enable no-underscore-dangle */
|
|
||||||
|
|
||||||
export class GraphQLClient extends BaseClient<ApolloClient, ApolloClient.Options, null> {
|
export class GraphQLClient extends BaseClient<ApolloClient, ApolloClient.Options, null> {
|
||||||
readonly fetcher = null;
|
readonly fetcher = null;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// eslint-disable-next-line max-classes-per-file
|
/* eslint-disable max-classes-per-file */
|
||||||
import { jsonSaveParse } from '@/lib/HelperFunctions.ts';
|
import { jsonSaveParse } from '@/lib/HelperFunctions.ts';
|
||||||
|
|
||||||
export class Storage {
|
export class Storage {
|
||||||
|
|||||||
@@ -180,7 +180,9 @@ const createChangelogCommitLine = (commit: Commit): string => {
|
|||||||
const getContributors = (commits: Commit[]): string[] => [
|
const getContributors = (commits: Commit[]): string[] => [
|
||||||
...new Set(
|
...new Set(
|
||||||
commits
|
commits
|
||||||
.map((commit) => commit.authors.map((author) => author.user?.login!).filter((author) => !!author))
|
.map((commit) =>
|
||||||
|
commit.authors.map((author) => author.user?.login).filter((author): author is string => !!author),
|
||||||
|
)
|
||||||
.flat(),
|
.flat(),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ const extractContributionInfoFromChanges = (
|
|||||||
const actions: Record<number, string> = {};
|
const actions: Record<number, string> = {};
|
||||||
|
|
||||||
changes.forEach((change) => {
|
changes.forEach((change) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
||||||
const { translation: translationUrl, action, action_name, user: userUrl } = change;
|
const { translation: translationUrl, action, action_name, user: userUrl } = change;
|
||||||
if (userUrl === null) {
|
if (userUrl === null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
import { hideBin } from 'yargs/helpers';
|
import { hideBin } from 'yargs/helpers';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
import { validateWeblateDates } from '../weblate/Weblate.utils.ts';
|
||||||
import { createCommitChangelog } from './CommitChangelog.utils.ts';
|
import { createCommitChangelog } from './CommitChangelog.utils.ts';
|
||||||
import { createTranslationChangelog } from './TranslationChangelog.utils.ts';
|
import { createTranslationChangelog } from './TranslationChangelog.utils.ts';
|
||||||
import { validateWeblateDates } from '../weblate/Weblate.utils.ts';
|
|
||||||
|
|
||||||
const { sha, date } = yargs(hideBin(process.argv))
|
const { sha, date } = yargs(hideBin(process.argv))
|
||||||
.options({
|
.options({
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
import { hideBin } from 'yargs/helpers';
|
import { hideBin } from 'yargs/helpers';
|
||||||
import { createTranslationChangelog } from './TranslationChangelog.utils.ts';
|
|
||||||
import { TRANSLATION_CHANGELOG_YARG_OPTIONS_DEFAULT } from '../weblate/Weblate.constants.ts';
|
import { TRANSLATION_CHANGELOG_YARG_OPTIONS_DEFAULT } from '../weblate/Weblate.constants.ts';
|
||||||
|
import { createTranslationChangelog } from './TranslationChangelog.utils.ts';
|
||||||
|
|
||||||
const { afterDate, beforeDate, requiredContributionCount, keepKnownContributors } = yargs(hideBin(process.argv))
|
const { afterDate, beforeDate, requiredContributionCount, keepKnownContributors } = yargs(hideBin(process.argv))
|
||||||
.options({
|
.options({
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import-x/no-extraneous-dependencies */
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
@@ -18,7 +18,7 @@ import { lingui } from '@lingui/vite-plugin';
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
import { d } from 'koration';
|
import { d } from 'koration';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import-x/no-default-export
|
||||||
export default defineConfig(({ command }) => ({
|
export default defineConfig(({ command }) => ({
|
||||||
base: command === 'serve' ? process.env.VITE_SUBPATH || './' : './',
|
base: command === 'serve' ? process.env.VITE_SUBPATH || './' : './',
|
||||||
build: {
|
build: {
|
||||||
|
|||||||
Reference in New Issue
Block a user