mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 17:43:49 +08:00
update eslint config
This commit is contained in:
parent
400e671454
commit
fa18ffe6d7
@ -35,6 +35,7 @@ module.exports = {
|
||||
'airbnb-base',
|
||||
],
|
||||
rules: {
|
||||
curly: ['error', 'all'],
|
||||
'no-continue': 'off',
|
||||
'no-alert': 'off',
|
||||
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
||||
|
@ -17,9 +17,13 @@ export class Punctuation extends LinterPlugin {
|
||||
|
||||
scan() {
|
||||
this.doc.descendants((node, position) => {
|
||||
if (!node.isText) return
|
||||
if (!node.isText) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!node.text) return
|
||||
if (!node.text) {
|
||||
return
|
||||
}
|
||||
|
||||
const matches = this.regex.exec(node.text)
|
||||
|
||||
|
@ -5,6 +5,9 @@ function getType(value: any): string {
|
||||
}
|
||||
|
||||
export default function isPlainObject(value: any): value is Record<string, any> {
|
||||
if (getType(value) !== 'Object') return false
|
||||
if (getType(value) !== 'Object') {
|
||||
return false
|
||||
}
|
||||
|
||||
return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user