GNU bug report logs - #77803
tsx-ts-mode: wrong indentation for variables declarations

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Mon, 14 Apr 2025 15:43:01 UTC

Severity: normal

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>, Yuan Fu <casouri <at> gmail.com>
Cc: 77803 <at> debbugs.gnu.org
Subject: bug#77803: [PATCH v2] Don't indent variable names to their declarator expression (bug#77803)
Date: Wed, 7 May 2025 05:13:57 +0300
On 27/04/2025 10:56, Konstantin Kharlamov wrote:
> To put it a better way: to see if anyone's using such indentation for a
> project that is not theirs and have more than 2 maintainers (an
> internal dayjob project is a great candidate).

Looking around, here's an example of such code:

https://github.com/mozilla/doctorjs/blob/master/js/tiki.js#L153-L155

And later, throughout that file.

Maybe not a perfect example given that that repo had been archived a 
year ago, but it seems that as long as a project uses 2 spaces indent 
(very popular), and there are instances of variables grouped into a 
comma-separated declaration, this indentation style will be preferred.

IOW, I have seen projects split variables into multiple declarations, 
often. But to have indentation like this?

    const a = 1,
      b = 2,

Not even once.




This bug report was last modified 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.