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

Make tab width configurable #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mischnic
Copy link

@mischnic mischnic commented Nov 1, 2019

For my usecase, I need to modify the default tab width.

I have added a tabWidth option to parse and stringify, added a test and documentation to the readme.

@@ -20,6 +20,7 @@ exports.parse = function (source, _, options) {
var column = 0;
var pos = 0;
var bigint = options && options.bigint && typeof BigInt != 'undefined';
var tabWidth = (options && options.tabWidth && typeof options.tabWidth === 'number') ? options.tabWidth : 4;
Copy link
Author

@mischnic mischnic Nov 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change produces a lint error. Not sure how this should be resolved

json-source-map/index.js
  240:21  error  Function has a complexity of 17. Maximum allowed is 15  complexity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant