-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy patheslint.config.mjs
64 lines (63 loc) · 1.45 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
62
63
64
import eslint from '@eslint/js';
import vitest from 'eslint-plugin-vitest';
import prettierConfig from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
export default [
{
ignores: [
'.tmp/',
'node_modules/',
'coverage/',
'functions/utils/liquid.min.js',
'functions/utils/templayed.js',
'functions/utils/jsonpath.min.js',
],
},
eslint.configs.recommended,
{
files: ['**/*.{js,mjs}'],
languageOptions: {
globals: {
...globals.node,
...vitest.environments.env.globals,
documentParser: 'readonly',
fetch: 'readonly',
generatePDF: 'readonly',
generativeAI: 'readonly',
gql: 'readonly',
parseData: 'readonly',
parseToGqlFragment: 'readonly',
runAction: 'readonly',
searchCollection: 'readonly',
smtp: 'readonly',
storeFile: 'readonly',
$app: 'readonly',
},
},
rules: {
'no-restricted-globals': 0,
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
},
],
},
},
{
files: ['__tests__/**/*.test.js', 'isolate-tests/'],
plugins: { vitest },
rules: {
...vitest.configs.recommended.rules,
'vitest/no-identical-title': ['error'],
},
},
prettierConfig,
];