-
Notifications
You must be signed in to change notification settings - Fork 40
/
.eslintrc.cjs
53 lines (52 loc) · 1.61 KB
/
.eslintrc.cjs
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'use strict';
module.exports = {
root: true,
extends: ['@viamrobotics/eslint-config'],
plugins: ['eslint-plugin-tsdoc'],
ignorePatterns: [
'src/gen',
'dist',
'docs',
/*
* TODO(mc, 2023-04-06): something about nested node_modules in examples
* is causing eslint to choke. Investigate workspaces as a solution
*/
'examples',
// TODO(RSDK-5406): setup custom linting rules for standalone JS scripts.
'scripts',
],
parserOptions: {
project: ['./tsconfig.json', './tsconfig.node.json'],
},
rules: {
'no-void': ['error', { allowAsStatement: true }],
// TODO(mc, 2023-04-06): remove overrides to default to error, fix issues
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/prefer-promise-reject-errors': 'warn',
'unicorn/prefer-add-event-listener': 'warn',
'@typescript-eslint/strict-boolean-expressions': [
'error',
{
allowNullableBoolean: true,
},
],
},
overrides: [
{
files: ['src/**/*.test.*'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'vitest/no-restricted-vi-methods': 'warn',
'vitest/valid-expect': 'warn',
'vitest/require-top-level-describe': 'warn',
'vitest/consistent-test-filename': 'warn',
},
},
],
};