-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
30 lines (29 loc) · 938 Bytes
/
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
import eslint from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
export default [
eslint.configs.recommended,
{
files: ['src/**/*.js', 'src/**/*.jsx', 'src/**/*.mjs', 'src/**/*.tsx', 'src/**/*.ts'],
rules: {
'max-depth': ['error', 3],
'max-nested-callbacks': ['error', 3],
'max-params': ['error', 3],
'max-lines': ['error', 1000], // per file
'max-lines-per-function': ['error', 200], // per function
'max-statements': ['error', 50], // per function
},
},
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
ignores: ['**/*.test.js', '*.d.ts', '**/*.d.ts', 'dist/**', 'tests/**'],
},
];