-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
51 lines (49 loc) · 1.5 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
// @ts-check
import eslint from '@eslint/js';
import prettier from 'eslint-config-prettier';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{ languageOptions: { globals: globals.browser } },
eslint.configs.recommended,
...tseslint.configs.recommended,
{
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'simple-import-sort/exports': 'off',
'simple-import-sort/imports': 'error',
'no-case-declarations': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-constant-condition': ['error', { checkLoops: false }],
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'object-shorthand': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-function-return-type': [
'error',
{ allowExpressions: true },
],
'@typescript-eslint/strict-boolean-expressions': 'error',
},
languageOptions: {
parserOptions: {
project: './tsconfig.json',
},
},
},
prettier,
);