chore: eslint config

This commit is contained in:
DarkSky
2022-12-22 11:29:23 +08:00
committed by DarkSky
parent c9e4fdf317
commit b4b8a25742
8 changed files with 3937 additions and 1235 deletions
-19
View File
@@ -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 (doesnt 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,
};
+10
View File
@@ -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) {