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

☂️ typescript-eslint #503

Closed
nulladdict opened this issue Jun 30, 2023 · 9 comments
Closed

☂️ typescript-eslint #503

nulladdict opened this issue Jun 30, 2023 · 9 comments
Labels
A-linter Area - Linter good first issue Experience Level - Good for newcomers

Comments

@nulladdict
Copy link

nulladdict commented Jun 30, 2023

Warning

This comment is maintained by CI. Do not edit this comment directly.
To update comment template, see https://github.com/oxc-project/oxc/tree/main/tasks/lint_rules

This is tracking issue for @typescript-eslint/eslint-plugin.

Rules

  • Kind: 🍀 = recommended | ⚠️ = deprecated
  • Status: ✨ = implemented | 🚫 = not supported
Name Kind Status Docs
typescript/adjacent-overload-signatures 🍀 https://typescript-eslint.io/rules/adjacent-overload-signatures
typescript/array-type 🍀 https://typescript-eslint.io/rules/array-type
typescript/ban-ts-comment 🍀 https://typescript-eslint.io/rules/ban-ts-comment
typescript/ban-tslint-comment 🍀 https://typescript-eslint.io/rules/ban-tslint-comment
typescript/ban-types 🍀 https://typescript-eslint.io/rules/ban-types
typescript/block-spacing ⚠️ https://typescript-eslint.io/rules/block-spacing
typescript/brace-style ⚠️ https://typescript-eslint.io/rules/brace-style
typescript/class-literal-property-style 🍀 https://typescript-eslint.io/rules/class-literal-property-style
typescript/class-methods-use-this https://typescript-eslint.io/rules/class-methods-use-this
typescript/comma-dangle ⚠️ https://typescript-eslint.io/rules/comma-dangle
typescript/comma-spacing ⚠️ https://typescript-eslint.io/rules/comma-spacing
typescript/consistent-generic-constructors 🍀 https://typescript-eslint.io/rules/consistent-generic-constructors
typescript/consistent-indexed-object-style 🍀 https://typescript-eslint.io/rules/consistent-indexed-object-style
typescript/consistent-type-assertions 🍀 https://typescript-eslint.io/rules/consistent-type-assertions
typescript/consistent-type-definitions 🍀 https://typescript-eslint.io/rules/consistent-type-definitions
typescript/consistent-type-imports https://typescript-eslint.io/rules/consistent-type-imports
typescript/default-param-last https://typescript-eslint.io/rules/default-param-last
typescript/explicit-function-return-type https://typescript-eslint.io/rules/explicit-function-return-type
typescript/explicit-member-accessibility https://typescript-eslint.io/rules/explicit-member-accessibility
typescript/explicit-module-boundary-types https://typescript-eslint.io/rules/explicit-module-boundary-types
typescript/func-call-spacing ⚠️ https://typescript-eslint.io/rules/func-call-spacing
typescript/indent ⚠️ https://typescript-eslint.io/rules/indent
typescript/init-declarations https://typescript-eslint.io/rules/init-declarations
typescript/key-spacing ⚠️ https://typescript-eslint.io/rules/key-spacing
typescript/keyword-spacing ⚠️ https://typescript-eslint.io/rules/keyword-spacing
typescript/lines-around-comment ⚠️ https://typescript-eslint.io/rules/lines-around-comment
typescript/lines-between-class-members ⚠️ https://typescript-eslint.io/rules/lines-between-class-members
typescript/max-params https://typescript-eslint.io/rules/max-params
typescript/member-delimiter-style ⚠️ https://typescript-eslint.io/rules/member-delimiter-style
typescript/member-ordering https://typescript-eslint.io/rules/member-ordering
typescript/method-signature-style https://typescript-eslint.io/rules/method-signature-style
typescript/no-array-constructor 🍀 https://typescript-eslint.io/rules/no-array-constructor
typescript/no-confusing-non-null-assertion 🍀 https://typescript-eslint.io/rules/no-confusing-non-null-assertion
typescript/no-dupe-class-members https://typescript-eslint.io/rules/no-dupe-class-members
typescript/no-duplicate-enum-values 🍀 https://typescript-eslint.io/rules/no-duplicate-enum-values
typescript/no-dynamic-delete 🍀 https://typescript-eslint.io/rules/no-dynamic-delete
typescript/no-empty-function 🍀 https://typescript-eslint.io/rules/no-empty-function
typescript/no-empty-interface 🍀 https://typescript-eslint.io/rules/no-empty-interface
typescript/no-explicit-any 🍀 https://typescript-eslint.io/rules/no-explicit-any
typescript/no-extra-non-null-assertion 🍀 https://typescript-eslint.io/rules/no-extra-non-null-assertion
typescript/no-extra-parens ⚠️ https://typescript-eslint.io/rules/no-extra-parens
typescript/no-extra-semi ⚠️ https://typescript-eslint.io/rules/no-extra-semi
typescript/no-extraneous-class 🍀 https://typescript-eslint.io/rules/no-extraneous-class
typescript/no-import-type-side-effects https://typescript-eslint.io/rules/no-import-type-side-effects
typescript/no-inferrable-types 🍀 https://typescript-eslint.io/rules/no-inferrable-types
typescript/no-invalid-this https://typescript-eslint.io/rules/no-invalid-this
typescript/no-invalid-void-type 🍀 https://typescript-eslint.io/rules/no-invalid-void-type
typescript/no-loop-func https://typescript-eslint.io/rules/no-loop-func
typescript/no-loss-of-precision 🍀 https://typescript-eslint.io/rules/no-loss-of-precision
typescript/no-magic-numbers https://typescript-eslint.io/rules/no-magic-numbers
typescript/no-misused-new 🍀 https://typescript-eslint.io/rules/no-misused-new
typescript/no-namespace 🍀 https://typescript-eslint.io/rules/no-namespace
typescript/no-non-null-asserted-nullish-coalescing 🍀 https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing
typescript/no-non-null-asserted-optional-chain 🍀 https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain
typescript/no-non-null-assertion 🍀 https://typescript-eslint.io/rules/no-non-null-assertion
typescript/no-redeclare https://typescript-eslint.io/rules/no-redeclare
typescript/no-require-imports https://typescript-eslint.io/rules/no-require-imports
typescript/no-restricted-imports https://typescript-eslint.io/rules/no-restricted-imports
typescript/no-shadow https://typescript-eslint.io/rules/no-shadow
typescript/no-this-alias 🍀 https://typescript-eslint.io/rules/no-this-alias
typescript/no-type-alias ⚠️ https://typescript-eslint.io/rules/no-type-alias
typescript/no-unnecessary-type-constraint 🍀 https://typescript-eslint.io/rules/no-unnecessary-type-constraint
typescript/no-unsafe-declaration-merging 🍀 https://typescript-eslint.io/rules/no-unsafe-declaration-merging
typescript/no-unused-expressions https://typescript-eslint.io/rules/no-unused-expressions
typescript/no-unused-vars 🍀 https://typescript-eslint.io/rules/no-unused-vars
typescript/no-use-before-define https://typescript-eslint.io/rules/no-use-before-define
typescript/no-useless-constructor 🍀 https://typescript-eslint.io/rules/no-useless-constructor
typescript/no-useless-empty-export https://typescript-eslint.io/rules/no-useless-empty-export
typescript/no-var-requires 🍀 https://typescript-eslint.io/rules/no-var-requires
typescript/object-curly-spacing ⚠️ https://typescript-eslint.io/rules/object-curly-spacing
typescript/padding-line-between-statements ⚠️ https://typescript-eslint.io/rules/padding-line-between-statements
typescript/parameter-properties https://typescript-eslint.io/rules/parameter-properties
typescript/prefer-as-const 🍀 https://typescript-eslint.io/rules/prefer-as-const
typescript/prefer-enum-initializers https://typescript-eslint.io/rules/prefer-enum-initializers
typescript/prefer-for-of 🍀 https://typescript-eslint.io/rules/prefer-for-of
typescript/prefer-function-type 🍀 https://typescript-eslint.io/rules/prefer-function-type
typescript/prefer-literal-enum-member 🍀 https://typescript-eslint.io/rules/prefer-literal-enum-member
typescript/prefer-namespace-keyword 🍀 https://typescript-eslint.io/rules/prefer-namespace-keyword
typescript/prefer-ts-expect-error 🍀 https://typescript-eslint.io/rules/prefer-ts-expect-error
typescript/quotes ⚠️ https://typescript-eslint.io/rules/quotes
typescript/semi ⚠️ https://typescript-eslint.io/rules/semi
typescript/sort-type-constituents https://typescript-eslint.io/rules/sort-type-constituents
typescript/space-before-blocks ⚠️ https://typescript-eslint.io/rules/space-before-blocks
typescript/space-before-function-paren ⚠️ https://typescript-eslint.io/rules/space-before-function-paren
typescript/space-infix-ops ⚠️ https://typescript-eslint.io/rules/space-infix-ops
typescript/triple-slash-reference 🍀 https://typescript-eslint.io/rules/triple-slash-reference
typescript/type-annotation-spacing ⚠️ https://typescript-eslint.io/rules/type-annotation-spacing
typescript/typedef https://typescript-eslint.io/rules/typedef
typescript/unified-signatures 🍀 https://typescript-eslint.io/rules/unified-signatures

