4

I have an issue with the eslint + prettier. For some reason I have some "line breaks" like this:

var err = "jqxhr: " + jqxhr + ". Status: " + textStatus + ", " + error;

Will be beautified by tool as:

var err =
    "jqxhr: " + jqxhr + ". Status: " + textStatus + ", " + error;

(https://gyazo.com/ef44b03a25292f5e6e156c3105ef7c3b)

How can I prevent such behavior? Thanks!

Config example:

{
    "root": true,
    "extends": [
        "prettier",
        "prettier/standard"
    ],
    "env": {
        "browser": true,
        "jquery": true
    },
    "plugins": [
        "prettier"
    ],
    "rules": {
        "prettier/prettier": [
            "error"
        ],
        "indent": [
            "error",
            4
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "max-len": [
            "error",
            {"code": 120, "ignoreUrls": true}
        ]
    }
}
name
  • 73
  • 1
  • 6

1 Answers1

2

If you have similar problem check the line printWidth and operator-linebreak. My case was related with printWidth

name
  • 73
  • 1
  • 6