-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patheslint.config.js
More file actions
64 lines (63 loc) · 2.02 KB
/
eslint.config.js
File metadata and controls
64 lines (63 loc) · 2.02 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
const rubensworks = require('@rubensworks/eslint-config');
module.exports = rubensworks([
{
files: [ '**/*.ts' ],
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname,
project: [ './tsconfig.eslint.json' ],
},
},
rules: {
// Requires strictNullChecks which is disabled in this project
'ts/prefer-nullish-coalescing': 'off',
// JSON imports don't need explicit extension
'import/extensions': 'off',
// Disabled until test suite is migrated to async/await
'jest/no-test-return-statement': 'off',
'jest/no-done-callback': 'off',
// Disabled - requires larger TypeScript type annotation refactoring
'ts/no-unsafe-argument': 'off',
'ts/no-unsafe-assignment': 'off',
'ts/no-unsafe-return': 'off',
'ts/restrict-template-expressions': 'off',
'ts/no-floating-promises': 'off',
'ts/explicit-member-accessibility': 'off',
'ts/explicit-function-return-type': 'off',
'ts/consistent-type-assertions': 'off',
'ts/no-base-to-string': 'off',
// Method signature style - property arrow function syntax breaks TypeScript variance in this codebase
'ts/method-signature-style': 'off',
// Naming conventions - URI-based object property keys can't match camelCase
'ts/naming-convention': 'off',
// Line length - many long lines in test data
'max-len': 'off',
// Inline comments are used throughout the codebase
'line-comment-position': 'off',
// Test-style assertions
'jest/no-conditional-expect': 'off',
'jest/prefer-each': 'off',
'jest/require-to-throw-message': 'off',
},
},
{
files: [ 'bin/**/*.ts' ],
rules: {
'no-console': 'off',
'import/no-nodejs-modules': 'off',
'unicorn/filename-case': 'off',
},
},
{
files: [ 'lib/**/*.ts', 'test/**/*.ts' ],
rules: {
'import/no-nodejs-modules': 'off',
},
},
{
files: [ 'test/**/*.ts' ],
rules: {
'no-console': 'off',
},
},
]);