Getting started

just new-typescript-rule <RULE_NAME>

Then register the rule in crates/oxc_linter/src/rules.rs and also declare_all_lint_rules at the bottom.

@Boshen
Copy link
Member

Boshen commented Jun 30, 2023

Yes! Let's port the recommended list that don't require type information. As a bonus, we should copy over the test suite for extension rules.

@nulladdict Keen to join the fun?

@nulladdict
Copy link
Author

Not sure if I have enough rust experience and enough domain knowledge, so I wouldn't count on me :)

@Boshen
Copy link
Member

Boshen commented Jun 30, 2023

Not sure if I have enough rust experience and enough domain knowledge, so I wouldn't count on me :)

No worries

@metreniuk
Copy link
Contributor

@nulladdict @Boshen the @typescript-eslint/prefer-namespace-keyword rule becomes redundant if @typescript-eslint/no-namespace is enabled. Do you think we still need to implement it in case the user wants to disable/configure the rules?

Boshen pushed a commit that referenced this issue Aug 10, 2023
implement @typescript-eslint/prefer-as-const
Related issue: #503.
@Boshen
Copy link
Member

Boshen commented Aug 10, 2023

@typescript-eslint/prefer-namespace-keyword

It's moved to @typescript-eslint/stylistic in v6, so we don't need it anymore.

