Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: use prettier for linting #5796

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .changeset/big-wolves-design.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/extension-placeholder": major
'@tiptap/extension-placeholder': major
---

Officially remove the `considerAnyAsEmpty` which has not been used since version 2.5
2 changes: 1 addition & 1 deletion .changeset/chatty-monkeys-hear.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/extension-list-keymap": patch
'@tiptap/extension-list-keymap': patch
---

Fix backspace behavior when selection is not collapsed
2 changes: 1 addition & 1 deletion .changeset/chatty-pianos-learn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/core": patch
'@tiptap/core': patch
---

preserve existing node attributes when running setNode
110 changes: 55 additions & 55 deletions .changeset/chilled-trees-agree.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
---
"@tiptap/extension-collaboration-cursor": major
"@tiptap/extension-code-block-lowlight": major
"@tiptap/extension-character-count": major
"@tiptap/extension-horizontal-rule": major
"@tiptap/extension-collaboration": major
"@tiptap/extension-floating-menu": major
"@tiptap/extension-ordered-list": major
"@tiptap/extension-table-header": major
"@tiptap/extension-bubble-menu": major
"@tiptap/extension-bullet-list": major
"@tiptap/extension-font-family": major
"@tiptap/extension-list-keymap": major
"@tiptap/extension-placeholder": major
"@tiptap/extension-superscript": major
"@tiptap/extension-blockquote": major
"@tiptap/extension-code-block": major
"@tiptap/extension-dropcursor": major
"@tiptap/extension-hard-break": major
"@tiptap/extension-table-cell": major
"@tiptap/extension-text-align": major
"@tiptap/extension-text-style": major
"@tiptap/extension-typography": major
"@tiptap/extension-gapcursor": major
"@tiptap/extension-highlight": major
"@tiptap/extension-list-item": major
"@tiptap/extension-paragraph": major
"@tiptap/extension-subscript": major
"@tiptap/extension-table-row": major
"@tiptap/extension-task-item": major
"@tiptap/extension-task-list": major
"@tiptap/extension-underline": major
"@tiptap/extension-document": major
"@tiptap/extension-heading": major
"@tiptap/extension-history": major
"@tiptap/extension-mention": major
"@tiptap/extension-youtube": major
"@tiptap/extension-italic": major
"@tiptap/extension-strike": major
"@tiptap/extension-color": major
"@tiptap/extension-focus": major
"@tiptap/extension-image": major
"@tiptap/extension-table": major
"@tiptap/extension-bold": major
"@tiptap/extension-code": major
"@tiptap/extension-link": major
"@tiptap/extension-text": major
"@tiptap/starter-kit": major
"@tiptap/suggestion": major
"@tiptap/react": major
"@tiptap/vue-2": major
"@tiptap/vue-3": major
"@tiptap/core": major
"@tiptap/html": major
"@tiptap/pm": major
"tiptap-demos": major
'@tiptap/extension-collaboration-cursor': major
'@tiptap/extension-code-block-lowlight': major
'@tiptap/extension-character-count': major
'@tiptap/extension-horizontal-rule': major
'@tiptap/extension-collaboration': major
'@tiptap/extension-floating-menu': major
'@tiptap/extension-ordered-list': major
'@tiptap/extension-table-header': major
'@tiptap/extension-bubble-menu': major
'@tiptap/extension-bullet-list': major
'@tiptap/extension-font-family': major
'@tiptap/extension-list-keymap': major
'@tiptap/extension-placeholder': major
'@tiptap/extension-superscript': major
'@tiptap/extension-blockquote': major
'@tiptap/extension-code-block': major
'@tiptap/extension-dropcursor': major
'@tiptap/extension-hard-break': major
'@tiptap/extension-table-cell': major
'@tiptap/extension-text-align': major
'@tiptap/extension-text-style': major
'@tiptap/extension-typography': major
'@tiptap/extension-gapcursor': major
'@tiptap/extension-highlight': major
'@tiptap/extension-list-item': major
'@tiptap/extension-paragraph': major
'@tiptap/extension-subscript': major
'@tiptap/extension-table-row': major
'@tiptap/extension-task-item': major
'@tiptap/extension-task-list': major
'@tiptap/extension-underline': major
'@tiptap/extension-document': major
'@tiptap/extension-heading': major
'@tiptap/extension-history': major
'@tiptap/extension-mention': major
'@tiptap/extension-youtube': major
'@tiptap/extension-italic': major
'@tiptap/extension-strike': major
'@tiptap/extension-color': major
'@tiptap/extension-focus': major
'@tiptap/extension-image': major
'@tiptap/extension-table': major
'@tiptap/extension-bold': major
'@tiptap/extension-code': major
'@tiptap/extension-link': major
'@tiptap/extension-text': major
'@tiptap/starter-kit': major
'@tiptap/suggestion': major
'@tiptap/react': major
'@tiptap/vue-2': major
'@tiptap/vue-3': major
'@tiptap/core': major
'@tiptap/html': major
'@tiptap/pm': major
'tiptap-demos': major
---

