mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@smarttools/eslint-plugin-rxjs](https://redirect.github.com/DaveMBush/eslint-plugin-rxjs) | [`1.0.9` -> `1.0.10`](https://renovatebot.com/diffs/npm/@smarttools%2feslint-plugin-rxjs/1.0.9/1.0.10) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@swc/core](https://swc.rs) ([source](https://redirect.github.com/swc-project/swc)) | [`1.10.3` -> `1.10.4`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.10.3/1.10.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | @​types/dompurify | [`3.0.5` -> `3.2.0`](https://renovatebot.com/diffs/npm/@types%2fdompurify/3.0.5/3.2.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [Lakr233/MSDisplayLink](https://redirect.github.com/Lakr233/MSDisplayLink) | `from: "1.1.0"` -> `from: "1.1.1"` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | patch | | [Lakr233/SpringInterpolation](https://redirect.github.com/Lakr233/SpringInterpolation) | `from: "1.1.0"` -> `from: "1.3.0"` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [katex](https://katex.org) ([source](https://redirect.github.com/KaTeX/KaTeX)) | [`0.16.18` -> `0.16.19`](https://renovatebot.com/diffs/npm/katex/0.16.18/0.16.19) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [lint-staged](https://redirect.github.com/lint-staged/lint-staged) | [`15.2.11` -> `15.3.0`](https://renovatebot.com/diffs/npm/lint-staged/15.2.11/15.3.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [react-day-picker](https://daypicker.dev) ([source](https://redirect.github.com/gpbl/react-day-picker)) | [`9.4.4` -> `9.5.0`](https://renovatebot.com/diffs/npm/react-day-picker/9.4.4/9.5.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [react-i18next](https://redirect.github.com/i18next/react-i18next) | [`15.2.0` -> `15.3.0`](https://renovatebot.com/diffs/npm/react-i18next/15.2.0/15.3.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [swr](https://swr.vercel.app) ([source](https://redirect.github.com/vercel/swr)) | [`2.2.5` -> `2.3.0`](https://renovatebot.com/diffs/npm/swr/2.2.5/2.3.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [vite](https://vite.dev) ([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite)) | [`6.0.5` -> `6.0.6`](https://renovatebot.com/diffs/npm/vite/6.0.5/6.0.6) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | resolutions | patch | | [yarn](https://redirect.github.com/yarnpkg/berry) ([source](https://redirect.github.com/yarnpkg/berry/tree/HEAD/packages/yarnpkg-cli)) | [`4.5.3` -> `4.6.0`](https://renovatebot.com/diffs/npm/yarn/4.5.3/4.6.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | packageManager | minor | | [yjs](https://docs.yjs.dev) ([source](https://redirect.github.com/yjs/yjs)) | [`13.6.18` -> `13.6.21`](https://renovatebot.com/diffs/npm/yjs/13.6.18/13.6.21) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | --- ### Release Notes <details> <summary>DaveMBush/eslint-plugin-rxjs (@​smarttools/eslint-plugin-rxjs)</summary> ### [`v1.0.10`](https://redirect.github.com/DaveMBush/eslint-plugin-rxjs/releases/tag/v1.0.10): 1.0.10 (2024-12-28) [Compare Source](https://redirect.github.com/DaveMBush/eslint-plugin-rxjs/compare/v1.0.9...v1.0.10) supplies type information by placing index.d.ts file next to index.cjs file </details> <details> <summary>swc-project/swc (@​swc/core)</summary> ### [`v1.10.4`](https://redirect.github.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1104---2024-12-30) [Compare Source](https://redirect.github.com/swc-project/swc/compare/v1.10.3...v1.10.4) ##### Bug Fixes - **(deps)** Update cargo (patch) ([#​9733](https://redirect.github.com/swc-project/swc/issues/9733)) ([fb2f6e4](fb2f6e44aa)) - Remove `Caused by: 'failed to parse'` from TS blank space ([#​9820](https://redirect.github.com/swc-project/swc/issues/9820)) ([aaeb0ab](aaeb0ab3b3)) </details> <details> <summary>Lakr233/MSDisplayLink (Lakr233/MSDisplayLink)</summary> ### [`v1.1.1`](https://redirect.github.com/Lakr233/MSDisplayLink/compare/1.1.0...1.1.1) [Compare Source](https://redirect.github.com/Lakr233/MSDisplayLink/compare/1.1.0...1.1.1) </details> <details> <summary>Lakr233/SpringInterpolation (Lakr233/SpringInterpolation)</summary> ### [`v1.3.0`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.2...1.3.0) [Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.2...1.3.0) ### [`v1.2.2`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.1...1.2.2) [Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.1...1.2.2) ### [`v1.2.1`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.0...1.2.1) [Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.2.0...1.2.1) ### [`v1.2.0`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.2...1.2.0) [Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.2...1.2.0) ### [`v1.1.2`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.1...1.1.2) [Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.1...1.1.2) ### [`v1.1.1`](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.0...1.1.1) [Compare Source](https://redirect.github.com/Lakr233/SpringInterpolation/compare/1.1.0...1.1.1) </details> <details> <summary>KaTeX/KaTeX (katex)</summary> ### [`v0.16.19`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#01619-2024-12-29) [Compare Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.18...v0.16.19) ##### Bug Fixes - **types:** improve `strict` function type ([#​4009](https://redirect.github.com/KaTeX/KaTeX/issues/4009)) ([4228b4e](4228b4eb52)) </details> <details> <summary>lint-staged/lint-staged (lint-staged)</summary> ### [`v15.3.0`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1530) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.2.11...v15.3.0) ##### Minor Changes - [#​1495](https://redirect.github.com/lint-staged/lint-staged/pull/1495) [`e69da9e`](e69da9e614) Thanks [@​iiroj](https://redirect.github.com/iiroj)! - Added more info to the debug logs so that "environment" info doesn't need to be added separately to GitHub issues. - [#​1493](https://redirect.github.com/lint-staged/lint-staged/pull/1493) [`fa0fe98`](fa0fe98104) Thanks [@​iiroj](https://redirect.github.com/iiroj)! - Added more help messages around the automatic `git stash` that *lint-staged* creates as a backup (by default). The console output also displays the short git *hash* of the stash so that it's easier to recover lost files in case some fatal errors are encountered, or the process is killed before completing. For example: % npx lint-staged ✔ Backed up original state in git stash (20addf8) ✔ Running tasks for staged files... ✔ Applying modifications from tasks... ✔ Cleaning up temporary files... where the backup can be seen with `git show 20addf8`, or `git stash list`: % git stash list stash@{0}: lint-staged automatic backup (20addf8) </details> <details> <summary>gpbl/react-day-picker (react-day-picker)</summary> ### [`v9.5.0`](https://redirect.github.com/gpbl/react-day-picker/compare/v9.4.4...a06052e71bf199402e15c5aee7805e2be2dd4498) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.4.4...v9.5.0) </details> <details> <summary>i18next/react-i18next (react-i18next)</summary> ### [`v15.3.0`](https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1530) [Compare Source](https://redirect.github.com/i18next/react-i18next/compare/v15.2.0...v15.3.0) Uses the i18next logger instead of the default console logger, if there is a valid i18next instance. Now the debug i18next option is respected, and you can also inject your own logger module: https://www.i18next.com/misc/creating-own-plugins#logger </details> <details> <summary>vercel/swr (swr)</summary> ### [`v2.3.0`](https://redirect.github.com/vercel/swr/compare/v2.2.5...v2.3.0) [Compare Source](https://redirect.github.com/vercel/swr/compare/v2.2.5...v2.3.0) </details> <details> <summary>vitejs/vite (vite)</summary> ### [`v6.0.6`](https://redirect.github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small606-2024-12-26-small) [Compare Source](https://redirect.github.com/vitejs/vite/compare/v6.0.5...v6.0.6) - fix: replace runner-side path normalization with `fetchModule`-side resolve ([#​18361](https://redirect.github.com/vitejs/vite/issues/18361)) ([9f10261](9f10261e76)), closes [#​18361](https://redirect.github.com/vitejs/vite/issues/18361) - fix(css): resolve style tags in HTML files correctly for lightningcss ([#​19001](https://redirect.github.com/vitejs/vite/issues/19001)) ([afff05c](afff05c032)), closes [#​19001](https://redirect.github.com/vitejs/vite/issues/19001) - fix(css): show correct error when unknown placeholder is used for CSS modules pattern in lightningcs ([9290d85](9290d85b5d)), closes [#​19070](https://redirect.github.com/vitejs/vite/issues/19070) - fix(resolve): handle package.json with UTF-8 BOM ([#​19000](https://redirect.github.com/vitejs/vite/issues/19000)) ([902567a](902567ac53)), closes [#​19000](https://redirect.github.com/vitejs/vite/issues/19000) - fix(ssrTransform): preserve line offset when transforming imports ([#​19004](https://redirect.github.com/vitejs/vite/issues/19004)) ([1aa434e](1aa434e801)), closes [#​19004](https://redirect.github.com/vitejs/vite/issues/19004) - chore: fix typo in comment ([#​19067](https://redirect.github.com/vitejs/vite/issues/19067)) ([eb06ec3](eb06ec30bb)), closes [#​19067](https://redirect.github.com/vitejs/vite/issues/19067) - chore: update comment about `build.target` ([#​19047](https://redirect.github.com/vitejs/vite/issues/19047)) ([0e9e81f](0e9e81f622)), closes [#​19047](https://redirect.github.com/vitejs/vite/issues/19047) - revert: unpin esbuild version ([#​19043](https://redirect.github.com/vitejs/vite/issues/19043)) ([8bfe247](8bfe247511)), closes [#​19043](https://redirect.github.com/vitejs/vite/issues/19043) - test(ssr): test virtual module with query ([#​19044](https://redirect.github.com/vitejs/vite/issues/19044)) ([a1f4b46](a1f4b46896)), closes [#​19044](https://redirect.github.com/vitejs/vite/issues/19044) </details> <details> <summary>yarnpkg/berry (yarn)</summary> ### [`v4.6.0`](2fe7d635e8...1871484db8) [Compare Source](2fe7d635e8...1871484db8) </details> <details> <summary>yjs/yjs (yjs)</summary> ### [`v13.6.21`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.21) [Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.20...v13.6.21) - fix [#​657](https://redirect.github.com/yjs/yjs/issues/657) - relative positions issue when using followUndoneDeletions=false [`f583d2a`](https://redirect.github.com/yjs/yjs/commit/f583d2a2) - lint [`1b0f2e5`](https://redirect.github.com/yjs/yjs/commit/1b0f2e54) - add nodejs specific tests [`4404d09`](https://redirect.github.com/yjs/yjs/commit/4404d090) - Merge pull request [#​679](https://redirect.github.com/yjs/yjs/issues/679) from hoangqwe159/main [`d4d4ae5`](https://redirect.github.com/yjs/yjs/commit/d4d4ae5f) - Add PSPDFKit binding to README.md [`4ffd370`](https://redirect.github.com/yjs/yjs/commit/4ffd3709) - Merge pull request [#​676](https://redirect.github.com/yjs/yjs/issues/676) from himself65/patch-1 [`0419b74`](https://redirect.github.com/yjs/yjs/commit/0419b743) - add Open Collaboration Tools as a user [`c951f2b`](https://redirect.github.com/yjs/yjs/commit/c951f2b7) - docs: remove `@toeverything/y-indexeddb` [`4e2d3c8`](https://redirect.github.com/yjs/yjs/commit/4e2d3c8a) - update readme [`8dc1296`](https://redirect.github.com/yjs/yjs/commit/8dc1296a) - add stars to providers that sponsor yjs [`4329997`](https://redirect.github.com/yjs/yjs/commit/43299973) - Merge pull request [#​671](https://redirect.github.com/yjs/yjs/issues/671) from carlossantos74/main [`2b7ea8a`](https://redirect.github.com/yjs/yjs/commit/2b7ea8a2) - add SuperViz Provider in yjs README [`4f47355`](https://redirect.github.com/yjs/yjs/commit/4f473558) - \[funding.json] fix some validation issues [`6074f80`](https://redirect.github.com/yjs/yjs/commit/6074f802) - fix errors in funding.json [`42bbb44`](https://redirect.github.com/yjs/yjs/commit/42bbb44b) - add funding.json [`cc2d732`](https://redirect.github.com/yjs/yjs/commit/cc2d7320) - add y-crdt elexir bindings [`e804dd7`](https://redirect.github.com/yjs/yjs/commit/e804dd75) ### [`v13.6.20`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.20) [Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.19...v13.6.20) - lint [`487465d`](https://redirect.github.com/yjs/yjs/commit/487465d7) - add yjs-inspector [`345fd31`](https://redirect.github.com/yjs/yjs/commit/345fd31b) - add devtools [`4ff65b5`](https://redirect.github.com/yjs/yjs/commit/4ff65b5d) - \[[#​667](https://redirect.github.com/yjs/yjs/issues/667)] sanity checks for Yjs caveats. In dev_mode, objects inserted into Yjs can't be manipulated. [`8152cf8`](https://redirect.github.com/yjs/yjs/commit/8152cf81) - [#​667](https://redirect.github.com/yjs/yjs/issues/667) - add sanity messages when data is read before type is added to a document. [`3bf44b9`](https://redirect.github.com/yjs/yjs/commit/3bf44b98) - Y.Array.length should be 0 before it is integrated - [#​666](https://redirect.github.com/yjs/yjs/issues/666) [`8cd1a48`](https://redirect.github.com/yjs/yjs/commit/8cd1a482) - Merge pull request [#​665](https://redirect.github.com/yjs/yjs/issues/665) from batchor/main [`9e9f294`](https://redirect.github.com/yjs/yjs/commit/9e9f2940) - add ScienHub as a user. [`4fb7789`](https://redirect.github.com/yjs/yjs/commit/4fb7789c) - add ScienHub as a user. [`c1ef9a1`](https://redirect.github.com/yjs/yjs/commit/c1ef9a12) ### [`v13.6.19`](https://redirect.github.com/yjs/yjs/releases/tag/v13.6.19) [Compare Source](https://redirect.github.com/yjs/yjs/compare/v13.6.18...v13.6.19) - add `ydoc.isDestroyed` property [`f604250`](https://redirect.github.com/yjs/yjs/commit/f604250f) - add eclipse theia as a user [`7422b18`](https://redirect.github.com/yjs/yjs/commit/7422b18e) - add secsync [`95e2bc4`](https://redirect.github.com/yjs/yjs/commit/95e2bc44) - add kanbert as a user [`f2ff8b9`](https://redirect.github.com/yjs/yjs/commit/f2ff8b95) - Merge pull request [#​664](https://redirect.github.com/yjs/yjs/issues/664) from jul13579/add-qdacity-to-readme [`3f9bfe4`](https://redirect.github.com/yjs/yjs/commit/3f9bfe42) - Add QDAcity to `README.md` [`5b4d2a6`](https://redirect.github.com/yjs/yjs/commit/5b4d2a6b) - fix new lint issues [`44e5108`](https://redirect.github.com/yjs/yjs/commit/44e51080) - update markdownlint [`dd17228`](https://redirect.github.com/yjs/yjs/commit/dd17228a) - lint readme [`eeb4c99`](https://redirect.github.com/yjs/yjs/commit/eeb4c996) - Merge pull request [#​660](https://redirect.github.com/yjs/yjs/issues/660) from mtreinik/main [`56d5e32`](https://redirect.github.com/yjs/yjs/commit/56d5e328) - Remove erroneous ymap.get(index:number) from API docs [`294c6a1`](https://redirect.github.com/yjs/yjs/commit/294c6a15) - Add Y.Array.from() and yarray.clone() to API docs [`c944a45`](https://redirect.github.com/yjs/yjs/commit/c944a455) - update users [`f29cd2b`](https://redirect.github.com/yjs/yjs/commit/f29cd2ba) - Merge pull request [#​651](https://redirect.github.com/yjs/yjs/issues/651) from nikgraf/patch-2 [`384ec4d`](https://redirect.github.com/yjs/yjs/commit/384ec4db) - add react-yjs to bindings [`5e19c35`](https://redirect.github.com/yjs/yjs/commit/5e19c354) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuODUuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
294 lines
9.1 KiB
JavaScript
294 lines
9.1 KiB
JavaScript
import { readFileSync } from 'node:fs';
|
|
import { createRequire } from 'node:module';
|
|
|
|
import eslint from '@eslint/js';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
import importX from 'eslint-plugin-import-x';
|
|
import react from 'eslint-plugin-react';
|
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
import sonarjs from 'eslint-plugin-sonarjs';
|
|
import unicorn from 'eslint-plugin-unicorn';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
const __require = createRequire(import.meta.url);
|
|
|
|
const rxjs = __require('@smarttools/eslint-plugin-rxjs').default;
|
|
|
|
const ignoreList = readFileSync('.prettierignore', 'utf-8')
|
|
.split('\n')
|
|
.filter(line => line.trim() && !line.startsWith('#'));
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: ignoreList,
|
|
},
|
|
{
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
ecmaVersion: 'latest',
|
|
parserOptions: {
|
|
project: './tsconfig.eslint.json',
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
plugins: {
|
|
'@typescript-eslint': tseslint.plugin,
|
|
react,
|
|
'react-hooks': reactHooks,
|
|
sonarjs,
|
|
'import-x': importX,
|
|
'simple-import-sort': simpleImportSort,
|
|
rxjs,
|
|
unicorn,
|
|
},
|
|
rules: {
|
|
...eslint.configs.recommended.rules,
|
|
...react.configs.recommended.rules,
|
|
...react.configs['jsx-runtime'].rules,
|
|
...reactHooks.configs.recommended.rules,
|
|
// covered by TypeScript
|
|
'no-dupe-args': 'off',
|
|
// the following rules are disabled because they are covered by oxlint
|
|
'array-callback-return': 'off',
|
|
'constructor-super': 'off',
|
|
eqeqeq: 'off',
|
|
'getter-return': 'off',
|
|
'for-direction': 'off',
|
|
'require-yield': 'off',
|
|
'use-isnan': 'off',
|
|
'valid-typeof': 'off',
|
|
'no-self-compare': 'off',
|
|
'no-empty': 'off',
|
|
'no-constant-binary-expression': 'off',
|
|
'no-constructor-return': 'off',
|
|
'no-func-assign': 'off',
|
|
'no-global-assign': 'off',
|
|
'no-ex-assign': 'off',
|
|
'no-fallthrough': 'off',
|
|
'no-irregular-whitespace': 'off',
|
|
'no-control-regex': 'off',
|
|
'no-with': 'off',
|
|
'no-debugger': 'off',
|
|
'no-const-assign': 'off',
|
|
'no-import-assign': 'off',
|
|
'no-setter-return': 'off',
|
|
'no-obj-calls': 'off',
|
|
'no-unsafe-negation': 'off',
|
|
'no-dupe-class-members': 'off',
|
|
'no-dupe-keys': 'off',
|
|
'no-this-before-super': 'off',
|
|
'no-empty-character-class': 'off',
|
|
'no-useless-catch': 'off',
|
|
'no-async-promise-executor': 'off',
|
|
'no-unreachable': 'off',
|
|
'no-duplicate-case': 'off',
|
|
'no-empty-pattern': 'off',
|
|
'no-unused-labels': 'off',
|
|
'no-sparse-arrays': 'off',
|
|
'no-delete-var': 'off',
|
|
'no-compare-neg-zero': 'off',
|
|
'no-redeclare': 'off',
|
|
'no-case-declarations': 'off',
|
|
'no-class-assign': 'off',
|
|
'no-var': 'off',
|
|
'no-self-assign': 'off',
|
|
'no-inner-declarations': 'off',
|
|
'no-dupe-else-if': 'off',
|
|
'no-invalid-regexp': 'off',
|
|
'no-unsafe-finally': 'off',
|
|
'no-prototype-builtins': 'off',
|
|
'no-shadow-restricted-names': 'off',
|
|
'no-nonoctal-decimal-escape': 'off',
|
|
'no-constant-condition': 'off',
|
|
'no-useless-escape': 'off',
|
|
'no-unsafe-optional-chaining': 'off',
|
|
'no-extra-boolean-cast': 'off',
|
|
'no-regex-spaces': 'off',
|
|
'no-unused-vars': 'off',
|
|
'no-undef': 'off',
|
|
'no-cond-assign': 'off',
|
|
'react/jsx-no-useless-fragment': 'off',
|
|
'react/no-unknown-property': 'off',
|
|
'react/no-string-refs': 'off',
|
|
'react/no-direct-mutation-state': 'off',
|
|
'react/require-render-return': 'off',
|
|
'react/jsx-no-undef': 'off',
|
|
'react/jsx-no-duplicate-props': 'off',
|
|
'react/jsx-key': 'off',
|
|
'react/no-danger-with-children': 'off',
|
|
'react/no-unescaped-entities': 'off',
|
|
'react/no-is-mounted': 'off',
|
|
'react/no-find-dom-node': 'off',
|
|
'react/no-children-prop': 'off',
|
|
'react/no-render-return-value': 'off',
|
|
'react/jsx-no-target-blank': 'off',
|
|
'react/jsx-no-comment-textnodes': 'off',
|
|
'react/prop-types': 'off',
|
|
'sonarjs/no-useless-catch': 'off',
|
|
'@typescript-eslint/consistent-type-imports': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
'@typescript-eslint/no-loss-of-precision': 'off',
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
'@typescript-eslint/triple-slash-reference': 'off',
|
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
|
'@typescript-eslint/no-duplicate-enum-values': 'off',
|
|
'@typescript-eslint/no-extra-non-null-assertion': 'off',
|
|
'@typescript-eslint/no-misused-new': 'off',
|
|
'@typescript-eslint/prefer-for-of': 'error',
|
|
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
'@typescript-eslint/no-this-alias': 'off',
|
|
'@typescript-eslint/prefer-as-const': 'off',
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
'@typescript-eslint/no-namespace': 'off',
|
|
'@typescript-eslint/no-unnecessary-type-constraint': 'off',
|
|
'@typescript-eslint/no-array-constructor': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
|
|
// rules that are not supported by oxlint
|
|
'@typescript-eslint/no-unsafe-function-type': 'error',
|
|
'@typescript-eslint/no-wrapper-object-types': 'error',
|
|
'@typescript-eslint/unified-signatures': 'error',
|
|
'@typescript-eslint/no-restricted-imports': [
|
|
'error',
|
|
{
|
|
patterns: [
|
|
{
|
|
group: ['**/dist'],
|
|
message: "Don't import from dist",
|
|
allowTypeImports: false,
|
|
},
|
|
{
|
|
group: ['**/src'],
|
|
message: "Don't import from src",
|
|
allowTypeImports: false,
|
|
},
|
|
{
|
|
group: ['@blocksuite/store'],
|
|
message: "Import from '@blocksuite/global/utils'",
|
|
importNames: ['assertExists', 'assertEquals'],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
'sonarjs/no-all-duplicated-branches': 'error',
|
|
'sonarjs/no-element-overwrite': 'error',
|
|
'sonarjs/no-empty-collection': 'error',
|
|
'sonarjs/no-extra-arguments': 'error',
|
|
'sonarjs/no-identical-conditions': 'error',
|
|
'sonarjs/no-identical-expressions': 'error',
|
|
'sonarjs/no-ignored-return': 'error',
|
|
'sonarjs/no-one-iteration-loop': 'error',
|
|
'sonarjs/no-use-of-empty-return-value': 'error',
|
|
'sonarjs/non-existent-operator': 'error',
|
|
'sonarjs/no-collapsible-if': 'error',
|
|
'sonarjs/no-same-line-conditional': 'error',
|
|
'sonarjs/no-duplicated-branches': 'error',
|
|
'sonarjs/no-collection-size-mischeck': 'error',
|
|
'sonarjs/no-identical-functions': 'error',
|
|
'sonarjs/no-gratuitous-expressions': 'error',
|
|
|
|
'simple-import-sort/imports': 'error',
|
|
'simple-import-sort/exports': 'error',
|
|
},
|
|
},
|
|
{
|
|
files: [
|
|
'packages/**/*.{ts,tsx}',
|
|
'tools/**/*.{ts,tsx}',
|
|
'blocksuite/**/*.{ts,tsx}',
|
|
],
|
|
rules: {
|
|
'@typescript-eslint/no-floating-promises': [
|
|
'error',
|
|
{
|
|
ignoreVoid: false,
|
|
ignoreIIFE: false,
|
|
},
|
|
],
|
|
'@typescript-eslint/await-thenable': 'error',
|
|
'@typescript-eslint/require-array-sort-compare': 'error',
|
|
'@typescript-eslint/no-misused-promises': ['error'],
|
|
'@typescript-eslint/prefer-readonly': 'error',
|
|
'import-x/no-extraneous-dependencies': ['error'],
|
|
'react-hooks/exhaustive-deps': [
|
|
'warn',
|
|
{
|
|
additionalHooks:
|
|
'(useAsyncCallback|useCatchEventCallback|useDraggable|useDropTarget|useRefEffect)',
|
|
},
|
|
],
|
|
'rxjs/finnish': [
|
|
'error',
|
|
{
|
|
functions: false,
|
|
methods: false,
|
|
strict: true,
|
|
|
|
types: {
|
|
'^LiveData$': true,
|
|
'^Doc$': false,
|
|
'^Awareness$': false,
|
|
'^UndoManager$': false,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
files: [
|
|
'**/__tests__/**/*',
|
|
'**/*.stories.tsx',
|
|
'**/*.spec.ts',
|
|
'**/tests/**/*',
|
|
'scripts/**/*',
|
|
'**/benchmark/**/*',
|
|
'**/__debug__/**/*',
|
|
'**/e2e/**/*',
|
|
],
|
|
rules: {
|
|
'@typescript-eslint/no-floating-promises': 0,
|
|
'@typescript-eslint/no-misused-promises': 0,
|
|
'@typescript-eslint/no-restricted-imports': 0,
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.{ts,js,mjs}'],
|
|
rules: {
|
|
'react-hooks/rules-of-hooks': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['packages/frontend/apps/electron/scripts/**/*'],
|
|
rules: {
|
|
'import-x/no-extraneous-dependencies': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['blocksuite/**/*.{ts,tsx}'],
|
|
rules: {
|
|
'rxjs/finnish': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: [
|
|
'blocksuite/tests-legacy/**/*.{ts,tsx}',
|
|
'blocksuite/**/__tests__/**/*.{ts,tsx}',
|
|
],
|
|
rules: {
|
|
'import-x/no-extraneous-dependencies': 'off',
|
|
},
|
|
},
|
|
eslintConfigPrettier
|
|
);
|