How can I override the response-decoration parameter in VSCode?

I have a React Native project. In Visual Studio Code, I use an add- react-beautifyin to decorate my code on the fly. The add-in uses the prettydiff tool internally.

The only thing I don't like is that it condenses

import { Componentname } from packagename

to

import {Componentname} from packagename

The correct prettydiff parameter to change this behavior is set brace_styleto collapse-preserve-inline.

However, I cannot get prettydiff to accept the change.

I tried to create a .jsbeautifyrc file in the project root directory and added:

{
    "brace_style": "collapse-preserve-inline"
}

but this does not seem to work: behavior that I do not want is still happening.

How to do it right?

+4
2

VS Mac v1.8.1, .jsbeautifyrc, , , :

index.js

import {code} from 'source';
import {otherCode} from 'source';

.jsbeautifyrc

{
  "bracepadding": true
}

beautifier:

import { code } from 'source';
import { otherCode } from 'source';
+4

, , .jsbeautifyrc, , react-beautify .

settings, , , , prettydiff , esformatter-jsx ,

beautify repo .

.jsbeautifyrc , , settings.

js-beautify version 1.6.8 jsx support, enter image description here

enter image description here

+1

Source: https://habr.com/ru/post/1666037/


All Articles