Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

smarter way to resolve indentation of current project #39

Open
andrewdeandrade opened this issue Nov 12, 2014 · 1 comment · Fixed by #88
Open

smarter way to resolve indentation of current project #39

andrewdeandrade opened this issue Nov 12, 2014 · 1 comment · Fixed by #88

Comments

@andrewdeandrade
Copy link
Contributor

The current approach of resolving the indentation of the current project based on package.json:main is naive in that it does allow the linter to be run on individual files or to lint from content piped in on stdin.

Use a smarter way to determine the indentation of a project, possibly using .editorconfig settings if available or allowing the indentation to be set in the .lintrc file. Fallback to detecting indentation if the indentation is not set explicitly via either method.

Do not use the indentation of the current file as reference since it is entirely possible to lint a single file using one indent style while the rest of the project uses something else. In the case that indentation cannot be determined any way, either the indentation of the current/first file should be used or the indentation average across all the files being linted should be used (this will be slow, but a last resort. correctness is preferable to speed since this is an edgecase).

@andrewdeandrade
Copy link
Contributor Author

Issue #30 is related to this and may become obsolete if a different approach is taken to determine project indentation.

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

Successfully merging a pull request may close this issue.

1 participant