feat(package.json): Add lint yarn script + make it a precondition to build all packages.

fmt(tiptap-commands): Fix all ESLint violations with `--fix`

fmt(tiptap-commands): Ignore some ESLint rules on code copied from prosemirror.

fmt(tiptap): Apply ESLint autofix to `tiptap` package sources.

fmt(tiptap-extensions): Fix ESlint violations from `marks`

refactor(tiptap-extensions): Fix ESLint violations for `plugins/Suggestions.js`.

Some of the violations required a bit of restructuring of the code/logic

fmt(tiptap-utils): Fix ESLint violations.

feat(package.json): Add yarn script to lint source code before compiling the examples.
This commit is contained in:
Erick Wilder
2018-10-13 16:45:22 +02:00
parent 3c650cf35f
commit 54550b2386
8 changed files with 80 additions and 69 deletions

View File

@@ -15,7 +15,7 @@ export default class BoldMark extends Mark {
},
{
tag: 'b',
getAttrs: node => node.style.fontWeight != 'normal' && null,
getAttrs: node => node.style.fontWeight !== 'normal' && null,
},
{
style: 'font-weight',
@@ -38,7 +38,7 @@ export default class BoldMark extends Mark {
inputRules({ type }) {
return [
markInputRule(/(?:\*\*|__)([^\*_]+)(?:\*\*|__)$/, type),
markInputRule(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/, type),
]
}

View File

@@ -30,7 +30,7 @@ export default class ItalicMark extends Mark {
inputRules({ type }) {
return [
markInputRule(/(?:^|[^\*_])(?:\*|_)([^\*_]+)(?:\*|_)$/, type),
markInputRule(/(?:^|[^*_])(?:\*|_)([^*_]+)(?:\*|_)$/, type),
]
}