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

Establish a plan for linting moving forward #2116

Open
cjihrig opened this issue Dec 18, 2024 · 2 comments
Open

Establish a plan for linting moving forward #2116

cjihrig opened this issue Dec 18, 2024 · 2 comments

Comments

@cjihrig
Copy link
Contributor

cjihrig commented Dec 18, 2024

Describe the bug
This package uses TSLint, which is deprecated. The suggested upgrade path seems to have some issues and complexity. Since there are a number of options for linting, I figured it was worth opening an issue to decide on a direction first.

A few possibilities:

  • Move to ESLint directly. This would have been my choice in previous versions, but the latest ESLint seems more complex and potentially involves adding a number of support modules.
  • Move to an alternative tool. Examples would be things like neostandard, typescript-eslint, biome.

I think no matter which option we pick, we might end up tweaking the lint rules over time if we want to match the TSLint configuration as closely as possible (not sure if that is necessarily a goal though).

Client Version
latest

Server Version
not relevant

To Reproduce
Run npm ci on this repo

Expected behavior
npm ci finishes with no warnings or errors related to this package

Example Code
not relevant

Environment (please complete the following information):
local development

Additional context
Quoting my comment from #2050 regarding migrating away from TSLint:

FWIW, I briefly started looking into this. It's not as simple as I had hoped it would be. TSLint provides an automatic migration to ESLint that preserves many of the current linting settings. However, it seems to migrate to a now outdated version of ESLint, so the generated config has some problems. In turn, ESLint also provides an automatic update migration. Unfortunately, ESLint seems to have gotten a lot more complex in its latest version and requires installing a bunch of additional modules.

@brendandburns
Copy link
Contributor

I'm ok with adjusting our style to match a different linter. I would want to see the differences in a few example files first and then we could converge on a different solution.

Is there one linter (other than eslint) that appears to be more commonly used than the others?

@cjihrig
Copy link
Contributor Author

cjihrig commented Dec 18, 2024

Is there one linter (other than eslint) that appears to be more commonly used than the others?

I think most of the top options are layers built on top of ESLint. Based on download numbers and what I've heard of people using, I would probably say typescript-eslint.

There is also Biome, which is not based on ESLint. It is a full toolchain, including a formatter that advertises 97% compatibility with Prettier, and a linter that supports more than 270 ESLint rules. I have never used it, but it could mean fewer dependencies, and likely better performance since it is Rust based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants