generated from mojaloop/typescript-svc-template
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy patheslint.config.mjs
41 lines (39 loc) · 1.19 KB
/
eslint.config.mjs
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
import ts from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import globals from "globals";
import jest from 'eslint-plugin-jest';
export default [
{
files: ['**/*.ts', '**/*.tsx'], // Target TypeScript files
languageOptions: {
parser: tsParser,
ecmaVersion: 'latest',
globals: {
...globals.node,
...globals.jest,
structuredClone: 'readonly',
}
},
plugins: {
'@typescript-eslint': ts,
jest,
},
rules: {
indent: ["error", 2, {
SwitchCase: 1,
}],
"linebreak-style": [2, "unix"],
quotes: [2, "single", { "avoidEscape": true }],
"no-console": 2,
"no-prototype-builtins": "off",
},
ignores: ["node_modules/**/*.js", ".circleci/*", "*.d.ts", "eslint.config.mjs"]
},
// Override for test directory
{
files: ["test/**/*.ts", "test/**/*.tsx"], // Match files in the test directory
rules: {
"no-console": "off" // Disable no-console for test files
}
}
]