style: enable no-extraneous-dependencies lint rule (#4575)

This commit is contained in:
LongYinan
2023-10-11 01:51:47 +08:00
committed by GitHub
parent c8d1de3a59
commit b1eb926b7b
25 changed files with 467 additions and 323 deletions

View File

@@ -23,6 +23,7 @@ import { WebpackS3Plugin, gitShortHash } from './s3-plugin.js';
const IN_CI = !!process.env.CI;
export const rootPath = fileURLToPath(new URL('..', import.meta.url));
const workspaceRoot = join(rootPath, '..', '..');
const require = createRequire(rootPath);
@@ -144,66 +145,70 @@ export const createConfiguration: (
: {
events: false,
},
alias:
blocksuiteBaseDir === undefined
? undefined
: {
yjs: require.resolve('yjs'),
'@blocksuite/block-std': resolve(
blocksuiteBaseDir,
'packages',
'block-std',
'src'
),
'@blocksuite/blocks': resolve(
blocksuiteBaseDir,
'packages',
'blocks',
'src'
),
'@blocksuite/editor': resolve(
blocksuiteBaseDir,
'packages',
'editor',
'src'
),
'@blocksuite/global': resolve(
blocksuiteBaseDir,
'packages',
'global',
'src'
),
'@blocksuite/lit': resolve(
blocksuiteBaseDir,
'packages',
'lit',
'src'
),
'@blocksuite/phasor': resolve(
blocksuiteBaseDir,
'packages',
'phasor',
'src'
),
'@blocksuite/store/providers/broadcast-channel': resolve(
blocksuiteBaseDir,
'packages',
'store',
'src/providers/broadcast-channel'
),
'@blocksuite/store': resolve(
blocksuiteBaseDir,
'packages',
'store',
'src'
),
'@blocksuite/virgo': resolve(
blocksuiteBaseDir,
'packages',
'virgo',
'src'
),
},
alias: {
yjs: require.resolve('yjs'),
'@blocksuite/block-std': blocksuiteBaseDir
? join(blocksuiteBaseDir, 'packages', 'block-std', 'src')
: join(
workspaceRoot,
'node_modules',
'@blocksuite',
'block-std',
'dist'
),
'@blocksuite/blocks': blocksuiteBaseDir
? join(blocksuiteBaseDir, 'packages', 'blocks', 'src')
: join(
workspaceRoot,
'node_modules',
'@blocksuite',
'blocks',
'dist'
),
'@blocksuite/editor': blocksuiteBaseDir
? join(blocksuiteBaseDir, 'packages', 'editor', 'src')
: join(
workspaceRoot,
'node_modules',
'@blocksuite',
'editor',
'dist'
),
'@blocksuite/global': blocksuiteBaseDir
? join(blocksuiteBaseDir, 'packages', 'global', 'src')
: join(
workspaceRoot,
'node_modules',
'@blocksuite',
'global',
'dist'
),
'@blocksuite/lit': blocksuiteBaseDir
? join(blocksuiteBaseDir, 'packages', 'lit', 'src')
: join(workspaceRoot, 'node_modules', '@blocksuite', 'lit', 'dist'),
'@blocksuite/store/providers/broadcast-channel': blocksuiteBaseDir
? join(
blocksuiteBaseDir,
'packages',
'store',
'src/providers/broadcast-channel'
)
: join(
workspaceRoot,
'node_modules',
'@blocksuite',
'store',
'dist',
'providers',
'broadcast-channel.js'
),
'@blocksuite/store': blocksuiteBaseDir
? join(blocksuiteBaseDir, 'packages', 'store', 'src')
: join(workspaceRoot, 'node_modules', '@blocksuite', 'store', 'dist'),
'@blocksuite/virgo': blocksuiteBaseDir
? join(blocksuiteBaseDir, 'packages', 'virgo', 'src')
: join(workspaceRoot, 'node_modules', '@blocksuite', 'virgo', 'dist'),
},
},
module: {

View File

@@ -28,7 +28,7 @@
"@blocksuite/blocks": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/editor": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/global": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/icons": "^2.1.33",
"@blocksuite/icons": "2.1.34",
"@blocksuite/lit": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/store": "0.0.0-20230926212737-6d4b1569-nightly",
"@dnd-kit/core": "^6.0.8",
@@ -37,7 +37,7 @@
"@emotion/react": "^11.11.1",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.14.7",
"@mui/material": "^5.14.12",
"@radix-ui/react-select": "^1.2.2",
"@react-hookz/web": "^23.1.0",
"@toeverything/components": "^0.0.43",
@@ -46,26 +46,26 @@
"cssnano": "^6.0.1",
"graphql": "^16.8.1",
"intl-segmenter-polyfill-rs": "^0.1.6",
"jotai": "^2.4.2",
"jotai": "^2.4.3",
"jotai-devtools": "^0.6.2",
"lit": "^2.8.0",
"lottie-web": "^5.12.2",
"mini-css-extract-plugin": "^2.7.6",
"next-auth": "^4.23.1",
"next-auth": "^4.23.2",
"next-themes": "^0.2.1",
"postcss-loader": "^7.3.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-is": "18.2.0",
"react-resizable-panels": "^0.0.55",
"react-router-dom": "^6.15.0",
"react-router-dom": "^6.16.0",
"rxjs": "^7.8.1",
"ses": "^0.18.8",
"swr": "2.2.0",
"valtio": "^1.11.2",
"y-protocols": "^1.0.6",
"yjs": "^13.6.8",
"zod": "^3.22.2"
"zod": "^3.22.4"
},
"devDependencies": {
"@aws-sdk/client-s3": "3.418.0",

View File

@@ -50,6 +50,7 @@
"@reforged/maker-appimage": "^3.3.1",
"@toeverything/infra": "workspace:*",
"@types/uuid": "^9.0.4",
"builder-util-runtime": "^9.2.1",
"cross-env": "7.0.3",
"electron": "^26.3.0",
"electron-log": "^5.0.0-beta.29",
@@ -58,15 +59,17 @@
"esbuild": "^0.19.4",
"fs-extra": "^11.1.1",
"glob": "^10.3.5",
"jotai": "^2.4.2",
"jotai": "^2.4.3",
"lodash-es": "^4.17.21",
"rxjs": "^7.8.1",
"semver": "^7.5.4",
"tinykeys": "^2.1.0",
"ts-node": "^10.9.1",
"undici": "^5.25.2",
"uuid": "^9.0.1",
"vitest": "0.34.5",
"vitest": "0.34.6",
"which": "^4.0.0",
"zod": "^3.22.4",
"zx": "^7.2.3"
},
"dependencies": {

View File

@@ -34,6 +34,7 @@
"@node-rs/crc32": "^1.7.2",
"@node-rs/jsonwebtoken": "^0.2.3",
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/core": "^1.17.0",
"@opentelemetry/instrumentation": "^0.43.0",
"@opentelemetry/instrumentation-graphql": "^0.35.1",
"@opentelemetry/instrumentation-http": "^0.43.0",
@@ -59,7 +60,7 @@
"lodash-es": "^4.17.21",
"nanoid": "^4.0.2",
"nestjs-throttler-storage-redis": "^0.4.1",
"next-auth": "4.23.1",
"next-auth": "^4.23.2",
"nodemailer": "^6.9.5",
"on-headers": "^1.0.2",
"parse-duration": "^1.1.0",

View File

@@ -9,6 +9,7 @@
"dependencies": {
"@affine/component": "workspace:*",
"@affine/i18n": "workspace:*",
"@mui/material": "^5.14.12",
"@storybook/addon-actions": "^7.4.4",
"@storybook/addon-essentials": "^7.4.4",
"@storybook/addon-interactions": "^7.4.4",
@@ -16,11 +17,11 @@
"@storybook/addon-storysource": "^7.4.4",
"@storybook/blocks": "^7.4.4",
"@storybook/builder-vite": "^7.4.4",
"@storybook/jest": "^0.2.2",
"@storybook/jest": "^0.2.3",
"@storybook/react": "^7.4.4",
"@storybook/react-vite": "^7.4.4",
"@storybook/test-runner": "^0.13.0",
"@storybook/testing-library": "^0.2.1",
"@storybook/testing-library": "^0.2.2",
"@vitejs/plugin-react": "^4.0.4",
"concurrently": "^8.2.1",
"jest-mock": "^29.7.0",
@@ -35,20 +36,24 @@
"@blocksuite/blocks": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/editor": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/global": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/icons": "^2.1.33",
"@blocksuite/icons": "2.1.34",
"@blocksuite/lit": "0.0.0-20230926212737-6d4b1569-nightly",
"@blocksuite/store": "0.0.0-20230926212737-6d4b1569-nightly",
"@dnd-kit/sortable": "^7.0.2",
"@tomfreudenberg/next-auth-mock": "^0.5.6",
"chromatic": "^7.2.0",
"foxact": "^0.2.20",
"jotai": "^2.4.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-router-dom": "^6.16.0",
"storybook-addon-react-router-v6": "^2.0.7"
},
"peerDependencies": {
"@blocksuite/blocks": "*",
"@blocksuite/editor": "*",
"@blocksuite/global": "*",
"@blocksuite/icons": "*",
"@blocksuite/icons": "2.1.34",
"@blocksuite/lit": "*",
"@blocksuite/store": "*"
},