From 2a150840a344d5bb0c6c8daa682284ace7d8adc7 Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Sun, 9 Jun 2024 17:39:30 +0800 Subject: [PATCH] chore: add .vscode/settings.json --- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 2 +- .gitignore | 2 -- .vscode/settings.json | 3 +++ eslint.config.js | 1 + package.json | 2 +- src/editors/extensions/blockquote.ts | 2 +- src/editors/extensions/bold.ts | 1 + src/editors/extensions/horizontalRule.ts | 1 + src/editors/extensions/link/index.ts | 1 + 10 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 587a1e0b..b2b78332 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v2.1.4 with: - node-version: '18.18' + node-version: '18.19' registry-url: 'https://registry.npmjs.org' always-auth: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c190c577..71b1ed81 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v2.1.4 with: - node-version: '18.18' + node-version: '18.19' registry-url: 'https://registry.npmjs.org' always-auth: true diff --git a/.gitignore b/.gitignore index 0c740f0b..a2317d54 100644 --- a/.gitignore +++ b/.gitignore @@ -13,8 +13,6 @@ dist-ssr *.local # Editor directories and files -.vscode/* -!.vscode/extensions.json .idea .DS_Store *.suo diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..eb8204b6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "eslint.experimental.useFlatConfig": true +} diff --git a/eslint.config.js b/eslint.config.js index 44cbb43e..eb1c68e3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -9,6 +9,7 @@ export default tseslint.config( eslint.configs.recommended, ...tseslint.configs.recommended, { + files: ['src/**/*.{ts,tsx}'], languageOptions: { globals: { ...globals.browser, diff --git a/package.json b/package.json index c57bbc68..14513d7f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "url": "git@github.com:thematters/matters-editor.git" }, "engines": { - "node": ">=18.18 <19.0" + "node": ">=18.19 <19.0" }, "license": "MIT", "type": "module", diff --git a/src/editors/extensions/blockquote.ts b/src/editors/extensions/blockquote.ts index c42efa2c..4b49d1a1 100644 --- a/src/editors/extensions/blockquote.ts +++ b/src/editors/extensions/blockquote.ts @@ -106,7 +106,7 @@ export const Blockquote = Node.create({ return [ new Plugin({ key: new PluginKey('restrictBlockquoteMarks'), - filterTransaction: (transaction, state) => { + filterTransaction: (transaction) => { // Nothing has changed, ignore it. if (!transaction.docChanged) { return true diff --git a/src/editors/extensions/bold.ts b/src/editors/extensions/bold.ts index ce1327f4..ff2ef071 100644 --- a/src/editors/extensions/bold.ts +++ b/src/editors/extensions/bold.ts @@ -16,6 +16,7 @@ import { */ export interface BoldOptions { + // eslint-disable-next-line @typescript-eslint/no-explicit-any HTMLAttributes: Record } diff --git a/src/editors/extensions/horizontalRule.ts b/src/editors/extensions/horizontalRule.ts index b07a3a27..15a54955 100644 --- a/src/editors/extensions/horizontalRule.ts +++ b/src/editors/extensions/horizontalRule.ts @@ -1,6 +1,7 @@ import { mergeAttributes, Node, nodeInputRule } from '@tiptap/core' export interface HorizontalRuleOptions { + // eslint-disable-next-line @typescript-eslint/no-explicit-any HTMLAttributes: Record } diff --git a/src/editors/extensions/link/index.ts b/src/editors/extensions/link/index.ts index a51a5d56..9e10815b 100644 --- a/src/editors/extensions/link/index.ts +++ b/src/editors/extensions/link/index.ts @@ -41,6 +41,7 @@ export interface LinkOptions { /** * A list of HTML attributes to be rendered. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any HTMLAttributes: Record /** * A validation function that modifies link verification for the auto linker.