Skip to content

wip: feat(linter): add eslint/no-explicity-any#519

Closed
manuschillerdev wants to merge 6 commits intooxc-project:mainfrom
manuschillerdev:feat/no-explicit-any
Closed

wip: feat(linter): add eslint/no-explicity-any#519
manuschillerdev wants to merge 6 commits intooxc-project:mainfrom
manuschillerdev:feat/no-explicit-any

Conversation

@manuschillerdev
Copy link
Copy Markdown

@manuschillerdev manuschillerdev commented Jul 5, 2023

This implements the no-explicit-any rule for the typescript linter.

  • implement basic checks
  • add basic test cases
  • add configuration options
  • branch linting via configuration options
  • use configuration options in testcases
  • check against contribution guidelines of the project :)


#[derive(Debug, Error, Diagnostic)]
#[error(
"typescript-eslint(no-explicit-any): Using any disables many type checking rules and is generally best used only as a last resort or when prototyping code"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

todo: check which labels/descriptions would be appropriate here

@manuschillerdev manuschillerdev changed the title wip: Feat/no explicit any wip: feat(linter): add eslint/no-explicity-any Jul 5, 2023
/// const ages: Array<any> = ['seventeen'];
/// ```
NoExplicitAny,
correctness
Copy link
Copy Markdown
Author

@manuschillerdev manuschillerdev Jul 5, 2023

Choose a reason for hiding this comment

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

typescript::no_non_null_asserted_optional_chain,
typescript::no_unnecessary_type_constraint
typescript::no_unnecessary_type_constraint,
typescript::no_explicit_any
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick: mind putting this in order alphabetically?

#[error(
"typescript-eslint(no-explicit-any): Using any disables many type checking rules and is generally best used only as a last resort or when prototyping code"
)]
#[diagnostic(severity(warning))]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No diagnostic?

@Boshen Boshen marked this pull request as draft July 7, 2023 10:48
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ DonIsaac
❌ manuschillerikor
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the A-linter Area - Linter label Jul 28, 2023
@DonIsaac
Copy link
Copy Markdown
Contributor

@manuschillerdev any plans to complete this PR?

@Thiry1 Thiry1 mentioned this pull request Aug 12, 2023
DonIsaac added a commit that referenced this pull request Sep 10, 2023
Implements `no-explicit-any` from `typescript-eslint`. Replaces #519
since it appears abandoned.
@Boshen Boshen closed this Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants