generated from beefchimi/template-common
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
48 lines (45 loc) · 1.15 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
import globals from 'globals';
import configLove from 'eslint-config-love';
// Includes both `config` and `plugin`.
import pluginPrettier from 'eslint-plugin-prettier/recommended';
export default [
{
ignores: ['coverage/**', 'dist/**'],
},
configLove,
pluginPrettier,
{
name: 'custom-rules',
files: ['**/*.ts', '**/*.js', '**/*.mjs'],
languageOptions: {
...configLove.languageOptions,
globals: {
...globals.browser,
},
ecmaVersion: 2022,
sourceType: 'module',
},
rules: {
'no-console': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
// This is preferred over `tsconfig` equivalents.
'@typescript-eslint/no-unused-vars': [
'warn',
{
ignoreRestSiblings: true,
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
// Consider this rule:
/*
'@typescript-eslint/consistent-indexed-object-style': [
'error',
'index-signature',
],
*/
},
},
];