editorconfig-to-prettier
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -11,3 +11,5 @@ module.exports = editorConfigToPrettier; | ||
const tabWidth = editorConfig.tab_width || editorConfig.indent_size; | ||
if (editorConfig.indent_size === "tab") { | ||
result.useTabs = true; | ||
} | ||
@@ -22,4 +24,4 @@ if (result.useTabs && editorConfig.tab_width) { | ||
result.tabWidth = editorConfig.indent_size; | ||
} else if (tabWidth !== undefined) { | ||
result.tabWidth = tabWidth; | ||
} else if (editorConfig.tab_width !== undefined) { | ||
result.tabWidth = editorConfig.tab_width; | ||
} | ||
@@ -26,0 +28,0 @@ |
{ | ||
"name": "editorconfig-to-prettier", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Converts an `editorconfig`-parsed object to a `prettier` configuration", | ||
@@ -10,2 +10,3 @@ "main": "index.js", | ||
"fix": "prettier --write *.js", | ||
"prepublishOnly": "npm test", | ||
"pretest": "npm run lint", | ||
@@ -12,0 +13,0 @@ "test": "node test" |
1798
31