Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorated class properties are now over-indented by ESLint #2946

Open
ybnd opened this issue Apr 17, 2024 · 2 comments
Open

Decorated class properties are now over-indented by ESLint #2946

ybnd opened this issue Apr 17, 2024 · 2 comments

Comments

@ybnd
Copy link
Member

ybnd commented Apr 17, 2024

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

@ybnd
Copy link
Member Author

ybnd commented Apr 18, 2024

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:

  • indent
  • comma-dangle
  • object-curly-spacing
  • eol-last
  • brace-style
  • keyword-spacing

Some of these include TypeScript-specific bugfixes now, but this doesn't address the over-indentation problem.

@ybnd ybnd added low priority and removed needs triage New issue needs triage and/or scheduling labels Apr 18, 2024
@ybnd
Copy link
Member Author

ybnd commented Apr 18, 2024

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.

@tdonohue tdonohue moved this from 🆕 Triage to 🙋 Needs Help / Unscheduled in DSpace Backlog Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🙋 Needs Help / Unscheduled
Development

No branches or pull requests

2 participants