-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
60 lines (57 loc) · 1.7 KB
/
eslint.config.mjs
File metadata and controls
60 lines (57 loc) · 1.7 KB
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
// eslint.config.mjs
// @ts-check
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import turbo from 'eslint-plugin-turbo';
import globals from 'globals';
import tseslint from 'typescript-eslint';
/** @type {import('typescript-eslint').ConfigArray}*/
export const conduitConfig = tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
{
rules: {
// '@typescript-eslint/no-explicit-any': 'off',
// '@typescript-eslint/no-floating-promises': 'off',
// '@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'no-unsafe-optional-chaining': 'error',
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
},
},
turbo.configs['flat/recommended'],
{
rules: {
'turbo/no-undeclared-env-vars': 'warn',
},
},
{
languageOptions: {
parser: tseslint.parser,
ecmaVersion: 2022,
sourceType: 'module',
parserOptions: {
projectService: true,
tsconfigRootDir: process.cwd(),
},
},
},
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
},
},
eslintConfigPrettier,
eslintPluginPrettierRecommended,
);
export default conduitConfig;