-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
66 lines (64 loc) · 1.65 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
54
55
56
57
58
59
60
61
62
63
64
65
66
const { resolve } = require('node:path');
const project = resolve(process.cwd(), 'tsconfig.json');
/** @type {import('eslint').Linter.Config} */
module.exports = {
parserOptions: {
project,
},
settings: {
'import/resolver': {
typescript: {
project,
},
},
},
extends: [
'@vercel/style-guide/eslint/node',
'@vercel/style-guide/eslint/typescript',
].map(require.resolve),
plugins: ['canonical'],
rules: {
'no-bitwise': 'off',
'no-console': 'warn',
'eslint-comments/require-description': 'off',
'import/no-extraneous-dependencies': 'off',
'unicorn/filename-case': 'off',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'canonical/no-barrel-import': 'error',
'canonical/no-export-all': 'error',
},
overrides: [
{
files: ['**/*.test.*', 'test/**/*'],
rules: {
'canonical/no-barrel-import': 'off',
'import/no-default-export': 'off',
'import/no-relative-packages': 'off',
'no-console': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
],
ignorePatterns: [
'*.config.*',
'tsup*',
'node_modules',
'dist',
'build',
'coverage',
'generated',
'trade-interfaces',
'codegen',
'docs',
'codegen.ts',
'package.json',
'buf.gen.yaml',
'buf.work.yaml',
],
};