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
**/*.json

View File

@ -5,4 +5,4 @@ module.exports = {
plugins: [
'@babel/plugin-proposal-optional-chaining',
],
}
}

View File

@ -6,4 +6,4 @@ module.exports = {
plugins: [
'@babel/plugin-proposal-optional-chaining',
],
}
}

View File

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

View File

@ -20,9 +20,9 @@ const packages = globby.sync('../packages/*', { onlyDirectories: true })
excludePrivate: true,
// excludeNotDocumented: true,
exclude: [
"**/*.test.ts",
"**/__tests__/*",
"**/__mocks__/*"
'**/*.test.ts',
'**/__tests__/*',
'**/__mocks__/*',
],
})
@ -68,16 +68,16 @@ module.exports = function (api) {
config.module
.rule('typescript')
.test(/\.tsx?$/)
.use()
.loader('ts-loader')
.options({ transpileOnly: false, appendTsSuffixTo: [/\.vue$/] })
.test(/\.tsx?$/)
.use()
.loader('ts-loader')
.options({ transpileOnly: false, appendTsSuffixTo: [/\.vue$/] })
config.module
.rule('jsx')
.test(/\.jsx?$/)
.use()
.loader('babel-loader')
.test(/\.jsx?$/)
.use()
.loader('babel-loader')
globby.sync('../packages/*', { onlyDirectories: true })
.map(name => name.replace('../packages/', ''))

View File

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

View File

@ -10,4 +10,4 @@ context('/examples/focus', () => {
cy.get('.ProseMirror p:first').should('have.class', 'has-focus')
})
})
})
})

View File

@ -4,7 +4,7 @@ context('/examples/history', () => {
})
it('should not have a mistake', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
cy.get('.ProseMirror').then(() => {
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')
})
})
})
})

View File

@ -99,4 +99,4 @@ context('/examples/markdown-shortcuts', () => {
.find('blockquote')
.should('contain', 'foobar')
})
})
})

View File

@ -22,4 +22,4 @@ context('/examples/read-only', () => {
cy.get('.ProseMirror p:first').should('contain', 'Edited: ')
})
})
})
})

View File

@ -2,4 +2,4 @@ context('/examples/simple', () => {
before(() => {
cy.visit('/examples/simple')
})
})
})

View File

@ -73,4 +73,4 @@ context('/api/extensions/blockquote', () => {
.find('blockquote')
.should('contain', 'Quote')
})
})
})

View File

@ -58,4 +58,4 @@ context('/api/extensions/bold', () => {
.find('strong')
.should('contain', 'Bold')
})
})
})

View File

@ -128,4 +128,4 @@ context('/api/extensions/bullet-list', () => {
.find('p')
.should('contain', '* Example')
})
})
})

View File

@ -32,4 +32,4 @@ context('/api/extensions/code', () => {
cy.get('.ProseMirror code')
.should('not.exist')
})
})
})

View File

@ -64,4 +64,4 @@ context('/api/extensions/code-block', () => {
.find('pre')
.should('contain', 'Code')
})
})
})

View File

@ -2,4 +2,4 @@ context('/api/extensions/document', () => {
before(() => {
cy.visit('/api/extensions/document')
})
})
})

View File

@ -41,4 +41,4 @@ context('/api/extensions/hard-break', () => {
cy.get('.ProseMirror br')
.should('exist')
})
})
})

View File

@ -74,4 +74,4 @@ context('/api/extensions/heading', () => {
.find('h1')
.should('contain', 'Headline')
})
})
})

View File

@ -37,7 +37,7 @@ context('/api/extensions/history', () => {
.should('not.contain', 'Mistake')
cy.get('.demo__preview button:nth-child(2)')
.click()
.click()
cy.get('.ProseMirror')
.should('contain', 'Mistake')

View File

@ -49,4 +49,4 @@ context('/api/extensions/horizontal-rule', () => {
.should('exist')
})
})
})
})

View File

@ -47,4 +47,4 @@ context('/api/extensions/italic', () => {
.find('em')
.should('not.exist')
})
})
})

View File

@ -9,4 +9,4 @@ context('/api/extensions/link', () => {
editor.selectAll()
})
})
})
})

View File

@ -2,4 +2,4 @@ context('/api/extensions/list-item', () => {
before(() => {
cy.visit('/api/extensions/list-item')
})
})
})

View File

@ -94,4 +94,4 @@ context('/api/extensions/ordered-list', () => {
.find('p')
.should('contain', '1. Example')
})
})
})

View File

@ -42,4 +42,4 @@ context('/api/extensions/paragraph', () => {
.find('p')
.should('have.length', 1)
})
})
})

View File

@ -55,4 +55,4 @@ context('/api/extensions/strike', () => {
.find('s')
.should('contain', 'Strike')
})
})
})

View File

@ -15,4 +15,4 @@ context('/api/extensions/text', () => {
.find('p')
.should('contain', 'Example Text')
})
})
})

View File

@ -48,4 +48,4 @@ context('/api/extensions/underline', () => {
.find('u')
.should('not.exist')
})
})
})

View File

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

View File

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

View File

@ -69,4 +69,4 @@ Cypress.Commands.overwrite('click', (originalFn, element, text, options) => {
const newOptions = defaults(options, 'force', true)
return originalFn(element, text, newOptions)
})
})