-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
47 lines (46 loc) · 1.41 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
// @ts-check
import globals from 'globals';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import beautifulSort from 'eslint-plugin-beautiful-sort';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintPluginPrettierRecommended,
{
files: ['**/*.ts'],
ignores: ['node_modules', 'dist', 'bin'],
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
parserOptions: {
project: true,
},
},
plugins: {
'beautiful-sort': beautifulSort,
},
rules: {
'no-use-before-define': 'error',
'object-shorthand': 'warn',
'no-async-promise-executor': 'warn',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-deprecated': 'error',
'beautiful-sort/import': [
'error',
{
special: [],
order: ['special', 'namespace', 'default', 'defaultObj', 'obj', 'none'],
},
],
},
},
);