facebook

prettier-eslint doesn’t pick up my .eslintrc

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #629381 Reply

    In “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”
    }
    }]
    }
    }

    #629382 Reply

    This 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”
    }
    }

    #629713 Reply

    Brian Fernandes
    Moderator

    Some 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!

    #630743 Reply

    Hi,

    1) That’s a vue file
    2) both
    3) Vetur

    rgds

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: prettier-eslint doesn’t pick up my .eslintrc

You must be logged in to post in the forum log in