fix some linting errors

This commit is contained in:
Philipp Kühn
2020-09-23 23:38:11 +02:00
parent 59adb2c616
commit 5dff1c00d8
32 changed files with 82 additions and 78 deletions

View File

@@ -1,2 +1,4 @@
dist/**
tests/**
**/*.css **/*.css
**/*.json **/*.json

View File

@@ -30,10 +30,10 @@ module.exports = {
autolinkHeadings: { autolinkHeadings: {
content: { content: {
type: 'text', type: 'text',
value: '#' value: '#',
} },
} },
} },
}, },
}, },
{ {

View File

@@ -20,9 +20,9 @@ const packages = globby.sync('../packages/*', { onlyDirectories: true })
excludePrivate: true, excludePrivate: true,
// excludeNotDocumented: true, // excludeNotDocumented: true,
exclude: [ exclude: [
"**/*.test.ts", '**/*.test.ts',
"**/__tests__/*", '**/__tests__/*',
"**/__mocks__/*" '**/__mocks__/*',
], ],
}) })

View File

@@ -8,44 +8,44 @@ context('/examples/export-html-or-json', () => {
const json = editor.json() const json = editor.json()
expect(json).to.deep.equal({ expect(json).to.deep.equal({
'type': 'document', type: 'document',
'content': [ content: [
{ {
'type': 'paragraph', type: 'paragraph',
'content': [ content: [
{ {
'type': 'text', type: 'text',
'text': 'You are able to export your data as ' text: 'You are able to export your data as ',
}, },
{ {
'type': 'text', type: 'text',
'marks': [ marks: [
{ {
'type': 'code' type: 'code',
} },
], ],
'text': 'HTML' text: 'HTML',
}, },
{ {
'type': 'text', type: 'text',
'text': ' or ' text: ' or ',
}, },
{ {
'type': 'text', type: 'text',
'marks': [ marks: [
{ {
'type': 'code' type: 'code',
} },
], ],
'text': 'JSON' text: 'JSON',
}, },
{ {
'type': 'text', type: 'text',
'text': '.' text: '.',
} },
] ],
} },
] ],
}) })
}) })
}) })

View File

@@ -4,7 +4,7 @@ context('/examples/history', () => {
}) })
it('should not have a mistake', () => { it('should not have a mistake', () => {
cy.get('.ProseMirror').then(([{ editor }]) => { cy.get('.ProseMirror').then(() => {
cy.get('.ProseMirror h2:first').should('not.contain', 'Mistake') cy.get('.ProseMirror h2:first').should('not.contain', 'Mistake')
}) })
}) })

View File

@@ -1,3 +1,4 @@
// eslint-disable-next-line
import Prism from 'prismjs' import Prism from 'prismjs'
import 'prismjs/components/prism-jsx.js' import 'prismjs/components/prism-jsx.js'
import 'prismjs/components/prism-scss.js' import 'prismjs/components/prism-scss.js'
@@ -6,7 +7,7 @@ import Demo from '~/components/Demo'
import Tab from '~/components/Tab' import Tab from '~/components/Tab'
import ReactRenderer from '~/components/ReactRenderer' import ReactRenderer from '~/components/ReactRenderer'
export default function (Vue, { router, head, isClient }) { export default function (Vue) {
Vue.component('Layout', App) Vue.component('Layout', App)
Vue.component('Demo', Demo) Vue.component('Demo', Demo)
Vue.component('Tab', Tab) Vue.component('Tab', Tab)

View File

@@ -4,18 +4,19 @@ import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph' import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text' import Text from '@tiptap/extension-text'
// eslint-disable-next-line
const html = generateHtml({ const html = generateHtml({
'type': 'document', type: 'document',
'content': [{ content: [{
'type': 'paragraph', type: 'paragraph',
'attrs': { attrs: {
'align': 'left' align: 'left',
}, },
'content': [{ content: [{
'type': 'text', type: 'text',
'text': 'Example Text' text: 'Example Text',
}] }],
}] }],
}, [ }, [
new Document(), new Document(),
new Paragraph(), new Paragraph(),