chore: update lint script to include the .mjs (#1267)

This commit is contained in:
hehe
2023-03-03 02:01:09 +08:00
committed by GitHub
parent eeb636e81c
commit a61bb4f8bc
4 changed files with 14 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
import fs from 'fs'; import fs from 'fs';
import path from 'path';
// TODO: use https://github.com/quicktype/quicktype#installation instead // TODO: use https://github.com/quicktype/quicktype#installation instead
import { compileFromFile } from 'json-schema-to-typescript'; import { compileFromFile } from 'json-schema-to-typescript';
import path from 'path';
import { cd } from 'zx/core'; import { cd } from 'zx/core';
const projectRoot = path.join(__dirname, '..', '..'); const projectRoot = path.join(__dirname, '..', '..');

View File

@@ -1,10 +1,12 @@
// @ts-check // @ts-check
import path from 'node:path';
import debugLocal from 'next-debug-local';
import preset from './preset.config.mjs';
import { createRequire } from 'node:module'; import { createRequire } from 'node:module';
import { getCommitHash, getGitVersion } from './scripts/gitInfo.mjs'; import path from 'node:path';
import { PerfseePlugin } from '@perfsee/webpack'; import { PerfseePlugin } from '@perfsee/webpack';
import debugLocal from 'next-debug-local';
import preset from './preset.config.mjs';
import { getCommitHash, getGitVersion } from './scripts/gitInfo.mjs';
const require = createRequire(import.meta.url); const require = createRequire(import.meta.url);

View File

@@ -1,6 +1,6 @@
import 'dotenv/config'; import 'dotenv/config';
export default { const config = {
enableIndexedDBProvider: Boolean(process.env.ENABLE_IDB_PROVIDER ?? '1'), enableIndexedDBProvider: Boolean(process.env.ENABLE_IDB_PROVIDER ?? '1'),
enableBroadCastChannelProvider: Boolean( enableBroadCastChannelProvider: Boolean(
process.env.ENABLE_BC_PROVIDER ?? '1' process.env.ENABLE_BC_PROVIDER ?? '1'
@@ -8,3 +8,4 @@ export default {
prefetchWorkspace: Boolean(process.env.PREFETCH_WORKSPACE ?? '1'), prefetchWorkspace: Boolean(process.env.PREFETCH_WORKSPACE ?? '1'),
exposeInternal: Boolean(process.env.EXPOSE_INTERNAL ?? '1'), exposeInternal: Boolean(process.env.EXPOSE_INTERNAL ?? '1'),
}; };
export default config;

View File

@@ -9,19 +9,18 @@
"dev:ac": "cross-env NODE_API_SERVER=ac pnpm --filter @affine/app dev", "dev:ac": "cross-env NODE_API_SERVER=ac pnpm --filter @affine/app dev",
"dev:local": "cross-env NODE_API_SERVER=local pnpm --filter @affine/app dev", "dev:local": "cross-env NODE_API_SERVER=local pnpm --filter @affine/app dev",
"build": "pnpm --filter @affine/app build", "build": "pnpm --filter @affine/app build",
"build:client": " pnpm --filter=@affine/client-app build:app", "build:client": "pnpm --filter @affine/client-app build:app",
"build:storybook": " pnpm -r build-storybook", "build:storybook": "pnpm -r build-storybook",
"export": "pnpm --filter @affine/app export", "export": "pnpm --filter @affine/app export",
"export:rem": "pnpm --filter @affine/rem export",
"start": "pnpm --filter @affine/app start", "start": "pnpm --filter @affine/app start",
"lint": "eslint . --ext .js,.ts,.mts,.tsx", "lint": "eslint . --ext .js,mjs,.ts,.tsx",
"lint:fix": "eslint . --ext .js,.ts,.mts,.tsx --fix", "lint:fix": "pnpm lint --fix",
"test": "playwright test", "test": "playwright test",
"test:coverage": "cross-env COVERAGE=true pnpm test -- --forbid-only", "test:coverage": "cross-env COVERAGE=true pnpm test -- --forbid-only",
"test:unit": "vitest --run", "test:unit": "vitest --run",
"test:unit:coverage": "vitest run --coverage", "test:unit:coverage": "vitest run --coverage",
"postinstall": "husky install", "postinstall": "husky install",
"notify": "node --experimental-modules scripts/notify.mjs", "notify": "node scripts/notify.mjs",
"update:core": "pnpm up @blocksuite/*@nightly !@blocksuite/icons -r" "update:core": "pnpm up @blocksuite/*@nightly !@blocksuite/icons -r"
}, },
"lint-staged": { "lint-staged": {