forked from TeeSeal/discord.js-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
66 lines (65 loc) · 2.04 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import prettier from 'eslint-config-prettier';
import globals from 'globals';
import js from '@eslint/js';
export default [
js.configs.recommended,
prettier,
{
ignores: ['**/node_modules/', '**/pnpm-lock.yaml'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.es2022,
...globals.node
}
},
rules: {
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
'no-constant-condition': ['error', { checkLoops: false }],
'prefer-const': ['warn', { destructuring: 'all' }],
'no-unused-vars': ['error', { args: 'none' }],
curly: ['warn', 'multi-line', 'consistent'],
'logical-assignment-operators': 'warn',
'no-template-curly-in-string': 'error',
'quote-props': ['error', 'as-needed'],
'comma-dangle': ['error', 'never'],
'no-useless-constructor': 'error',
'no-useless-assignment': 'error',
'no-inner-declarations': 'error',
'no-implicit-coercion': 'error',
'no-use-before-define': 'warn',
'no-underscore-dangle': 'warn',
'no-unneeded-ternary': 'error',
'default-param-last': 'error',
'one-var': ['warn', 'never'],
'no-inline-comments': 'warn',
'no-empty-function': 'error',
'no-useless-return': 'error',
'no-useless-rename': 'warn',
'no-useless-concat': 'warn',
'no-throw-literal': 'error',
'no-extend-native': 'error',
'default-case-last': 'warn',
'no-self-compare': 'error',
'no-new-wrappers': 'error',
'no-lone-blocks': 'error',
'no-undef-init': 'error',
'no-else-return': 'warn',
'no-extra-semi': 'error',
'require-await': 'warn',
yoda: ['error', 'always'],
'default-case': 'error',
'dot-notation': 'error',
'no-sequences': 'warn',
'no-multi-str': 'warn',
'no-lonely-if': 'warn',
'no-new-func': 'error',
'no-console': 'error',
camelcase: 'warn',
'no-var': 'warn',
eqeqeq: 'warn',
semi: 'error'
}
}
];