Skip to content

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

@rakleed

Description

@rakleed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: easyProbably a quick fix. Want to contribute? :-)help wantedIf you're looking to contribute, this issue is a good place to start!

    Type

    No type

    Projects

    Status

    Low priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions