mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
chore: eslint config
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
// https://eslint.org/docs/latest/user-guide/configuring
|
||||
// "off" or 0 - turn the rule off
|
||||
// "warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
|
||||
// "error" or 2 - turn the rule on as an error (exit code will be 1)
|
||||
|
||||
/** @type { import('eslint').Linter.Config } */
|
||||
module.exports = {
|
||||
extends: ['plugin:prettier/recommended'],
|
||||
rules: {
|
||||
'prettier/prettier': 'warn',
|
||||
},
|
||||
|
||||
reportUnusedDisableDirectives: true,
|
||||
};
|
||||
Vendored
+1
-1
@@ -3,5 +3,5 @@
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnSaveMode": "file",
|
||||
"cSpell.words": ["testid"]
|
||||
"cSpell.words": ["blocksuite", "testid"]
|
||||
}
|
||||
|
||||
+31
-3
@@ -10,14 +10,17 @@
|
||||
"lint": "pnpm --filter @pathfinder/app lint",
|
||||
"test": "playwright test",
|
||||
"test:e2e": "playwright test",
|
||||
"test:e2e:codegen":"npx playwright codegen http://localhost:8080",
|
||||
"test:e2e:codegen": "npx playwright codegen http://localhost:8080",
|
||||
"test:unit": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^29.3.1",
|
||||
"@playwright/test": "^1.28.1",
|
||||
"@types/node": "18.7.18",
|
||||
"eslint": "8.22.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.47.0",
|
||||
"@typescript-eslint/parser": "^5.47.0",
|
||||
"@types/eslint": "^8.4.10",
|
||||
"@types/node": "^18.11.17",
|
||||
"eslint": "^8.30.0",
|
||||
"eslint-config-next": "12.3.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
@@ -25,5 +28,30 @@
|
||||
"prettier": "^2.7.1",
|
||||
"ts-jest": "^29.0.3",
|
||||
"typescript": "^4.9.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:prettier/recommended"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"./tsconfig.json"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"prettier/prettier": "warn"
|
||||
},
|
||||
"reportUnusedDisableDirectives": true,
|
||||
"ignorePatterns": [
|
||||
"src/**/*.test.ts",
|
||||
"package/**/dist/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
// https://eslint.org/docs/latest/user-guide/configuring
|
||||
// "off" or 0 - turn the rule off
|
||||
// "warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
|
||||
// "error" or 2 - turn the rule on as an error (exit code will be 1)
|
||||
|
||||
/** @type { import('eslint').Linter.Config } */
|
||||
module.exports = {
|
||||
extends: [
|
||||
'next/core-web-vitals',
|
||||
'plugin:@next/next/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
// 'next/babel',
|
||||
],
|
||||
rules: {
|
||||
'prettier/prettier': 'warn',
|
||||
},
|
||||
|
||||
reportUnusedDisableDirectives: true,
|
||||
};
|
||||
@@ -48,5 +48,15 @@
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"typescript": "4.8.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"next/core-web-vitals",
|
||||
"plugin:@next/next/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"prettier/prettier": "warn"
|
||||
},
|
||||
"reportUnusedDisableDirectives": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ const DynamicBlocksuite = ({
|
||||
p => p instanceof IndexedDBDocProvider
|
||||
);
|
||||
if (indexDBProvider) {
|
||||
(indexDBProvider as IndexedDBDocProvider)?.on('synced', async () => {
|
||||
(indexDBProvider as IndexedDBDocProvider).on('synced', async () => {
|
||||
const updates = await downloadWorkspace({ workspaceId });
|
||||
|
||||
if (updates && updates.byteLength) {
|
||||
|
||||
Generated
+3869
-1197
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"experimentalDecorators": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user