Permalink
Branch: master
Commits on Feb 19, 2019
  1. chore(*): Enable comma-dangle (#271)

    bradzacher committed Feb 19, 2019
    As per the discussion on slack.
    Enable `comma-dangle` eslint rule + prettier config.
    Good for two reasons:
    1) (the main reason) It will create less noise in PRs:
    ```diff
     {
    -  "foo": true
    +  "foo": true,
    +  "bar": false
     }
    ```
    2) It makes reordering members easier because there is always a comma at the end.
    
    ----
    
    Steps to create this PR:
    1) add line in eslint config
    2) add prettier config
    3) run `yarn format`
    4) ???
    5) profit.
    
    No other code was manually touched in the making of this PR.
Commits on Feb 12, 2019
  1. docs(eslint-plugin): no-unnecessary-type-assertion: Add non-null oper…

    bradzacher committed Feb 12, 2019
    …ator example (#253)
    
    * docs(eslint-plugin): Add non-null operator example
    
    * format
Commits on Feb 11, 2019
  1. feat(eslint-plugin): Migrate plugin to ts (#120)

    bradzacher authored and JamesHenry committed Feb 11, 2019
Commits on Jan 23, 2019
  1. chore: add vscode shared config files (#126)

    bradzacher authored and JamesHenry committed Jan 23, 2019
Commits on Jan 18, 2019
  1. 1.0.0-rc.3

    bradzacher authored and JamesHenry committed Jan 15, 2019
  2. 1.0.0-rc.2

    bradzacher authored and JamesHenry committed Jan 9, 2019
  3. 1.0.0-rc.1

    bradzacher authored and JamesHenry committed Jan 2, 2019
  4. 1.0.0-rc.0

    bradzacher authored and JamesHenry committed Dec 22, 2018
  5. [FEAT] Recommended config (#261)

    bradzacher authored and JamesHenry committed Dec 22, 2018
    Fixes #144
    Requires ~~#259~~, ~~#260~~.
    
    - added a util to make it standardised and easier to add default config for a rule
    - configured recommended based on #144
      - purposely switched `recommended` prop to be `"error" | "warning" | false`
        - inside the eslint repo, it should be `true`. otherwise it's just a property that isn't used officially by eslint. It's truthy so `eslint-docs` still work.
      - changed recommended generator to accept `"error"`/`"warning"` for more configurability.
    - adjusted default config of certain rules that didn't match our recommendations.
  6. [FEAT] [BREAKING] [no-unused-vars] remove implicit dep on base rule (#…

    bradzacher authored and JamesHenry committed Dec 21, 2018
    …260)
    
    Similar to what we've done with both indent, and camelcase.
    Rather than forcing users to configure both our rule and the base rule (which has been a source of confusion), this lets users just use our rule.
    
    ```diff
     {
    -    "no-unused-vars": ["error", { config }],
    +    "no-unused-vars": "off",
    -    "typescript/no-unused-vars": "error",
    +    "typescript/no-unused-vars": ["error", { config }],
     }
    ```
  7. [BREAKING] [no-type-alias] simplify config (#259)

    bradzacher authored and JamesHenry committed Dec 21, 2018
    In standardising our config, we should *either* use booleans, or strings.
    
    Offering the ability to configure the rule via `true`/`false` as well as `"always"`/`"never"` makes the docs harder to understand.
    
    - [breaking] remove true/false options
    - cleanup tests/docs
    - switch to messageId
  8. Update package.json

    bradzacher authored and JamesHenry committed Dec 21, 2018
  9. Correct LICENCE file (still MIT)

    bradzacher authored and JamesHenry committed Dec 21, 2018
    Just correcting it so github shows the correct type..
  10. [FEAT] [indent] Extend the base rule to support TS nodes (#219)

    bradzacher authored and JamesHenry committed Dec 17, 2018
    Fixes #201
    Fixes #96
    Fixes eslint/typescript-eslint-parser#577
    
    The [base eslint implementation](https://github.com/eslint/eslint/blob/master/lib/rules/indent.js) purposely ignores nodes it doesn't know about (i.e. our TS nodes).
    
    Because of how the base rule is written, we have to override the implementation entirely.
  11. [CHORE] Add yarn check to precommit (#207)

    bradzacher authored and JamesHenry committed Dec 11, 2018
    https://yarnpkg.com/lang/en/docs/cli/check/#toc-yarn-check-verify-tree
    
    `yarn check` will ensure that your dependencies are up-to-date before committing.
    
    This ensures that when you raise a PR, travis will not fail due to an error introduced in a new version of a tool.
  12. [FEAT][BREAKING][2/2][member-delimiter-style] Separate single/multili…

    bradzacher authored and JamesHenry committed Dec 11, 2018
    …ne config (#206)
    
    * [FEAT][BREAKING][member-delimiter-style] Add handling for single line, enforce requireLast
    
    * switch to messageIds
    
    * [FEAT][BREAKING][2/2][member-delimiter-style] Separate single/multiline config
    
    * start updating tests to match new config
    
    * refactored tests to match new config
    
    * fix lint errors
    
    * remove unneeded call param
  13. [FEAT][BREAKING][1/2][member-delimiter-style] Better handling for sin…

    bradzacher authored and JamesHenry committed Dec 11, 2018
    …gle line (#203)
    
    This PR adds better handling for single line delimiters, and better enforces the `requrieLast` option.
    
    Fixes #92
    
    ## Single line delimiters
    
    Previously single line delimiters were either checked or not. This meant that if you used
    ```
    {
        delimiter: "none",
        ignoreSingleLine: false,
    }
    ```
    then the fixer would break your code by removing the delimiter from single line statements i.e.:
    ```TS
    interface Foo { bar: string, baz: number }
    // fixed to this broken line
    interface Foo { bar: string baz: number }
    ```
    
    ### Breaking change:
    - Removed option `ignoreSingleLine`
    - Added option `singleLine: "none" | "semi" | "comma"`
    
    `singleLine` works the same as `delimiter`, except for single line statements only.
    
    ## Stricter `requireLast`
    
    Previously `requireLast` did nothing when turned off, and enforced having a delimiter when turned on.
    
    I felt this was inconsistent with the goals of the linter; being a tool to provide consistent coding conventions.
    
    This is the first of two changes to bring the option into line with eslint's [`comma-dangle`](https://eslint.org/docs/rules/comma-dangle#options). (The next change will replace the boolean with an enum; I didn't want to overload this PR).
    
    ### Breaking change:
    - `requireLast: false` now enforces that there is no delimiter on the last member.
  14. [CHORE] update yarn.lock

    bradzacher authored and JamesHenry committed Dec 6, 2018
  15. [CHORE] Add vscode debug config

    bradzacher authored and JamesHenry committed Dec 4, 2018
  16. [DOCS] Direct people to the old readme

    bradzacher authored and JamesHenry committed Dec 1, 2018
    Fixes #198 #199
  17. [DOCS] Add CONTRIBUTING.md, disable vscode autoformat (#192)

    bradzacher authored and JamesHenry committed Nov 28, 2018
    The vscode autoformatter is completely at odds with prettier, so if you don't have the prettier extension installed, you end up with wild changes.
    
    Additionally if you've got both the beautify and prettier extensions installed, it can cause some serious issues.
    
    Forcing it to be on will probably cause a lot of headaches to anyone trying to contribute unless they get their environment setup perfectly (sorry @weirdpattern for earlier!!)
  18. [CHORE] switched to prettier-eslint and added vscode config (#182)

    bradzacher authored and JamesHenry committed Nov 27, 2018
    Added config for the vscode prettier extension because I got sick of manually formatting and relying on the on commit formatter..
    
    Also switched to `prettier-eslint` so that the eslint fixers get auto-run by the format process.
  19. v0.14.0

    bradzacher authored and JamesHenry committed Nov 26, 2018
  20. [FIX][no-unused-vars] assume constructor parameter args are used (#173)

    bradzacher authored and JamesHenry committed Nov 21, 2018
    Fixes #150
    
    Whilst `TSParameterProperty`s are arguments, they are also technically class properties.
    `no-unused-vars` has no handling for class properties, so just mark them as used.
  21. Add yarn.lock

    bradzacher authored and JamesHenry committed Nov 17, 2018