generated from payloadcms/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.cjs
64 lines (64 loc) · 1.8 KB
/
.eslintrc.cjs
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
61
62
63
64
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: ['plugin:@typescript-eslint/recommended', 'plugin:perfectionist/recommended-natural'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'simple-import-sort', 'import'],
root: true,
rules: {
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/consistent-type-imports': [
'error',
{
fixStyle: 'separate-type-imports',
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/padding-line-between-statements': [
'warn',
{
blankLine: 'always',
next: '*',
prev: ['const', 'let', 'var'],
},
{
blankLine: 'always',
next: ['return', 'function', 'class'],
prev: '*',
},
{
blankLine: 'always',
next: '*',
prev: ['function', 'class'],
},
{
blankLine: 'always',
next: 'export',
prev: '*',
},
{
blankLine: 'always',
next: '*',
prev: 'multiline-const',
},
],
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'no-unused-vars': 'off',
'padding-line-between-statements': 'off',
'perfectionist/sort-imports': 'off',
'perfectionist/sort-named-exports': 'off',
'perfectionist/sort-named-imports': 'off',
'prefer-const': 'error',
'require-await': 'error',
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': 'warn',
'typescript-eslint/explicit-function-return-type': 'off',
},
};