sheerun / prettier-standard

Formats with Prettier and lints with ESLint+Standard! (✿◠‿◠)
MIT License
868 stars 44 forks source link

printWidth doesn't work in Sublime Text 3 #100

Closed septagram closed 4 years ago

septagram commented 4 years ago

In my JsPrettier.sublime-settings I have:

  "prettier_options": {
    "printWidth": 120
  },

If I try to save the following line:

const longLine = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20]

This is what I get:

const longLine = [
  1,
  2,
  3,
  4,
  5,
  6,
  7,
  8,
  9,
  10,
  11,
  12,
  13,
  15,
  16,
  17,
  18,
  19,
  20
]

I don't think it's a SublimeJSPrettier problem, because when I replace prettier_cli_path with "[/path/to/]prettier-standard/node_modules/prettierx/bin/prettierx.js", the printWidth option is respected.

sheerun commented 4 years ago

prettier-standard CLI doesn't support flags list printWidth, to configure formatting, please edit .prettierrc file in project directory