-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
44 lines (42 loc) · 1.07 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
import 'eslint-plugin-only-warn';
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-plugin-prettier/recommended';
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
prettier,
{
ignores: [
'dist/',
'coverage/',
'@generated/**',
'*.config.[cm]js',
'.*rc.js',
],
languageOptions: {
globals: globals.node,
parserOptions: {
project: ['./tsconfig.json'],
warnOnUnsupportedTypeScriptVersion: false,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
'max-lines': [1, { max: 300 }],
'max-params': [1, { max: 3 }],
'no-unneeded-ternary': [1],
},
},
{
files: ['**/*.spec.[cm]ts', '**/*.e2e-spec.ts'],
rules: {
'@typescript-eslint/no-floating-promises': 0,
'consistent-return': 0,
'max-lines': 0,
},
},
];