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

Remove unused lint rules #73

Merged
merged 1 commit into from
Sep 9, 2021
Merged

Remove unused lint rules #73

merged 1 commit into from
Sep 9, 2021

Conversation

luin
Copy link
Member

@luin luin commented Sep 9, 2021

These rules that make linter looser are not used so can just remove them.
We can add them back when they become necessary.

Breaking changes

The only usage of any is AttributeMap. This PR changes it to unknown,
which can represent any types like any but requires type assertions or control
flow based narrowing. It can be considered as a type-safe version of any and as a library, it's better to use it instead of any to avoid users from writing type-unsafe code.

However, this introduces a breaking change for TypeScript users as they have to change their code to either narrowing the types explicitly or using as any as we currently do for them.

Test plan

Make sure lint passes.

These rules that make linter looser are not used so can just remove them.
We can add them back when they become necessary.

The only usage of `any` is `AttributeMap`. This PR changes it to `unknown`,
which can represent any types like `any` but requires type assertions or control
flow based narrowing. It can be considered as a type-safe version of `any` and as a library, it's better to use it instead of `any` to avoid users from writing type-unsafe code.

However, this introduces a breaking change for TypeScript users as they have to change their code to either narrowing the types explicitly or using `as any` as we currently do for them.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.964% when pulling 330ec89 on zh-remove-unused-rules into 21bcea6 on master.

@jhchen jhchen merged commit 4930968 into master Sep 9, 2021
@jhchen jhchen deleted the zh-remove-unused-rules branch September 9, 2021 23:46
@alecgibson alecgibson mentioned this pull request Feb 6, 2023
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

3 participants