Skip to content

Releases: neofinancial/eslint-config-neo

v0.6.4

27 Feb 21:17
c7ed7aa
Compare
Choose a tag to compare

Changelog

  • Enforce curlies on if...else statements with the curly rule

This patch aims to remove the need for reviewing shorthand if conditions. I am sure that we all have encountered this in code reviews quite a few times. This seems to fit our linter rules given the style guide making mention of always bracing if statements.

The way we enforce this is using the curly ESLint rule set as error.

Example

Writing code like the following

if (vimIsGreat) return true

Will emit the following error from ESLint

/Users/jorb/Code/neo/prequalification-service/src/domain/providers/jwt-validation/jwt-validation.provider.adapter.ts
  13:15  error    Expected { after 'if' condition  curly

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

Prompting the dev to write

if (vimIsGreat) {
    return true
}

\(^▽^)/

v0.6.2

29 Jan 18:19
e88dc8c
Compare
Choose a tag to compare
  • Disable no-useless-undefined rule in tests
  • Disable unicorn/prefer-set-has rule
  • Disable unicorn/prefer-trim-start-end rule

v0.6.1

22 Nov 18:47
4e33ff4
Compare
Choose a tag to compare
  • Disable no-null rule in base config

v0.6.0

22 Nov 18:46
7465722
Compare
Choose a tag to compare
  • Update dependencies to support TypeScript 4, ESLint 7 and Prettier 2
  • Add config-backend-next and config-frontend-next with rules being considered for a future release
  • Enable @typescript-eslint/no-unused-before-define rule as error in TypeScript files
  • Enable @typescript-eslint/prefer-optional-chain rule as warning
  • Enable unicorn/no-reduce rule as warning
  • Enable unicorn/prefer-optional-catch-binding rule as warning
  • Disable @typescript-eslint/explicit-module-boundary-types rule in test files
  • Disable @typescript-eslint/no-empty-function rule in test files

v0.5.2

09 Jan 21:09
39f12b4
Compare
Choose a tag to compare
  • Add varsIgnorePattern to @typescript-eslint/no-unused-vars rule

v0.5.1

28 Nov 01:07
fa0e944
Compare
Choose a tag to compare
  • Disable unicorn/catch-error-name rule
  • Disable unicorn/consistent-function-scoping rule

v0.5.0

25 Nov 00:37
aa36a89
Compare
Choose a tag to compare
  • Update @typescript-eslint and other dependencies to support optional chaining
  • Drop support for ESLint 5

v0.4.2

04 Nov 18:40
fa4da1e
Compare
Choose a tag to compare
  • Disable require-atomic-updates rule

v0.4.1

30 Oct 20:04
13780d0
Compare
Choose a tag to compare
  • Disable eslint-plugin-node rules that conflict with eslint-plugin-import
  • Enable Jest style rules

v0.4.0

30 Oct 20:04
Compare
Choose a tag to compare
  • Add support for ESLint 6
  • Update typescript-eslint to 2.4.0
  • Update all dependencies