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

Use getRules and rule URL metadata where available #1067

Merged
merged 8 commits into from
Jan 18, 2018

Commits on Jan 18, 2018

  1. Send full rule metadata back from the worker

    Refactor the worker to send the full metadata instead of just the
    fixable rules, allowing additional functionality to be implemented in
    the main package code.
    Arcanemagus committed Jan 18, 2018
    Configuration menu
    Copy the full SHA
    1c2d394 View commit details
    Browse the repository at this point in the history
  2. Utilize URL from rule metadata

    The rule URL is now pulled directly from the metadata if it is
    available, falling back to the current method of using
    `eslint-rule-documentation` if the rule doesn't specify this for itself.
    Arcanemagus committed Jan 18, 2018
    Configuration menu
    Copy the full SHA
    6037f5e View commit details
    Browse the repository at this point in the history
  3. Use CLIEngine#getRules when available

    Rule gathering from the ESLint instance has been expanded to take
    advantage of the new `CLIEngine#getRules` method if it is available.
    Arcanemagus committed Jan 18, 2018
    Configuration menu
    Copy the full SHA
    57542e6 View commit details
    Browse the repository at this point in the history
  4. sendRules -> shouldSendRules

    Rename `sendRules` to `shouldSendRules` to make the purpose of the flag
    more clear.
    Arcanemagus committed Jan 18, 2018
    Configuration menu
    Copy the full SHA
    caf7d12 View commit details
    Browse the repository at this point in the history
  5. Simplify the logic behind didRulesChange

    Use a much simpler logic to determine whether the rule `Map`s are equal
    or not. Also fixes up the docblock a bit.
    Arcanemagus committed Jan 18, 2018
    Configuration menu
    Copy the full SHA
    ec95f43 View commit details
    Browse the repository at this point in the history
  6. Use Array.from on the rule Map

    Apparently `Array.from` is quite happy taking a `Map` object directly.
    Arcanemagus committed Jan 18, 2018
    Configuration menu
    Copy the full SHA
    6096bd4 View commit details
    Browse the repository at this point in the history
  7. Move rule related logic to a class

    Pull all the logic related to storing the list of known rules and
    accessing it out into a class of its own.
    Arcanemagus committed Jan 18, 2018
    Configuration menu
    Copy the full SHA
    03af716 View commit details
    Browse the repository at this point in the history
  8. Validate rules before replacing the current set

    Check that the given Array contains Arrays that "look" like the exected
    format: [String, Object].
    
    Also renames `updatedRules` to `replaceRules` since it is now taking
    advantage of the Map constructor to parse through the Array.
    Arcanemagus committed Jan 18, 2018
    Configuration menu
    Copy the full SHA
    deb5c31 View commit details
    Browse the repository at this point in the history