fix some linting errors
This commit is contained in:
@@ -1,2 +1,4 @@
|
|||||||
|
dist/**
|
||||||
|
tests/**
|
||||||
**/*.css
|
**/*.css
|
||||||
**/*.json
|
**/*.json
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
'@babel/plugin-proposal-optional-chaining',
|
'@babel/plugin-proposal-optional-chaining',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
'@babel/plugin-proposal-optional-chaining',
|
'@babel/plugin-proposal-optional-chaining',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ module.exports = {
|
|||||||
autolinkHeadings: {
|
autolinkHeadings: {
|
||||||
content: {
|
content: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
value: '#'
|
value: '#',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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__/*',
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -68,16 +68,16 @@ module.exports = function (api) {
|
|||||||
|
|
||||||
config.module
|
config.module
|
||||||
.rule('typescript')
|
.rule('typescript')
|
||||||
.test(/\.tsx?$/)
|
.test(/\.tsx?$/)
|
||||||
.use()
|
.use()
|
||||||
.loader('ts-loader')
|
.loader('ts-loader')
|
||||||
.options({ transpileOnly: false, appendTsSuffixTo: [/\.vue$/] })
|
.options({ transpileOnly: false, appendTsSuffixTo: [/\.vue$/] })
|
||||||
|
|
||||||
config.module
|
config.module
|
||||||
.rule('jsx')
|
.rule('jsx')
|
||||||
.test(/\.jsx?$/)
|
.test(/\.jsx?$/)
|
||||||
.use()
|
.use()
|
||||||
.loader('babel-loader')
|
.loader('babel-loader')
|
||||||
|
|
||||||
globby.sync('../packages/*', { onlyDirectories: true })
|
globby.sync('../packages/*', { onlyDirectories: true })
|
||||||
.map(name => name.replace('../packages/', ''))
|
.map(name => name.replace('../packages/', ''))
|
||||||
|
|||||||
@@ -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: '.',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -57,4 +57,4 @@ context('/examples/export-html-or-json', () => {
|
|||||||
expect(html).to.equal('<p>You are able to export your data as <code>HTML</code> or <code>JSON</code>.</p>')
|
expect(html).to.equal('<p>You are able to export your data as <code>HTML</code> or <code>JSON</code>.</p>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ context('/examples/focus', () => {
|
|||||||
cy.get('.ProseMirror p:first').should('have.class', 'has-focus')
|
cy.get('.ProseMirror p:first').should('have.class', 'has-focus')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -22,4 +22,4 @@ context('/examples/history', () => {
|
|||||||
cy.get('.ProseMirror h2:first').should('not.contain', 'Mistake')
|
cy.get('.ProseMirror h2:first').should('not.contain', 'Mistake')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -99,4 +99,4 @@ context('/examples/markdown-shortcuts', () => {
|
|||||||
.find('blockquote')
|
.find('blockquote')
|
||||||
.should('contain', 'foobar')
|
.should('contain', 'foobar')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -22,4 +22,4 @@ context('/examples/read-only', () => {
|
|||||||
cy.get('.ProseMirror p:first').should('contain', 'Edited: ')
|
cy.get('.ProseMirror p:first').should('contain', 'Edited: ')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ context('/examples/simple', () => {
|
|||||||
before(() => {
|
before(() => {
|
||||||
cy.visit('/examples/simple')
|
cy.visit('/examples/simple')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -73,4 +73,4 @@ context('/api/extensions/blockquote', () => {
|
|||||||
.find('blockquote')
|
.find('blockquote')
|
||||||
.should('contain', 'Quote')
|
.should('contain', 'Quote')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -58,4 +58,4 @@ context('/api/extensions/bold', () => {
|
|||||||
.find('strong')
|
.find('strong')
|
||||||
.should('contain', 'Bold')
|
.should('contain', 'Bold')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -128,4 +128,4 @@ context('/api/extensions/bullet-list', () => {
|
|||||||
.find('p')
|
.find('p')
|
||||||
.should('contain', '* Example')
|
.should('contain', '* Example')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ context('/api/extensions/code', () => {
|
|||||||
cy.get('.ProseMirror code')
|
cy.get('.ProseMirror code')
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -64,4 +64,4 @@ context('/api/extensions/code-block', () => {
|
|||||||
.find('pre')
|
.find('pre')
|
||||||
.should('contain', 'Code')
|
.should('contain', 'Code')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ context('/api/extensions/document', () => {
|
|||||||
before(() => {
|
before(() => {
|
||||||
cy.visit('/api/extensions/document')
|
cy.visit('/api/extensions/document')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -41,4 +41,4 @@ context('/api/extensions/hard-break', () => {
|
|||||||
cy.get('.ProseMirror br')
|
cy.get('.ProseMirror br')
|
||||||
.should('exist')
|
.should('exist')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -74,4 +74,4 @@ context('/api/extensions/heading', () => {
|
|||||||
.find('h1')
|
.find('h1')
|
||||||
.should('contain', 'Headline')
|
.should('contain', 'Headline')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ context('/api/extensions/history', () => {
|
|||||||
.should('not.contain', 'Mistake')
|
.should('not.contain', 'Mistake')
|
||||||
|
|
||||||
cy.get('.demo__preview button:nth-child(2)')
|
cy.get('.demo__preview button:nth-child(2)')
|
||||||
.click()
|
.click()
|
||||||
|
|
||||||
cy.get('.ProseMirror')
|
cy.get('.ProseMirror')
|
||||||
.should('contain', 'Mistake')
|
.should('contain', 'Mistake')
|
||||||
|
|||||||
@@ -49,4 +49,4 @@ context('/api/extensions/horizontal-rule', () => {
|
|||||||
.should('exist')
|
.should('exist')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -47,4 +47,4 @@ context('/api/extensions/italic', () => {
|
|||||||
.find('em')
|
.find('em')
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ context('/api/extensions/link', () => {
|
|||||||
editor.selectAll()
|
editor.selectAll()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ context('/api/extensions/list-item', () => {
|
|||||||
before(() => {
|
before(() => {
|
||||||
cy.visit('/api/extensions/list-item')
|
cy.visit('/api/extensions/list-item')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -94,4 +94,4 @@ context('/api/extensions/ordered-list', () => {
|
|||||||
.find('p')
|
.find('p')
|
||||||
.should('contain', '1. Example')
|
.should('contain', '1. Example')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -42,4 +42,4 @@ context('/api/extensions/paragraph', () => {
|
|||||||
.find('p')
|
.find('p')
|
||||||
.should('have.length', 1)
|
.should('have.length', 1)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -55,4 +55,4 @@ context('/api/extensions/strike', () => {
|
|||||||
.find('s')
|
.find('s')
|
||||||
.should('contain', 'Strike')
|
.should('contain', 'Strike')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ context('/api/extensions/text', () => {
|
|||||||
.find('p')
|
.find('p')
|
||||||
.should('contain', 'Example Text')
|
.should('contain', 'Example Text')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -48,4 +48,4 @@ context('/api/extensions/underline', () => {
|
|||||||
.find('u')
|
.find('u')
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -4,20 +4,21 @@ 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(),
|
||||||
new Text(),
|
new Text(),
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -69,4 +69,4 @@ Cypress.Commands.overwrite('click', (originalFn, element, text, options) => {
|
|||||||
const newOptions = defaults(options, 'force', true)
|
const newOptions = defaults(options, 'force', true)
|
||||||
|
|
||||||
return originalFn(element, text, newOptions)
|
return originalFn(element, text, newOptions)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user