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(eslint-plugin): add new rule prefer-as-const #1431

Merged
merged 12 commits into from Jan 21, 2020
Merged

feat(eslint-plugin): add new rule prefer-as-const #1431

merged 12 commits into from Jan 21, 2020

Conversation

armano2
Copy link
Member

@armano2 armano2 commented Jan 11, 2020

fixes #312

@armano2 armano2 added the package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin label Jan 11, 2020
@armano2 armano2 self-assigned this Jan 11, 2020
@typescript-eslint

This comment has been minimized.

@armano2 armano2 added the enhancement: new plugin rule New rule request for eslint-plugin label Jan 11, 2020
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.

two suggestions. otherwise lgtm

packages/eslint-plugin/docs/rules/prefer-as-const.md Outdated Show resolved Hide resolved
packages/eslint-plugin/src/rules/prefer-as-const.ts Outdated Show resolved Hide resolved
@armano2
Copy link
Member Author

armano2 commented Jan 18, 2020

as recommended i added 2 optional fixers for variable case

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.

LGTM - thanks!

@bradzacher bradzacher merged commit 420db96 into typescript-eslint:master Jan 21, 2020
@armano2 armano2 deleted the prefer-as-const branch January 21, 2020 03:11
mightyiam added a commit to mightyiam/eslint-config-love that referenced this pull request Feb 4, 2020
BREAKING CHANGE: new rule @typescript-eslint/ban-ts-comment
typescript-eslint/typescript-eslint#1361

BREAKING CHANGE: new rule @typescript-eslint/prefer-as-const
typescript-eslint/typescript-eslint#1431

Closes #218.
mightyiam added a commit to mightyiam/eslint-config-love that referenced this pull request Feb 11, 2020
BREAKING CHANGE: new rule @typescript-eslint/prefer-as-const
typescript-eslint/typescript-eslint#1431

Closes #218.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: new plugin rule New rule request for eslint-plugin package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule proposal: prefer as const
2 participants