forked from lightdash/lightdash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
31 lines (29 loc) · 1.58 KB
/
Copy path.eslintrc.js
File metadata and controls
31 lines (29 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: ['@typescript-eslint', 'perfectionist'],
rules: {
// Import declaration ordering is handled by oxfmt's sortImports.
'import/order': 'off',
// Sorts named specifiers within a single import, with value specifiers before type specifiers.
'perfectionist/sort-named-imports': ['error', { type: 'natural', ignoreCase: true, groups: ['value-import', 'type-import'] }],
// Ensures all promises have proper handling to avoid unnoticed failures.
'@typescript-eslint/no-floating-promises': [
'error',
{ ignoreIIFE: true },
],
// Allows the use of 'void' operator for promises we deliberately don't wait for,
// providing a way to bypass the 'no-floating-promises' rule when necessary.
'no-void': ['error', { allowAsStatement: true }],
"@typescript-eslint/no-explicit-any": "error",
// We want to add `noUncheckedIndexedAccess` but there are too many errors in the codebase
// so we we are going to add these warnings on eslint to manually fix them incrementally.
// Packages can exclude existing files and add errors for new files (eg: see common/.eslintrc.js)
// TODO: fix these warnings and then add noUncheckedIndexedAccess to tsconfig.json
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off"
},
};