We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a0bce62 + f0b4097 commit f2abc8bCopy full SHA for f2abc8b
src/cli/common.js
@@ -292,8 +292,20 @@ function cli(api){
292
}
293
294
function readConfigFile(options) {
295
- var data = api.readFile(api.getFullPath(".csslintrc"));
+ var data = api.readFile(api.getFullPath(".csslintrc")),
296
+ json;
297
if (data) {
298
+ if (data.charAt(0) === "{") {
299
+ try {
300
+ json = JSON.parse(data);
301
+ data = "";
302
+ for (var optionName in json) {
303
+ if (json.hasOwnProperty(optionName)) {
304
+ data += "--" + optionName + "=" + json[optionName].join();
305
+ }
306
307
+ } catch(e) {}
308
309
options = processArguments(data.split(/[\s\n\r]+/m), options);
310
311
0 commit comments