Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make js-beautify --editorconfig work well when using bash pipeline. #1072

Closed
hujianxin opened this issue Dec 16, 2016 · 1 comment
Closed

Comments

@hujianxin
Copy link

Description

In my project, there is a .editorconfig file and a .jsbeautifyrc file.

The content of .editorconfig is:

root = true

[*]
indent_style = space 
indent_size = 2

The content of .jsbeautifyrc is:

{
  "editorconfig": true
}

If I use command js-beautify app.js, the output code will be indented with 2 space.
If I use command cat app.js | js-beautify, the output code will not change to 2 space. Same that when using shell pipeline, js-beautify won't read .editorconfig file.

Input

The code looked like this before beautification:

if (true) {
    something;
}

Expected Output

The code should have looked like this after beautification:

if (true) {
  something;
}

Actual Output

The code actually looked like this after beautification:

if (true) {
    something;
}

Steps to Reproduce

Environment

OS:
ubuntu 16.04 64bit

@bitwiseman
Copy link
Member

Duplicates #1012.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants