forked from promptfoo/promptfoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
61 lines (58 loc) · 1.56 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';
import unusedImports from 'eslint-plugin-unused-imports';
import jest from 'eslint-plugin-jest';
export default [
...tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended),
{
...jest.configs['flat/recommended'],
rules: {
...jest.configs['flat/recommended'].rules,
...jest.configs['flat/style'].rules,
'jest/consistent-test-it': 'error',
'jest/expect-expect': 'error',
'jest/prefer-expect-resolves': 'error',
'jest/prefer-jest-mocked': 'error',
'jest/require-to-throw-message': 'error',
},
},
{
ignores: [
'**/src/web/nextui/_next/**/*',
'**/src/web/nextui/.next/**/*',
'**/src/web/nextui/out/**/*',
'dist/**/*',
],
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: globals.node,
},
plugins: {
'unused-imports': unusedImports,
},
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-var-requires': 0,
'no-case-declarations': 0,
'no-control-regex': 0,
'no-empty': 0,
'no-useless-escape': 0,
'unused-imports/no-unused-imports': 'error',
},
},
{
files: ['examples/**'],
rules: {
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/no-var-requires': 0,
},
},
];