Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

editorconfig-to-prettier

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editorconfig-to-prettier - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

yarn.lock

2

index.js

@@ -21,3 +21,3 @@ module.exports = editorConfigToPrettier;

result.tabWidth = editorConfig.indent_size;
} else if (tabWidth) {
} else if (tabWidth !== undefined) {
result.tabWidth = tabWidth;

@@ -24,0 +24,0 @@ }

{
"name": "editorconfig-to-prettier",
"version": "0.0.1",
"version": "0.0.2",
"description": "Converts an `editorconfig`-parsed object to a `prettier` configuration",
"main": "index.js",
"scripts": {
"lint": "prettier --list-different *.js",
"fix": "prettier --write *.js",
"pretest": "npm run lint",
"test": "node test"

@@ -18,3 +21,6 @@ },

},
"homepage": "https://github.com/josephfrazier/editorconfig-to-prettier#readme"
"homepage": "https://github.com/josephfrazier/editorconfig-to-prettier#readme",
"devDependencies": {
"prettier": "^1.7.4"
}
}

@@ -1,36 +0,55 @@

const assert = require('assert');
const assert = require("assert");
const editorconfigToPrettier = require('./');
const editorconfigToPrettier = require("./");
assert.deepStrictEqual(editorconfigToPrettier({
indent_style: 'tab',
tab_width: 8,
indent_size: 2,
max_line_length: 100
}), {
useTabs: true,
tabWidth: 8,
printWidth: 100
})
assert.deepStrictEqual(
editorconfigToPrettier({
indent_style: "tab",
tab_width: 8,
indent_size: 2,
max_line_length: 100
}),
{
useTabs: true,
tabWidth: 8,
printWidth: 100
}
);
assert.deepStrictEqual(editorconfigToPrettier({
indent_style: 'space',
tab_width: 8,
indent_size: 2,
max_line_length: 100
}), {
useTabs: false,
tabWidth: 2,
printWidth: 100
})
assert.deepStrictEqual(
editorconfigToPrettier({
indent_style: "space",
tab_width: 8,
indent_size: 2,
max_line_length: 100
}),
{
useTabs: false,
tabWidth: 2,
printWidth: 100
}
);
assert.deepStrictEqual(editorconfigToPrettier({
indent_style: 'space',
tab_width: 8,
indent_size: 8,
max_line_length: 100
}), {
useTabs: false,
tabWidth: 8,
printWidth: 100
})
assert.deepStrictEqual(
editorconfigToPrettier({
indent_style: "space",
tab_width: 8,
indent_size: 8,
max_line_length: 100
}),
{
useTabs: false,
tabWidth: 8,
printWidth: 100
}
);
assert.deepStrictEqual(
editorconfigToPrettier({
tab_width: 0,
indent_size: 0
}),
{
tabWidth: 0
}
);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc