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

chore: use @typescript-eslint/parser as the default parser #273

Conversation

87xie
Copy link
Contributor

@87xie 87xie commented Feb 21, 2024

What

Adding parser: "@typescript-eslint/parser" as the default parser allows ESLint to lint *.(ts|tsx) files.

Before

I am adding an unused variable in src/config.ts leads to the expectation of receiving an error from the no-unused-vars rule in the output. However, ESLint fails to recognize the import type syntax.

import type { Site, SocialObjects } from "./types";

const foo = ""; // <-- unused variable

// skip

image

After

image

improving DX in VS Code with the ESLint extension for better error detection.

image

@satnaing
Copy link
Owner

Thanks.

@satnaing satnaing merged commit eba0372 into satnaing:main Jul 14, 2024
@87xie 87xie deleted the chore/use-typescript-eslint-as-the-default-parser branch July 14, 2024 09:21
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

Successfully merging this pull request may close these issues.

2 participants