Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

☂️ Rome classic lint rules, with scoping #2743

Closed
28 tasks done
ematipico opened this issue Jun 20, 2022 · 7 comments
Closed
28 tasks done

☂️ Rome classic lint rules, with scoping #2743

ematipico opened this issue Jun 20, 2022 · 7 comments
Assignees
Labels
A-Linter Area: linter umbrella Issue to track a collection of other issues
Milestone

Comments

@ematipico
Copy link
Contributor

ematipico commented Jun 20, 2022

Note

This rules should be implemented once #2488 is closed.

This is because in order to correctly implement the rule, there's need to have access to the scope.

If you want to contribute

  1. make sure you understand the requirements of the rule you would like to implement;
  2. comment on this very issue telling saying which rule you would like to implement;
  3. create a new task issue and link to this very umbrella issue (a member of the team will eventually assign it to you);
  4. open a PR;

Note: please make sure to comment the issue saying which rule you'd like to implement, this would allow better coordination between contributors. Failing to do so would penalize yourselves against contributors that had followed these simple guildelines

Note: follow the naming convention guidelines: https://github.com/rome/tools/blob/archived-js/CONTRIBUTING.md#naming-patterns

List of rules that might require scoping resolution

Note: this rule requires access to the filename, which is not implemented yet

  • useDefaultExportBasename
    Enforce the name of the file and the name of the default function / class export matches
  • noSingleCharRegexAlternatives #2754 (requires parsing of regex)
  • useTsExpectErrorPrefer #2753

    At the moment the linter lacks two capabilities requires to implement this, the first and most important is the ability for lint rules (and visitors) to inspect syntax tokens (currently lint rules can only query AST nodes), while a secondary one would be to allow rules to be enabled or disabled on a per-language basis: currently the existing JSX and TS rules are enabled all the time which isn't really a problem since they only query node for their language and thus never match in incompatible files, but if this rule needs to inspect all tokens we would want it to be disabled on non-TS files.

  • useSortedSpecifiers #2755 (might be implemented in the formatter)
@ematipico ematipico added umbrella Issue to track a collection of other issues A-Linter Area: linter labels Jun 20, 2022
@ematipico ematipico changed the title ☂️ Port old Rome lint rules, with scoping ☂️ Rome classic lint rules, with scoping Jun 20, 2022
@Conaclos
Copy link
Contributor

Conaclos commented Jul 7, 2022

Some links are dead.

@ematipico
Copy link
Contributor Author

Some links are dead.

Thank you! They should be fixed now

@IWANABETHATGUY
Copy link
Contributor

IWANABETHATGUY commented Jul 8, 2022

@ematipico would you mind assigning me the task noCatchAssign? The related issue is here #2848

@IWANABETHATGUY
Copy link
Contributor

@ematipico , would you mind assigning me the task noImportAssign? Related issue #2923

@IWANABETHATGUY
Copy link
Contributor

noImportAssign is already merged.

@ematipico
Copy link
Contributor Author

I will work on useButtonType

@ematipico ematipico pinned this issue Sep 16, 2022
@ematipico
Copy link
Contributor Author

The rule noFindDOMNode was mainly a warning of using an API meant to be deprecated. The API is now deprecated, so maybe we don't need this rule anymore

@ematipico ematipico self-assigned this Sep 29, 2022
@ematipico ematipico added this to the 10.0.0 milestone Sep 29, 2022
@ematipico ematipico unpinned this issue Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter umbrella Issue to track a collection of other issues
Projects
Status: Done
Development

No branches or pull requests

4 participants