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

New Rule: prefer-jsdoc #17171

Closed
1 task
tjx666 opened this issue May 10, 2023 · 1 comment
Closed
1 task

New Rule: prefer-jsdoc #17171

tjx666 opened this issue May 10, 2023 · 1 comment
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules

Comments

@tjx666
Copy link

tjx666 commented May 10, 2023

Rule details

jsdoc can provide useful documentation with IDE integration.

Related ECMAScript feature

no

What type of rule is this?

Enforces a formatting/stylistic preference

Example code

case one: object property

const person = {
    name: 'ly',
    // some description op top of property
    age: 18, // some description after property
};


case 2: typescript interface, should also work for type, enum

```typescript
interface Options {
    // default value is ['.js', '.ts']
    extensions: String[]; // default value is ['.js', '.ts']
}

case 3: function

// compute sum of two numbers
function add(a, b) {
    
}

Why should this rule be in the core instead of a plugin?

gajus/eslint-plugin-jsdoc#1002 (comment)

Participation

  • I am willing to submit a pull request to implement this rule.

Additional comments

No response

@tjx666 tjx666 added feature This change adds a new feature to ESLint rule Relates to ESLint's core rules labels May 10, 2023
@aladdin-add
Copy link
Member

Per our rules policies, we can only accept new rules if they relate to new ECMAScript features that reached stage 4 in the preceding 12 months, so this proposal doesn't qualify. You can always make a custom rule and publish a plugin.

@aladdin-add aladdin-add closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2023
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Nov 7, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
Archived in project
Development

No branches or pull requests

2 participants