-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoxlint.config.ts
More file actions
62 lines (61 loc) · 1.62 KB
/
oxlint.config.ts
File metadata and controls
62 lines (61 loc) · 1.62 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
import { defineConfig } from 'oxlint';
export default defineConfig({
plugins: ['typescript'],
jsPlugins: ['oxlint-plugin-complexity'],
rules: {
'max-lines': ['error', { max: 500, skipBlankLines: true, skipComments: true }],
'max-lines-per-function': [
'error',
{ max: 100, skipBlankLines: true, skipComments: true, IIFEs: false },
],
'complexity/complexity': ['error', { cyclomatic: 20, cognitive: 15 }],
'typescript/no-explicit-any': 'error',
'typescript/no-floating-promises': 'error',
},
options: {
typeAware: true,
typeCheck: true,
},
ignorePatterns: [
'.sst',
'infra',
'packages/ui',
'**/dist',
'**/generated',
'**/sst-env.d.ts',
'test-results',
'playwright-report',
'blob-report',
'playwright/.cache',
'playwright/.auth',
],
overrides: [
{
files: ['sst.config.ts'],
rules: {
'max-lines': 'off',
'max-lines-per-function': 'off',
'complexity/complexity': 'off',
// sst.config.ts must use a triple-slash reference for SST's generated types
'typescript/triple-slash-reference': 'off',
},
},
{
files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx'],
rules: {
'max-lines': 'off',
'max-lines-per-function': 'off',
'complexity/complexity': 'off',
},
},
{
files: ['packages/website/**/*.ts', 'packages/website/**/*.tsx'],
rules: {
'max-lines-per-function': [
'error',
{ max: 200, skipBlankLines: true, skipComments: true, IIFEs: false },
],
},
},
],
});