-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
69 lines (64 loc) · 1.36 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
65
66
67
68
69
/** @type {import('eslint').Linter.Config} */
const config = {
root: true,
env: {
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
'import/parsers': {
[require.resolve('@typescript-eslint/parser')]: ['.ts', '.tsx'],
},
},
extends: [
'@zazen',
'@zazen/eslint-config/node',
'@zazen/eslint-config/typescript',
'plugin:eslint-plugin/recommended',
'prettier',
],
rules: {
/** Disabling until I can get better type info. */
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
/** Disabled for now pending refactor. */
'unicorn/no-array-reduce': 'off',
'unicorn/no-unnecessary-polyfills': [
'error',
{ targets: 'node current' },
],
'etc/no-assign-mutated-array': 'off',
'etc/prefer-less-than': 'off',
},
overrides: [
{
files: ['tests/**/*.ts'],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
{
files: ['**/*.config.{js,cjs,mjs,ts}'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
},
},
],
}
module.exports = config