var rc = require('rc-loader')

var newParmas = function () {
  var params = {}
  params.stylelint = loadStylelint()
  return params
}

function loadStylelint() {
  var result = rc('stylelint').rules
  return result || {}
}

module.exports = newParmas

@@ -1,224 +1,1426 @@
 var 
-rc = require('rc-loader')%0A%0Avar newParmas = function () %7B%0A  var params = %7B%7D%0A  params.stylelint = loadStylelint()%0A  return params%0A%7D%0A%0Afunction loadStylelint() %7B%0A  var result = rc('stylelint').rules%0A  return result %7C%7C %7B%7D
+path = require('path')%0Avar process = require('process')%0A%0Avar rc = require('rc-loader')%0Avar repeatString = require('repeat-string')%0Avar editorconfig = require('editorconfig')%0A%0Avar defaultIndentWidth = repeatString(' ', 2)%0A%0Afunction loadStylelint(from) %7B%0A  var configName = 'stylelint'%0A  return rc(configName, %7B%7D, %7B config: path.join(from, configName) %7D).rules %7C%7C %7B%7D%0A%7D%0A%0Afunction getIndentWidthFromEditorConfig(from) %7B%0A  var config = editorconfig.parseSync(from)%0A  if (config == undefined) %7B%0A    return defaultIndentWidth%0A  %7D%0A  switch (config.indent_style) %7B%0A    case 'tab': return '%5Ct'%0A    case 'space': return repeatString(' ', config.indent_size)%0A    default: return defaultIndentWidth%0A  %7D%0A%7D%0A%0Afunction isEmptyObject(obj) %7B%0A  for (var name in obj) %7B%0A    return false;%0A  %7D%0A  return true;%0A%7D%0A%0Afunction newParmas(from) %7B%0A  var wd = from %7C%7C process.cwd()%0A  var params = %7B%7D%0A%0A  var stylelintConfig = loadStylelint(wd)%0A  if (isEmptyObject(stylelintConfig)) %7B%0A    params.indentWidth = getIndentWidthFromEditorConfig(wd)%0A    params.stylelint = %7B%7D%0A    return params%0A  %7D%0A%0A  var indentaiton = stylelintConfig.indentation%0A  switch (typeof indentation) %7B%0A    case 'string':%0A      params.indentWidth = '%5Ct'%0A      break%0A    case 'number':%0A      params.indentWidth = repeatString(' ', indentaiton)%0A      break%0A    default:%0A      params.indentWidth = defaultIndentWidth%0A      break%0A  %7D%0A  params.stylelint = stylelintConfig%0A  return params
 %0A%7D%0A%0A

modify a way of getting indentation