Releases: neofinancial/eslint-config-neo
Releases · neofinancial/eslint-config-neo
v0.6.4
Changelog
- Enforce curlies on
if...else
statements with thecurly
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
v0.6.1
v0.6.0
- Update dependencies to support TypeScript 4, ESLint 7 and Prettier 2
- Add
config-backend-next
andconfig-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