We are now building packages with tsup which does not support UMD builds, please repackage if you require UMD builds
14 changes: 7 additions & 7 deletions .changeset/dirty-bats-look.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
"@tiptap/extension-floating-menu": major
"@tiptap/extension-bubble-menu": major
"@tiptap/extension-mention": major
"@tiptap/suggestion": major
"@tiptap/react": major
"@tiptap/vue-2": major
"@tiptap/vue-3": major
'@tiptap/extension-floating-menu': major
'@tiptap/extension-bubble-menu': major
'@tiptap/extension-mention': major
'@tiptap/suggestion': major
'@tiptap/react': major
'@tiptap/vue-2': major
'@tiptap/vue-3': major
---

Removed tippy.js and replaced it with [Floating UI](https://floating-ui.com/) - a newer, more lightweight and customizable floating element library.
Expand Down
2 changes: 1 addition & 1 deletion .changeset/five-flowers-eat.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/vue-3": patch
'@tiptap/vue-3': patch
---

Fix editor destruction before transition end if editor is nested
2 changes: 1 addition & 1 deletion .changeset/five-mice-turn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/extension-bubble-menu": patch
'@tiptap/extension-bubble-menu': patch
---

Add `element: HTMLElement` to `shouldShow` options within the BubbleMenu options.
2 changes: 1 addition & 1 deletion .changeset/fresh-coats-relate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/core": minor
'@tiptap/core': minor
---

Previously, only a json representation of the node could be inserted into the editor. This change allows for the insertion of Prosemirror `Node`s and `Fragment`s directly into the editor through the `insertContentAt`, `setContent` and `insertContent` commands.
2 changes: 1 addition & 1 deletion .changeset/funny-otters-protect.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/core": patch
'@tiptap/core': patch
---

Addresses a bug with `insertContentAt`'s `simulatedPasteRules` option where it could only accept text and not Prosemirror `Node` and `Content`
4 changes: 2 additions & 2 deletions .changeset/green-wolves-arrive.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
"@tiptap/core": major
'@tiptap/core': major
---

Fix `getPos` type in `NodeViewRendererProps` to potentially be `undefined`

Breaking change: Types may flag uses of getPos where an `undefined` possibility isn't handled.
Why this change was made: To ensure the type reflects the real functionality of this function.
How to update: Ensure that the return value of `getPos` exists before making use of the value.
How to update: Ensure that the return value of `getPos` exists before making use of the value.
2 changes: 1 addition & 1 deletion .changeset/happy-vans-smash.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/core": patch
'@tiptap/core': patch
---

Updates the types of `addOptions` and `addStorage` to have the parent be possibly undefined which is the most accurate typing
2 changes: 1 addition & 1 deletion .changeset/lazy-needles-train.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/core": major
'@tiptap/core': major
---

`insertContent` and `insertContentAt` commands should not split text nodes like paragraphs into multiple nodes when the inserted content is at the beginning of the text to avoid empty nodes being created
2 changes: 1 addition & 1 deletion .changeset/lemon-berries-change.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/core": patch
'@tiptap/core': patch
---

feat: add `once` to EventEmitters
2 changes: 1 addition & 1 deletion .changeset/mean-moose-bow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/vue-2": patch
'@tiptap/vue-2': patch
---

Pin vue-ts-types to a working version for vue-2
2 changes: 1 addition & 1 deletion .changeset/perfect-rice-vanish.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/react": minor
'@tiptap/react': minor
---

Throw an error in development mode if immediatelyRender is not set in SSR mode
2 changes: 1 addition & 1 deletion .changeset/polite-buttons-wash.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/react": patch
'@tiptap/react': patch
---

React 19 is now allowed as a peer dep, we did not have to make any changes for React 19
2 changes: 1 addition & 1 deletion .changeset/serious-coins-fail.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/extension-mention": patch
'@tiptap/extension-mention': patch
---

add zero-width space to resolve cursor selection issue
4 changes: 2 additions & 2 deletions .changeset/shy-pigs-exercise.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
"@tiptap/core": patch
"@tiptap/extension-hard-break": patch
'@tiptap/core': patch
'@tiptap/extension-hard-break': patch
---

Add Node `linebreakReplacement` support and enable on hard-break nodes
2 changes: 1 addition & 1 deletion .changeset/swift-keys-collect.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/core": patch
'@tiptap/core': patch
---

Improve handling of selections with `updateAttributes`. Should no longer modify parent nodes of the same type.
2 changes: 1 addition & 1 deletion .changeset/two-rats-watch.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/extension-table": patch
'@tiptap/extension-table': patch
---

enforce cellMinWidth even on column not resized by the user, fixes #5435
2 changes: 1 addition & 1 deletion .changeset/weak-books-eat.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@tiptap/starter-kit": major
'@tiptap/starter-kit': major
---

We have now added the Link, ListKeymap, and Underline extensions to the starter kit for a smoother onboarding experience
Expand Down
4 changes: 2 additions & 2 deletions .changeset/witty-olives-protect.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
"@tiptap/extension-link": patch
"tiptap-demos": patch
'@tiptap/extension-link': patch
'tiptap-demos': patch
---

The link extension's `validate` option now applies to both auto-linking and XSS mitigation. While, the new `shouldAutoLink` option is used to disable auto linking on an otherwise valid url.
35 changes: 6 additions & 29 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,12 @@ module.exports = {
},
overrides: [
{
files: [
'./**/*.ts',
'./**/*.tsx',
'./**/*.js',
'./**/*.jsx',
],
files: ['./**/*.ts', './**/*.tsx', './**/*.js', './**/*.jsx'],
extends: ['plugin:react-hooks/recommended'],
},
{
files: [
'./**/*.ts',
'./**/*.tsx',
'./**/*.js',
'./**/*.jsx',
'./**/*.vue',
],
plugins: [
'html',
'cypress',
'@typescript-eslint',
'simple-import-sort',
],
files: ['./**/*.ts', './**/*.tsx', './**/*.js', './**/*.jsx', './**/*.vue'],
plugins: ['html', 'cypress', '@typescript-eslint', 'simple-import-sort'],
env: {
'cypress/globals': true,
},
Expand All @@ -43,17 +27,18 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-strongly-recommended',
'airbnb-base',
'prettier',
],
rules: {
curly: ['error', 'all'],
'newline-after-var': ['error', 'always'],
'no-continue': 'off',
'no-alert': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
semi: ['error', 'never'],
'import/order': 'off',
'import/extensions': ['error', 'ignorePackages'],
'no-restricted-imports': ['error',
'no-restricted-imports': [
'error',
{
paths: [
{
Expand Down Expand Up @@ -81,14 +66,6 @@ module.exports = {
'vue/one-component-per-file': 'off',
'vue/this-in-template': ['error', 'never'],
'vue/multi-word-component-names': 'off',
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 3,
},
multiline: {
max: 1,
},
}],
'vue/singleline-html-element-content-newline': 'off',
'no-param-reassign': 'off',
'import/prefer-default-export': 'off',
Expand Down
Loading