Skip to content

.eslintrc doesn't override defaults #498

@Js-Brecht

Description

@Js-Brecht

Current Behavior

My .eslintrc settings are ignored.

Expected behavior

If I define a .eslintrc in my repository, I expect its rules, and its rules alone, to be used. I do not ever, under any circumstances, want a dependency to set things that I cannot change, especially when it comes to linting/formatting my code.

Suggested solution(s)

Currently, settings from the package.json.eslint property will override any configurations during linting, but not the rules from .eslintrc. This is not ideal. I prefer to use .eslintrc or .eslintrc.js to define my eslint rules, since I find that it makes my life a little easier. Instead of having to go digging through my package.json to find my eslint rules any time I need to make changes, I can just go straight to where they are defined. package.json can already wind up with quite a bit of information in it, and eslint rules can also wind up being extensive. Easier to keep them segregated.

Not to mention, vscode-eslint doesn't care about package.json.eslint settings. So, if I want to make changes to my eslint, I now have to do it in two places.

If using .eslintrc is not a desired behavior, perhaps it might be better to let users opt out of tsdx's linting altogether? Mainly, the issue I have is during the build. When I need to lint my code, I can do it with eslint instead, which will use my rules as I have them configured.

Additional context

Other than that, I have to say, great tool! 👍

Your environment

Software Version(s)
TSDX 0.12.3
TypeScript 3.7.5
Browser n/a
npm/Yarn pnpm
Node 10.16.3
Operating System Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: integrationRelated to an integration, not necessarily to core (but could influence core)solution: workaround availableThere is a workaround available for this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions