Skip to content

CSS Formatter doesn't work #252

@levz0r

Description

@levz0r

Describe the bug
CSS Formatter doesn't work.

To Reproduce
Steps to reproduce the behavior:
1..unibeautifyrc.json, add the following configuration:

"CSS": {
    "beautifiers": ["JS-Beautify"],
    "indent_char": " ",
    "indent_size": 4
  }

Add the following dev dependencies to package.json:

  "devDependencies": {
    "@unibeautify/beautifier-js-beautify": "^0.4.0",
    "@unibeautify/beautifier-prettier": "^0.9.0",
    "js-beautify": "^1.10.3",
    "prettier": "github:prettier/prettier",
    "unibeautify": "^0.15.0",
  }

Create an unformatted css file:

a{  
    color:#E02020;
}

Save/format the css.

Expected behavior
The css is formatted succesfully.

Actual behavior
See logs below.

Error/Stack Traces
During start-up:

[2020-02-12 15:52:10.184] [exthost] [info] ExtensionService#_doActivateExtension Glavin001.unibeautify-vscode {"startup":true,"extensionId":{"value":"Glavin001.unibeautify-vscode","_lower":"glavin001.unibeautify-vscode"},"activationEvent":"*"}
[2020-02-12 15:52:10.184] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/lev/.vscode/extensions/glavin001.unibeautify-vscode-0.7.0/index.js

When trying to format the css:

[2020-02-12 15:53:03.640] [exthost] [error] [Glavin001.unibeautify-vscode] provider FAILED
[2020-02-12 15:53:03.640] [exthost] [error] Error: No configuration file found!
	at /Users/lev/.vscode/extensions/glavin001.unibeautify-vscode-0.7.0/node_modules/@unibeautify/beautifier-csscomb/dist/src/index.js:62:24
	at new Promise (<anonymous>)
	at Object.beautify (/Users/lev/.vscode/extensions/glavin001.unibeautify-vscode-0.7.0/node_modules/@unibeautify/beautifier-csscomb/dist/src/index.js:58:16)
	at /Users/lev/.vscode/extensions/glavin001.unibeautify-vscode-0.7.0/node_modules/unibeautify/dist/src/beautifier.js:127:26

System (please complete the following information):

  • OS: macOS
  • Version: 10.15.1

Additional context
VSCode version 1.42.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions