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

Support for Regexp expression in settings.json #81

Open
ghost opened this issue Jan 30, 2018 · 2 comments
Open

Support for Regexp expression in settings.json #81

ghost opened this issue Jan 30, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 30, 2018

Environment

  • VSCode Version: 1.20.0-insider (1.20.0-insider)
  • OS Version: 10.13.3

Actual behavior

not support for Regexp expression in settings.json

Expected behavior

support for Regexp expression in settings.json

Steps to reproduce

i would like to add some regexp expressions to selector property(existed in settings.json)

{
	"postcssSorting.config": {
    "order": [
	        "custom-properties",
	        "dollar-variables",
	        "declarations",
	        {
	            type: "rule",
	            selector: /^&/
	        }
	    ]
	}
}

After searching, I find it is impossible to realize the above feature. I has become increasingly frustrated. Here is some technical details for JSON

@mrmlnc
Copy link
Owner

mrmlnc commented Jan 30, 2018

Hello, @liuliangsir,

As you see the settings is just a JSON file. And yeap, it is impossible to realize the above feature. But you can use one of format of configs: https://github.com/mrmlnc/vscode-postcss-sorting/blob/master/src/extension.ts#L15-L20 (for example, JS file).

@v1z
Copy link

v1z commented Apr 21, 2018

@mrmlnc could you provide an example of using JS file as a config please?

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