Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,21 @@ overrides:
import/no-restricted-paths: off
import/no-extraneous-dependencies: [error, { devDependencies: true }]
import/no-nodejs-modules: off
no-restricted-syntax: off
no-restricted-syntax: 0
# Below rules are disabled only for the migration period from Flow to TypeScript
# and they effect only tests files, to allow more flexible testing scenarios.
'@typescript-eslint/consistent-type-assertions':
[error, { assertionStyle: as, objectLiteralTypeAssertions: allow }]
'@typescript-eslint/no-non-null-assertion': off
'@typescript-eslint/restrict-plus-operands': off
'@typescript-eslint/no-floating-promises': off
'@typescript-eslint/no-invalid-this': off
'@typescript-eslint/no-throw-literal': off
'@typescript-eslint/require-await': off
'@typescript-eslint/await-thenable': off
'prefer-promise-reject-errors': 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please use off

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No all rules allow off as value, it gives an error. I think only TS rules allow off value.
image

'no-new-wrappers': 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are standard ESLint rules so they should work on both Flow and TS.
Can you please give an example of why you disabled them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the tests are creating wrapped instances of primitives (for example - isCollection-test.js).
At the moment it has // eslint-disable-next-line no-new-wrappers set on those lines, but isn't it better to disable it on a global level? there are multiple places that does that.

'no-throw-literal': 0
- files: 'resources/**'
parserOptions:
sourceType: script
Expand Down