diff --git a/.eslintrc.json b/.eslintrc.json index 77f68075..2d199c13 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,30 +3,33 @@ "env": { "node": true }, - "extends": [ - "plugin:vue/essential", - "@vue/standard", - "@vue/typescript" - ], + "extends": ["plugin:vue/essential", "@vue/standard", "@vue/typescript"], "rules": { "comma-dangle": ["error", "only-multiline"], "semi": ["error", "always"], - "indent": ["error", 2, { - "SwitchCase": 1, - "VariableDeclarator": { - "var": 2, - "let": 2, - "const": 3 + "indent": [ + "error", + 2, + { + "SwitchCase": 1, + "VariableDeclarator": { + "var": 2, + "let": 2, + "const": 3 + } } - }], + ], "linebreak-style": ["error", "unix"], "quotes": ["error", "single"], - "no-multi-spaces": ["error", { - "exceptions": { - "VariableDeclarator": true + "no-multi-spaces": [ + "error", + { + "exceptions": { + "VariableDeclarator": true + } } - }], - "space-before-function-paren": ["error", "always"], + ], + "space-before-function-paren": ["error", "never"], "no-unused-vars": "off", "camelcase": "off", "@typescript-eslint/no-unused-vars": "error" diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..1071f96e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "singleQuote": true, + "trailingComma": "es5", + "bracketSpacing": true, + "useTabs": false, + "tabWidth": 2, + "semi": true +} diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 00000000..6c8b0a19 --- /dev/null +++ b/.yarnrc @@ -0,0 +1 @@ +registry "https://registry.yarnpkg.com" \ No newline at end of file diff --git a/examples/views/AllExtensions.vue b/examples/views/AllExtensions.vue index 098ab256..e85f4f0a 100644 --- a/examples/views/AllExtensions.vue +++ b/examples/views/AllExtensions.vue @@ -1,9 +1,6 @@ @@ -36,7 +33,7 @@ import { } from 'element-tiptap'; export default { - data () { + data() { return { extensions: [ new Doc(), @@ -65,7 +62,8 @@ export default { new History(), ], - content: '

Bubble Menu

Try to select some text here. There will popup a menu for some commands.

Pass a property bubble: true to extension is all you need to do.

', + content: + '

Bubble Menu

Try to select some text here. There will popup a menu for some commands.

Pass a property bubble: true to extension is all you need to do.

', }; }, }; diff --git a/examples/views/CustomMenubar.vue b/examples/views/CustomMenubar.vue index 33b4cb03..eba4f04c 100644 --- a/examples/views/CustomMenubar.vue +++ b/examples/views/CustomMenubar.vue @@ -1,9 +1,6 @@