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

Improve TypeScript type-aware linting compatibility by passing true to project instead of a relative path #22

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.1.1

- Improve TypeScript type-aware linting compatibility by passing `true` to `project` instead of a relative path. This should [auto-find the `tsconfig.json` file nearest the source file being linted](https://typescript-eslint.io/packages/parser/#project).

## 2.1.0

- Add [`eslint-plugin-perfectionist`](https://github.com/azat-io/eslint-plugin-perfectionist) to the base configuration and all its dependent configurations
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/eslintTypescriptConfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"]
"project": true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc you linked mentions:

note
We now recommend using projectService instead of project for easier configuration and faster linting.

So maybe we can go for

Suggested change
"project": true
"projectService": true

Copy link
Contributor Author

@mangs mangs Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yea projectService is for version 8, I wanted to use that but we can't. We're stuck on version 7 for now, so we have to use project which is the best option available for that version.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah missed that sorry! Looking good tehn!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, I have a plan to get us on 8, but it's blocked on the eslint AirBNB packages updating their dependencies. It will coincide with ESLint v9 support too which is handy. I'm tracking it here: airbnb/javascript#2961

},
"plugins": ["@typescript-eslint/eslint-plugin"],
"extends": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@babbel/eslint-config",
"version": "2.1.0",
"version": "2.1.1",
"author": "Eric L. Goldstein <egoldstein@babbel.com>",
"description": "Hierarchical ESLint configuration collection that intends to be simple to use, layered, and shared with others",
"keywords": [
Expand Down