-
-
Notifications
You must be signed in to change notification settings - Fork 291
/
Copy pathconstants.ts
50 lines (38 loc) · 1.19 KB
/
constants.ts
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
import {type TsConfigJsonResolved} from 'get-tsconfig';
export const defaultIgnores = [
'**/node_modules/**',
'**/bower_components/**',
'flow-typed/**',
'coverage/**',
'{tmp,temp}/**',
'**/*.min.js',
'vendor/**',
'dist/**',
'tap-snapshots/*.{cjs,js}',
];
/**
List of options that values will be concatenanted during option merge.
Only applies to options defined as an Array.
*/
export const tsExtensions = ['ts', 'tsx', 'cts', 'mts'];
export const jsExtensions = ['js', 'jsx', 'mjs', 'cjs'];
export const jsFilesGlob = `**/*.{${jsExtensions.join(',')}}`;
export const tsFilesGlob = `**/*.{${tsExtensions.join(',')}}`;
export const allExtensions = [...jsExtensions, ...tsExtensions];
export const allFilesGlob = `**/*.{${allExtensions.join(',')}}`;
export const moduleName = 'xo';
export const tsconfigDefaults: TsConfigJsonResolved = {
compilerOptions: {
target: 'es2022',
strict: true,
noImplicitReturns: true,
noImplicitOverride: true,
noUnusedLocals: true,
noUnusedParameters: true,
noFallthroughCasesInSwitch: true,
noUncheckedIndexedAccess: true,
noPropertyAccessFromIndexSignature: true,
noUncheckedSideEffectImports: true,
},
};
export const cacheDirName = 'xo-linter';