-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
60 lines (57 loc) · 1.87 KB
/
eslint.config.js
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
// @ts-check
import { readFileSync } from 'node:fs';
import eslint from '@eslint/js';
import prettierConfig from 'eslint-config-prettier';
import compat from 'eslint-plugin-compat';
import importX from 'eslint-plugin-import-x';
import node from 'eslint-plugin-n';
import unicorn from 'eslint-plugin-unicorn';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
compat.configs['flat/recommended'],
importX.configs.typescript,
node.configs['flat/recommended-module'],
unicorn.configs['flat/recommended'],
prettierConfig,
{
languageOptions: {
parserOptions: {
project: './tsconfig.json',
},
},
},
{
settings: {
lintAllEsApis: true,
node: {
version: readFileSync('./.nvmrc'),
},
},
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/prefer-includes': 'off',
'n/no-missing-import': 'off',
'unicorn/no-array-for-each': 'off',
'unicorn/no-new-array': 'off',
'unicorn/no-null': 'off',
'unicorn/prefer-dom-node-append': 'off',
'unicorn/prefer-dom-node-remove': 'off',
'unicorn/prefer-includes': 'off',
'unicorn/prefer-number-properties': 'off',
'unicorn/prefer-spread': 'off',
},
},
{
ignores: ['dist/'],
},
);