-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.cjs
28 lines (28 loc) · 894 Bytes
/
.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
/* eslint-env node */
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
rules: {
// Only disabling this because this code is very old but also battle-tested,
// and coming up with clever typings may break for consumers.
'@typescript-eslint/no-explicit-any': 'off',
// We need to support `Function` and `Constructor` types.
'@typescript-eslint/ban-types': 'off',
},
overrides: [
{
files: ['**/__tests__/*.test.ts'],
rules: {
// The tests may use an untyped library which requires (no pun intended) `require`.
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
],
}