Skip to content

[rule links] reduce visual clutter proposal #750

@hshoff

Description

@hshoff

My quest for less clutter continues (#695)

meteor/javascript has a clever solution for rule linking, they inline the eslint logo and link to the rule.

I propose we adopt a similar style but with links at the end.

Current

  • 2.1 Use const for all of your references; avoid using var. eslint: prefer-const, no-const-assign

    Why? This ensures that you can't reassign your references, which can lead to bugs and difficult to comprehend code.

    // bad
    var a = 1;
    var b = 2;
    
    // good
    const a = 1;
    const b = 2;
  • 2.2 If you must reassign references, use let instead of var. eslint: no-var jscs: disallowVar

    Why? let is block-scoped rather than function-scoped like var.

Proposal

  • 2.1 Use const for all of your references; avoid using var. prefer-constno-const-assign

    Why? This ensures that you can't reassign your references, which can lead to bugs and difficult to comprehend code.

    // bad
    var a = 1;
    var b = 2;
    
    // good
    const a = 1;
    const b = 2;
  • 2.2 If you must reassign references, use let instead of var. prefer-const disallowVar

    Why? let is block-scoped rather than function-scoped like var.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions