Renovate: Use聽`.editorconfig` to聽get聽indentation聽style when聽renovate configuration聽doesn鈥檛聽exist

Created on 5 Sep 2019  路  5Comments  路  Source: renovatebot/renovate

What Renovate type are you using?

The official GitHub App: https://github.com/marketplace/renovate

Describe the bug

The default indentation is two spaces even when .editorconfig is聽configured to聽use聽tabs, because聽tabs are聽the聽superior聽indentation聽codepoint (https://github.com/prettier/prettier/issues/7475).

To Reproduce

Steps to reproduce the behavior:

  1. Create repository with .editorconfig set to:

    root = true
    
    [*]
    # Use tabs, because tabs are the superior indentation codepoint
    # https://github.com/prettier/prettier/issues/7475
    indent_style = tab
    
  2. Let Renovate create the onboarding PR.

Expected behavior

renovate.json is created with:

{
    "extends": [
        "config:base"
    ]
}

Actual behavior

renovate.json is created with:

{
  "extends": [
    "config:base"
  ]
}
good first issue help wanted priority-4-low feature

All 5 comments

please use below in your .editorconfig file:

[*]
indent_style = tab
indent_size = 4

This should resolve your issue

@ViralRuparel That聽will still聽result in聽renovate.json being聽created with聽the聽inferior聽spaces instead聽of聽the聽superior聽tabs.

@ViralRuparel That聽will still聽result in聽renovate.json being聽created with聽the聽inferior聽spaces instead聽of聽the聽superior聽tabs.

Working only with tabs, then below will work for you:

[*]
indent_style = tab
tab_width = 4

@ViralRuparel I don't think any of these changes work, because currently Renovate doesn't pay attention to .editorconfig when stringifying its renovate.json

@ViralRuparel I don't think any of these changes work, because currently Renovate doesn't pay attention to .editorconfig when stringifying its renovate.json

okay!

Was this page helpful?
0 / 5 - 0 ratings