-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
46 lines (45 loc) · 1.01 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
// .eslintrc.js
module.exports = {
env: {
node: true,
es6: true,
jest: true, // Enable Jest globals globally (optional)
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'jest'],
overrides: [
{
files: ['**/__mocks__/**/*.{js,ts,tsx}'],
env: {
jest: true,
},
rules: {
// Add or override rules for mocks if needed
},
},
{
files: ['**/*.spec.{js,ts,tsx}', '**/*.test.{js,ts,tsx}'],
env: {
jest: true,
},
rules: {
// Add or override rules for test files if needed
},
},
],
ignorePatterns: ['dist/'], // Ignore the dist directory
rules: {
// Global rules
'no-undef': 'off', // Optional: Turn off no-undef if unnecessary
'@typescript-eslint/no-explicit-any': 'warn',
},
};