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

feat: add RuleCreator.withoutDocs #4136

Merged

Conversation

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

Allows this:

import { ESLintUtils } from '@typescript-eslint/experimental-utils';

const myRule = ESLintUtils.RuleCreator.withoutDocs({
  create(context) {
    // ...
  },
  meta: {
    // ...
  },
});

I'm not 100% attached to this particular API. I chose it because it forces people to import RuleCreator anyway and has a "you're not documenting this" name.

Adds a bit of JSDoc around the two functions to help make them clear in IDEs.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented Nov 13, 2021

✔️ Deploy Preview for typescript-eslint ready!

🔨 Explore the source changes: ba132ea

🔍 Inspect the deploy log: https://app.netlify.com/sites/typescript-eslint/deploys/61912c8fc1d6b400089c0f91

😎 Browse the preview: https://deploy-preview-4136--typescript-eslint.netlify.app

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft November 13, 2021 19:25
@codecov
Copy link

codecov bot commented Nov 13, 2021

Codecov Report

Merging #4136 (ba132ea) into master (ae0fb5a) will decrease coverage by 0.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4136      +/-   ##
==========================================
- Coverage   93.35%   93.14%   -0.22%     
==========================================
  Files         152      157       +5     
  Lines        8035     8251     +216     
  Branches     2579     2640      +61     
==========================================
+ Hits         7501     7685     +184     
- Misses        180      192      +12     
- Partials      354      374      +20     
Flag Coverage Δ
unittest 93.14% <100.00%> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...lugin/src/rules/no-confusing-non-null-assertion.ts 82.60% <ø> (ø)
...rc/rules/no-unnecessary-boolean-literal-compare.ts 93.50% <ø> (ø)
packages/eslint-plugin/src/rules/prefer-for-of.ts 90.00% <ø> (ø)
...plugin/src/rules/prefer-string-starts-ends-with.ts 97.83% <ø> (ø)
.../eslint-plugin/src/rules/restrict-plus-operands.ts 100.00% <ø> (ø)
...kages/eslint-plugin/src/rules/no-base-to-string.ts 98.48% <100.00%> (+0.02%) ⬆️
...gin-internal/src/rules/no-poorly-typed-ts-props.ts 88.88% <0.00%> (ø)
...lugin-internal/src/rules/plugin-test-formatting.ts 81.34% <0.00%> (ø)
...plugin-internal/src/rules/prefer-ast-types-enum.ts 91.30% <0.00%> (ø)
...-internal/src/rules/no-typescript-estree-import.ts 87.50% <0.00%> (ø)
... and 1 more

@bradzacher bradzacher added the enhancement New feature or request label Nov 14, 2021
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

@bradzacher bradzacher merged commit 87cfc6a into typescript-eslint:master Nov 14, 2021
@JoshuaKGoldberg JoshuaKGoldberg deleted the rule-creator-without-docs branch November 14, 2021 22:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuleCreator's types do not support rules without a documentation URL
2 participants