Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Dec 5, 2024
1 parent 68b1cab commit 6aae1b3
Show file tree
Hide file tree
Showing 10 changed files with 374 additions and 307 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ module.exports = {
},
},
rules: {
// HACK: breaks youtubei.js
'import/no-cycle': 'off',
'prettier/prettier': ['error', { endOfLine: 'auto' }],
'import/extensions': [
'warn',
Expand Down
2 changes: 1 addition & 1 deletion azusa-player-mobile
Submodule azusa-player-mobile updated 85 files
+6 −1 .eslintrc.js
+26 −0 .github/workflows/lint.yml
+2 −0 .prettierignore
+2 −6 __tests__/mediafetch/bilivideo.test.ts
+4 −4 android/app/build.gradle
+74 −0 android/app/src/main/res/drawable/shortcut_play_background.xml
+15 −0 android/app/src/main/res/drawable/shortcut_play_foreground.xml
+74 −0 android/app/src/main/res/drawable/shortcut_shuffle_on_background.xml
+15 −0 android/app/src/main/res/drawable/shortcut_shuffle_on_foreground.xml
+6 −0 android/app/src/main/res/mipmap-anydpi-v26/shortcut_play.xml
+6 −0 android/app/src/main/res/mipmap-anydpi-v26/shortcut_play_round.xml
+6 −0 android/app/src/main/res/mipmap-anydpi-v26/shortcut_shuffle_on.xml
+6 −0 android/app/src/main/res/mipmap-anydpi-v26/shortcut_shuffle_on_round.xml
+ android/app/src/main/res/mipmap-hdpi/shortcut_play.webp
+ android/app/src/main/res/mipmap-hdpi/shortcut_play_round.webp
+ android/app/src/main/res/mipmap-hdpi/shortcut_shuffle_on.webp
+ android/app/src/main/res/mipmap-hdpi/shortcut_shuffle_on_round.webp
+ android/app/src/main/res/mipmap-mdpi/shortcut_play.webp
+ android/app/src/main/res/mipmap-mdpi/shortcut_play_round.webp
+ android/app/src/main/res/mipmap-mdpi/shortcut_shuffle_on.webp
+ android/app/src/main/res/mipmap-mdpi/shortcut_shuffle_on_round.webp
+ android/app/src/main/res/mipmap-xhdpi/shortcut_play.webp
+ android/app/src/main/res/mipmap-xhdpi/shortcut_play_round.webp
+ android/app/src/main/res/mipmap-xhdpi/shortcut_shuffle_on.webp
+ android/app/src/main/res/mipmap-xhdpi/shortcut_shuffle_on_round.webp
+ android/app/src/main/res/mipmap-xxhdpi/shortcut_play.webp
+ android/app/src/main/res/mipmap-xxhdpi/shortcut_play_round.webp
+ android/app/src/main/res/mipmap-xxhdpi/shortcut_shuffle_on.webp
+ android/app/src/main/res/mipmap-xxhdpi/shortcut_shuffle_on_round.webp
+ android/app/src/main/res/mipmap-xxxhdpi/shortcut_play.webp
+ android/app/src/main/res/mipmap-xxxhdpi/shortcut_play_round.webp
+ android/app/src/main/res/mipmap-xxxhdpi/shortcut_shuffle_on.webp
+ android/app/src/main/res/mipmap-xxxhdpi/shortcut_shuffle_on_round.webp
+4 −0 android/app/src/main/res/values/shortcut_play_background.xml
+4 −0 android/app/src/main/res/values/shortcut_shuffle_on_background.xml
+2 −2 android/app/src/main/res/xml/shortcuts.xml
+ android/app/src/main/shortcut_play-playstore.png
+ android/app/src/main/shortcut_shuffle_on-playstore.png
+2 −2 android/build.gradle
+1 −1 android/gradle/wrapper/gradle-wrapper.properties
+1 −1 docs/docs/developer/add-fetcher.md
+7 −5 docs/docs/developer/contribute.md
+8 −0 docs/docs/store/_category_.json
+15 −0 docs/docs/store/buy-apm-pro.md
+ docs/docs/store/images/azusa-please.gif
+2 −2 docs/docusaurus.config.js
+1 −1 docs/i18n/en/docusaurus-plugin-content-docs/current/developer/add-fetcher.md
+22 −9 docs/i18n/en/docusaurus-plugin-content-docs/current/developer/contribute.md
+8 −0 docs/i18n/en/docusaurus-plugin-content-docs/current/store/_category_.json
+15 −0 docs/i18n/en/docusaurus-plugin-content-docs/current/store/buy-apm-pro.md
+7,799 −3,996 docs/package-lock.json
+9 −8 docs/package.json
+35 −35 package.json
+0 −0 patches/expo-image+2.0.2.patch
+1 −0 src/components/background/AppOpenSplash.tsx
+2 −2 src/components/dialogs/GenericSelectDialog.tsx
+1 −1 src/components/explore/YTMusic.tsx
+1 −0 src/components/landscape/LandscapePlayerPanel.tsx
+52 −40 src/components/login/google/YTM.tsx
+0 −6 src/components/login/google/useYTMLogin.ts
+1 −1 src/components/miniplayer/Lrc.tsx
+1 −1 src/components/miniplayer/ProgressBar.tsx
+1 −0 src/components/player/controls/WavyAnimation.tsx
+150 −157 src/components/setting/DeveloperSettings.tsx
+40 −0 src/components/setting/SelectDialogWrapper.tsx
+4 −1 src/components/setting/SyncSettings.tsx
+21 −33 src/components/setting/appearances/SelectDarkModeButton.tsx
+10 −6 src/components/setting/appearances/SkinSettings.tsx
+1 −1 src/components/setting/helpers/SelectSetting.tsx
+0 −9 src/components/setting/helpers/SettingEntry.ts
+12 −1 src/components/setting/sync/PersonalSyncButton.tsx
+7 −1 src/components/setting/sync/useSync.ts
+2 −1 src/hooks/useSetupPlayer.ts
+1 −0 src/localization/en/translation.json
+1 −1 src/localization/i18n.ts
+1 −0 src/localization/zhcn/translation.json
+2 −2 src/stores/initializeStores.ts
+5 −4 src/utils/ChromeStorage.ts
+16 −0 src/utils/Utils.ts
+3 −1 src/utils/mediafetch/bilishazam.ts
+11 −7 src/utils/mediafetch/ytbi.ts
+29 −30 src/utils/muse.ts
+3 −3 src/utils/sync/Dropbox.ts
+1 −1 src/utils/sync/Github.ts
+568 −614 yarn.lock
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.26.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@types/base-64": "^1.0.2",
"@types/chrome": "^0.0.287",
"@types/he": "^1.2.3",
"@types/js-base64": "^3.3.1",
"@types/lodash": "^4.17.13",
"@types/md5": "^2.3.5",
"@types/react": "^18.3.12",
"@types/react": "^18.3.13",
"@types/react-dom": "^18.3.1",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"@welldone-software/why-did-you-render": "^8.0.3",
"babel-loader": "^9.2.1",
"clean-webpack-plugin": "^4.0.0",
Expand All @@ -41,7 +42,7 @@
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-import-resolver-webpack": "^0.13.9",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
Expand All @@ -50,16 +51,15 @@
"eslint-plugin-react-hooks": "^5.0.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.6.3",
"lodash": "^4.17.21",
"mini-css-extract-plugin": "^2.9.2",
"prettier": "^3.4.1",
"prettier": "^3.4.2",
"progress-bar-webpack-plugin": "^2.1.0",
"react-refresh": "^0.14.2",
"sass-loader": "^16.0.3",
"style-loader": "^4.0.0",
"tsconfig-paths-webpack-plugin": "^4.2.0",
"typescript": "^5.7.2",
"webpack": "^5.96.1",
"webpack": "^5.97.1",
"webpack-cli": "^5.1.4",
"webpack-config-utils": "^2.3.1",
"webpack-dev-server": "^5.1.0"
Expand All @@ -78,11 +78,11 @@
"@fortawesome/fontawesome-free": "^6.7.1",
"@fortawesome/free-brands-svg-icons": "^6.7.1",
"@hello-pangea/dnd": "^17.0.0",
"@mui/icons-material": "^6.1.8",
"@mui/icons-material": "^6.1.10",
"@mui/lab": "6.0.0-dev.240424162023-9968b4889d",
"@mui/material": "^6.1.8",
"@mui/styles": "^6.1.8",
"axios": "^1.7.8",
"@mui/material": "^6.1.10",
"@mui/styles": "^6.1.10",
"axios": "^1.7.9",
"base-64": "^1.0.0",
"base64-js": "^1.5.1",
"big-integer": "^1.6.52",
Expand Down Expand Up @@ -114,17 +114,17 @@
"react-contexify": "^6.0.0",
"react-dom": "^18.3.1",
"react-hotkeys-hook": "^4.6.1",
"react-i18next": "^15.1.2",
"react-i18next": "^15.1.3",
"react-jinke-music-player": "git+https://[email protected]/lovegaoshi/react-music-player.git",
"react-lrc": "^3.2.1",
"react-swipeable": "^7.0.2",
"react-window": "^1.8.10",
"sass": "^1.81.0",
"sass": "^1.82.0",
"stream-browserify": "^3.0.0",
"util": "^0.12.5",
"uuid": "^11.0.3",
"youtubei.js": "^11.0.1",
"zustand": "^5.0.1"
"zustand": "^5.0.2"
},
"packageManager": "[email protected]"
}
1 change: 0 additions & 1 deletion src/components/setting/SyncSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import MenuItem from '@mui/material/MenuItem';
import TextField from '@mui/material/TextField';
import Box from '@mui/material/Box';
import { useStore } from 'zustand';

