Tagged: prettier eslint vue
- This topic has 3 replies, 2 voices, and was last updated 5 years ago by mewerappidoo_deleted.
-
AuthorPosts
-
mewerappidoo_deletedParticipantIn “CodeMix -> Formatter -> Vue -> Format: JS” I have set “prettier-eslint” and in my projects home dir I do have an .eslintrc but it’s being ignored (tried different extensions of the file (.js, .json).
node correctly finds and interpretes that file, but codemix doesn’t apply it’s rules with prettier-eslint. It should do a eslint –fix after invoking prettier.
{
“extends”: “vuetify”,
“rules”: {
“space-before-function-paren”: [“error”],
“no-tabs”: “error”,
“vue/max-attributes-per-line”: “off”,
“vue/attributes-order”: “off”,
“vue/html-closing-bracket-newline”: “off”,
“vue/singleline-html-element-content-newline”: “off”,
“vue/attribute-hyphenation”: “off”,
“vue/require-prop-types”: “off”,
“vue/script-indent”: [“error”, 2, {
“baseIndent”: 0,
“switchCase”: 0,
“ignores”: []
}],
“vue/html-indent”: [“error”, 2, {
“attribute”: 1,
“baseIndent”: 1,
“closeBracket”: 0,
“alignAttributesVertically”: false,
“ignores”: []
}],
“vue/multiline-html-element-content-newline”: “off”,
“vue/html-self-closing”: [“error”, {
“html”: {
“void”: “always”,
“normal”: “always”,
“component”: “always”
}
}]
}
}
mewerappidoo_deletedParticipantThis is my codemix.code-workspace:
{
“folders”: [
{
“path”: “/Users/xxx/Documents/workspace-sts/foobar”
}
],
“settings”: {
“[javascript]”: {
“editor.defaultFormatter”: “vscode.typescript-language-features”
},
“vetur.format.defaultFormatter.js”: “prettier-eslint”
}
}
Brian FernandesModeratorSome quick questions:
1) Are you formatting
.js
files or.vue
files?
2) Are the files being formatted on save, or do you manually invoke the formatter?
3) If you manually format the file, what formatter is reported as running (it should show up for a few seconds at the top of the editor)Thanks!
mewerappidoo_deletedParticipantHi,
1) That’s a vue file
2) both
3) Veturrgds
-
AuthorPosts