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

Extend recommended plugin rules in all configs #156

Merged
merged 3 commits into from
Apr 2, 2021

Conversation

rekmarks
Copy link
Member

@rekmarks rekmarks commented Apr 1, 2021

This PR extends the recommended rules of the corresponding plugin for the mocha, nodejs, and typescript configs.

The nodejs recommended rules added a single, deprecated core rule, which we now disable in our config.

The mocha recommended rules adds mocha/no-exports, which seems good.

The typescript recommended rules adds a bunch of previously absent rules to the snapshot for that config, however almost all of them are already disabled in our base config. In f30711b, I removed some extraneous rules, which you'll notice didn't affect the snapshot.

Following this PR, I will remove all rules that we specify that are identical to those we find in the plugins' recommended rule sets. Then, we can publish a new major version of this package and start using it.

@rekmarks rekmarks requested a review from a team as a code owner April 1, 2021 23:33
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM aside from the one question I had

"no-unused-expressions": "off",
"no-unused-vars": "off",
"no-use-before-define": "off",
"no-useless-constructor": "off",
"no-var": "error",
Copy link
Member

Choose a reason for hiding this comment

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

These four seem new 🤔 These aren't even TypeScript rules. What's going on here?

Copy link
Member Author

@rekmarks rekmarks Apr 2, 2021

Choose a reason for hiding this comment

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

These come from the plugin:@typescript-eslint/eslint-recommended config (source), which is extended by plugin:@typescript-eslint/recommended (source).

They discuss it in their readme.

Copy link
Member

Choose a reason for hiding this comment

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

Got it, thanks. Makes sense.

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@rekmarks rekmarks merged commit 282ef52 into main Apr 2, 2021
@rekmarks rekmarks deleted the extend-recommended-rules branch April 2, 2021 15:42
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.

None yet

2 participants