dspace-angular
dspace-angular copied to clipboard
Decorated class properties are now over-indented by ESLint
Describe the bug
Apparently the indent rule in ESLint doesn't play well with decorated properties in TypeScript: they are indented with 4 spaces, e.g. here.
This doesn't cause any real problems but is a bit of an eyesore.
There is a potential workaround, but it disables indentation checks for all properties and won't be auto-fixable. The ESLint rule itself is deprecated though (because it's a style rule and not a lint rule). They suggest to use this rule instead.
Expected behavior Decorated properties should be indented with 2 spaces just like any other properties.
Related work #2343
There are a few other style rules used in DSpace Angular that have been deprecated in base ESLint & are now community-supported in @stylistic/eslint-plugins:
indentcomma-dangleobject-curly-spacingeol-lastbrace-stylekeyword-spacing
Some of these include TypeScript-specific bugfixes now, but this doesn't address the over-indentation problem.
Labeled as low priority since I applied the workaround in #2865 and it's unlikely that we'll have a better solution save for moving to Prettier.