import useApp from '@stores/useApp';
import { useNoxSetting } from '@APM/stores/useApp';
Expand Down
3 changes: 2 additions & 1 deletion src/components/setting/sync/DropboxAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ const DropboxSyncButton = ({ restoreFromUint8Array, sx }: GenericPropsR) =>
GenericSyncButton({
restoreFromUint8Array,
noxBackup: (v) => noxBackup(dbx, v),
noxRestore: () => noxRestore(dbx, async (v) => v.arrayBuffer()),
noxRestore: () =>
noxRestore(dbx, async (v) => new Uint8Array(await v.arrayBuffer())),
login: loginDropbox,
sx,
});
Expand Down
3 changes: 2 additions & 1 deletion src/components/setting/sync/GithubAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const GiteeSyncButton = ({ restoreFromUint8Array, sx }: GenericPropsR) =>
GenericSyncButton({
restoreFromUint8Array,
noxBackup: (v) => noxBackup(v, authToken),
noxRestore: () => noxRestore(authToken, async (v) => v.arrayBuffer()),
noxRestore: () =>
noxRestore(authToken, async (v) => new Uint8Array(await v.arrayBuffer())),
login,
sx,
});
Expand Down
2 changes: 1 addition & 1 deletion src/stores/useInitializeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { initializeR128Gain } from '@APM/utils/ffmpeg/r128Store';
import { initialize as initializeAppStore } from '@APM/stores/appStore';
import { useNoxSetting } from '@APM/stores/useApp';
import { initPlayerObject, importStorageRaw } from '@utils/ChromeStorage';
import { initialize as initializeRegexStore } from './regexStore';
import useApp from '@stores/useApp';
import versionUpdate from '@utils/versionupdater/versionupdater';
import { initialize as initializeRegexStore } from './regexStore';

const useInitializeStore = () => {
const initPlayer = useNoxSetting((state) => state.initPlayer);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ChromeStorageAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const getRegExtractMapping = async (): Promise<
);
return await res.json();
} catch (e) {
logger.error('failed to load rejson');
logger.error(`failed to load rejson: ${e}`);
return rejson as NoxRegExt.JSONExtractor[];
}
};
Expand Down
1 change: 1 addition & 0 deletions src/utils/RNUtils.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const isIOS = false;
export const isAndroid = false;
Loading

0 comments on commit 6aae1b3

Please sign in to comment.