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

Rule Change: add afterHashbangComment option to lines-around-comment #16913

Closed
1 task done
sosukesuzuki opened this issue Feb 21, 2023 · 3 comments · Fixed by #16920
Closed
1 task done

Rule Change: add afterHashbangComment option to lines-around-comment #16913

sosukesuzuki opened this issue Feb 21, 2023 · 3 comments · Fixed by #16920
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules

Comments

@sosukesuzuki
Copy link
Contributor

What rule do you want to change?

lines-around-comment

What change to do you want to make?

Generate more warnings

How do you think the change should be implemented?

A new option

Example code

#!foo
anyStatement;

What does the rule currently do for this code?

Does nothing

What will the rule do after it's changed?

Warns Expected line after comment with following options:

"lines-around-comment": ["error", { "afterHashbangComment": true }]

Participation

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

Additional comments

Hashbang Comment is added since ES2023

@sosukesuzuki sosukesuzuki added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules labels Feb 21, 2023
@Rec0iL99
Copy link
Member

Rec0iL99 commented Feb 21, 2023

Hi @sosukesuzuki, thanks for opening the issue. Currently, we are not adding any new options to the lines-around-comment rule due to the stylistic rules policy change.

But I'm not sure if I should close this, as hashbang comments are added in ES2023. I'll leave this open for someone from the @eslint/eslint-team to have a better look.

@mdjermanovic
Copy link
Member

We can consider this option as it adds support for a newly-added ECMAScript feature.

The proposal makes sense to me 👍

@nzakas nzakas added the accepted There is consensus among the team that this change meets the criteria for inclusion label Feb 21, 2023
@nzakas
Copy link
Member

nzakas commented Feb 21, 2023

No objections from me as it's newly-introduced syntax.

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Aug 24, 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 Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants