Skip to content

Commit

Permalink
Remove strict-boolean-expressions rule. This rule effectively prevent…
Browse files Browse the repository at this point in the history
…s the use of short-circuit logical operators (|| and &&).
  • Loading branch information
Filip Maj committed Aug 9, 2021
1 parent 226e219 commit 8a6d062
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// the communities' recommended styles for the technologies used as we can. When, and only when, we have a stated need
// to differentiate, we add more rules (or modify options). Therefore, the fewer rules directly defined in this file,
// the better.
//

const jsDocPlugin = require('eslint-plugin-jsdoc');

Expand Down Expand Up @@ -109,15 +108,6 @@ module.exports = {
'import/named': 'off',
'node/no-missing-import': 'off',

// Prevent using non-boolean types as conditions. This ensures we're not relying on implicit type coercions in
// conditionals, which can lead to unintended behavior.
// NOTE: Consider contributing this to the `airbnb-typescript` config. https://github.com/airbnb/javascript#comparison--shortcuts
'@typescript-eslint/strict-boolean-expressions': ['error', {
allowString: false,
allowNumber: false,
allowNullableObject: false,
}],

// Prefer an interface declaration over a type alias because interfaces can be extended, implemented, and merged
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],

Expand Down

0 comments on commit 8a6d062

Please sign in to comment.