1. 12 Jul, 2019 4 commits
  2. 11 Jul, 2019 1 commit
  3. 10 Jul, 2019 5 commits
  4. 09 Jul, 2019 4 commits
  5. 08 Jul, 2019 3 commits
  6. 05 Jul, 2019 4 commits
    • Florian Müllner's avatar
      params: Fix regression · 8a5de327
      Florian Müllner authored
      The first parameter to Object.assign() is the same target object that
      will be returned. That is, since commit 46874eed Params.parse() modifies
      the @defaults object. Usually we pass that parameter as an object literal
      and this isn't an issue, but the change breaks spectacularly in the few
      cases where we use a re-usable variable.
      
      Restore the previous behavior by copying the object first.
      
      !615
      8a5de327
    • Florian Müllner's avatar
      cleanup: Prefer template strings · 0d035a4e
      Florian Müllner authored
      Template strings are much nicer than string concatenation, so use
      them where possible; this excludes translatable strings and any
      strings containing '/' (until we can depend on gettext >= 0.20[0]).
      
      [0] https://savannah.gnu.org/bugs/?50920
      
      !612
      0d035a4e
    • Florian Müllner's avatar
      params: Simplify code · 46874eed
      Florian Müllner authored
      Standard javascript now has Object.assign() which is very similar to
      Params.parse(), except that the latter by default disallows "extra"
      parameters. We can still leverage the standard API by simply
      implementing the error check, and then call out to Object.assign()
      for the actual parameter merging.
      
      !612
      46874eed
    • Florian Müllner's avatar
      ibusManager: Use Map to store engines · e95f3feb
      Florian Müllner authored
      This is a clear case of key->value mapping, so using the corresponding
      data type makes sense.
      
      !612
      e95f3feb
  7. 03 Jul, 2019 1 commit
  8. 02 Jul, 2019 10 commits
  9. 01 Jul, 2019 8 commits
    • Florian Müllner's avatar
      style: Use camelCase for variable names · 4c520695
      Florian Müllner authored
      Spotted by eslint.
      
      !607
      4c520695
    • Florian Müllner's avatar
      style: Fix brace style · 8fda3116
      Florian Müllner authored
      Opening braces should be on the same line as the associated statement,
      and only be omitted if both surrounding blocks are one-liners.
      
      Partially spotted by eslint.
      
      !607
      8fda3116
    • Florian Müllner's avatar
      style: Fix stray/missing spaces · 7ac35c64
      Florian Müllner authored
      Spotted by eslint.
      
      !607
      7ac35c64
    • Florian Müllner's avatar
      style: Fix stray/missing semi-colons · 29b04fcb
      Florian Müllner authored
      Spotted by eslint.
      
      !607
      29b04fcb
    • Florian Müllner's avatar
      style: Avoid trailing commas in array destructuring · 55235c25
      Florian Müllner authored
      When destructuring multiple return values, we often use trailing commas
      to indicate that there are additional elements that we are ignoring.
      
      There isn't anything inherently wrong with that, but it's a style that's
      too confusing for eslint - on the one hand we require a space after a
      comma, on the other hand we require no space before closing brackets.
      
      !607
      55235c25
    • Florian Müllner's avatar
      style: Use space after catch · f2506433
      Florian Müllner authored
      We are currently inconsistent with whether or not to put a space
      after catch clauses. While the predominant style is to omit it,
      that's inconsistent with the style we use for any other statement.
      There's not really a good reason to stick with it, so switch to
      the style gjs/eslint default to.
      
      !607
      f2506433
    • Florian Müllner's avatar
      cleanup: Avoid variable declarations in case clauses · d008c6c5
      Florian Müllner authored
      While allowed by the syntax, they are problematic because the
      variable is in the scope of the switch() statement, but only
      valid if a particular case clause is reached.
      
      Add braces to limit the variables' scope to the corresponding
      case clause to avoid that problem.
      
      Spotted by eslint.
      
      !607
      d008c6c5
    • Florian Müllner's avatar
      cleanup: Avoid implicit coercion · e2e02c9a
      Florian Müllner authored
      Converting a variable to a particular type can be done explicitly (with
      functions like Number() or toString()) or implicitly by relying on type
      coercion (like concatenating a variable to the empty string to force
      a string, or multiplying it with 1 to force a number).
      
      As those tend to be less readable and clear, they are best avoided. So
      replace the cases of string coercion we use with template strings, and
      clarify the places that can be confused with number coercion.
      
      !607
      e2e02c9a