I often get 4 space indent instead of 2 within json files. Here's an example:
{
"extends": ["tslint:latest", "tslint-react"],
"rules": {
"array-type": [true, "array"],
"arrow-parens": [true, "ban-single-arg-parens"],
"arrow-return-shorthand": [true, "multiline"],
"await-promise": true,
"curly": false,
"interface-name": [true, "never-prefix"],
"match-default-export-name": true,
"max-line-length": [true, 120],
"member-access": false,
"no-consecutive-blank-lines": [true, 1],
"no-duplicate-super": true,
"no-floating-promises": true,
"no-trailing-whitespace": [true, "ignore-comments"],
"no-unsafe-finally": true,
"no-unused-expression": [true, "allow-fast-null-checks"],
"object-literal-sort-keys": false,
"ordered-imports": true,
"prefer-const": true,
"quotemark": [true, "single", "jsx-double"],
"semicolon": [true, "never"],
"trailing-comma": [true, {"multiline": "always", "singleline": "never"}],
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore", "allow-pascal-case"],
"jsx-alignment": true,
"jsx-ban-props": true,
"jsx-boolean-value": [true, "never"],
"jsx-no-lambda": false,
"jsx-no-string-ref": true,
"jsx-self-close": true,
"jsx-wrap-multiline": true,
"jsx-no-multiline-js": false
}
}
Guessing offset for /Users/aaronjensen/Source/epic-trello/tslint.json
Elapsed time for analysis: 0.001 seconds
Total relevant lines: 33 out of 36 (limit: 5000)
Histogram:
3x 2 spaces
30x 4 spaces
Analysis:
offset 2 works for 100.00% of relevant lines, matching 2 distinct offsets - merged with offset 4 (9.09% deviation, limit 20.00%)
offset 4 works for 90.91% of relevant lines, matching 1 distinct offsets - CONSIDERED
offset 3 works for 0.00% of relevant lines, matching 0 distinct offsets - rejected: too few distinct matching offsets (1 required)
offset 5 works for 0.00% of relevant lines, matching 0 distinct offsets - rejected: too few distinct matching offsets (1 required)
offset 6 works for 0.00% of relevant lines, matching 0 distinct offsets - rejected: too few distinct matching offsets (1 required)
offset 7 works for 0.00% of relevant lines, matching 0 distinct offsets - rejected: too few distinct matching offsets (1 required)
offset 8 works for 0.00% of relevant lines, matching 0 distinct offsets - rejected: too few distinct matching offsets (1 required)
Summary:
Best guess is offset 4 with 90.91% matching lines (80.00% required)
Hard tab percentage: 0.00% (0 lines), -100.00% superior to soft tabs (threshold 300.00%)
Soft tab percentage: 100.00% (33 lines), inf% superior to hard tabs (threshold 300.00%)
Conclusion:
Guessed offset 4 with 91% confidence.
Change indent-tab-setting: yes, to nil