See https://typescript-eslint.io/rules/prefer-namespace-keyword

@Thiry1

This comment was marked as resolved.

@Boshen
Copy link
Member

Boshen commented Aug 12, 2023

@Thiry1 Thank you, I updated the main list.

Boshen pushed a commit that referenced this issue Aug 12, 2023
Boshen pushed a commit that referenced this issue Aug 15, 2023
related to #503, marked as nursery(though all tests pass) since we use
rust `regex` crate to parse the regex, may have compatibility problems
with ECMA regex.
Boshen pushed a commit that referenced this issue Oct 3, 2023
Part of #503 -> `@typescript-eslint/ban-types`
@Boshen Boshen unpinned this issue Oct 10, 2023
@alfaproject
Copy link

Will type checking rules be considered for implementation at any point in time?

@Boshen Boshen changed the title ☂️ linter: @typescript-eslint/eslint-plugin recommended rules ☂️ linter: @typescript-eslint rules Jan 26, 2024
@Boshen Boshen changed the title ☂️ linter: @typescript-eslint rules ☂️ linter: typescript-eslint Jan 26, 2024
@Boshen Boshen changed the title ☂️ linter: typescript-eslint ☂️ typescript-eslint Jan 26, 2024
@Boshen
Copy link
Member

Boshen commented Jan 26, 2024

Close in favor of #2180 so the creator this issue don't get spammed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter good first issue Experience Level - Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants