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

[eslint-config] Ability to use in pure JavaScript projects #4989

Open
rakleed opened this issue Nov 3, 2024 · 1 comment
Open

[eslint-config] Ability to use in pure JavaScript projects #4989

rakleed opened this issue Nov 3, 2024 · 1 comment
Labels
effort: easy Probably a quick fix. Want to contribute? :-) help wanted If you're looking to contribute, this issue is a good place to start!

Comments

@rakleed
Copy link

rakleed commented Nov 3, 2024

Summary

I would like to use the config in a project without TypeScript, as it has useful rules regardless of the presence/absence of TypeScript.

Details

By default you only look at ts files and tsconfig.json, although js projects use jsconfig.json:

files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
// The "project" path is resolved relative to parserOptions.tsconfigRootDir.
// Your local .eslintrc.js must specify that parserOptions.tsconfigRootDir=__dirname.
project: './tsconfig.json',

It would be convenient if you made a separate config for JS projects, where these features would be taken into account.

Standard questions

Question Answer
@rushstack/eslint-config version? 4.0.2
Operating system? N/A
Would you consider contributing a PR? No
TypeScript compiler version? N/A
Node.js version (node -v)? N/A
@iclanton
Copy link
Member

iclanton commented Nov 4, 2024

We'd probably take this change, but all of our projects are in TypeScript, and TypeScript is the Rushstack recommended language, so we probably wouldn't put this change together ourselves. If someone else wants to take this on, go for it!

@iclanton iclanton moved this from Needs triage to Low priority in Bug Triage Nov 4, 2024
@iclanton iclanton added help wanted If you're looking to contribute, this issue is a good place to start! effort: easy Probably a quick fix. Want to contribute? :-) labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: easy Probably a quick fix. Want to contribute? :-) help wanted If you're looking to contribute, this issue is a good place to start!
Projects
Status: Low priority
Development

No branches or pull requests

2 participants