forked from mizdra/eslint-interactive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
48 lines (47 loc) · 1.19 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
// @ts-check
/** @type import('eslint').Linter.BaseConfig */
module.exports = {
root: true,
extends: [
// basic
'@mizdra/mizdra',
'@mizdra/mizdra/+typescript',
'@mizdra/mizdra/+prettier',
],
parserOptions: {
ecmaVersion: 2021,
},
env: {
node: true,
},
rules: {
'import/no-extraneous-dependencies': 'error',
},
overrides: [
// for typescript
{
files: ['*.ts', '*.tsx'],
parserOptions: {
project: ['./tsconfig.src.json', './tsconfig.test.json'],
},
rules: {
// ts-ignore は覚悟のある時にしか使わないので、いちいち lint error にする必要もない
'@typescript-eslint/ban-ts-comment': 'off',
// 煩すぎるので off
'@typescript-eslint/no-unsafe-return': 'off',
// 煩すぎるので off
'@typescript-eslint/no-unsafe-argument': 'off',
// disable because this rule do not support ESM in TypeScript.
// ref: https://github.com/import-js/eslint-plugin-import/issues/2170
'import/no-unresolved': 'off',
},
},
// for test
{
files: ['test/**/*.{ts,tsx}'],
env: {
jest: true,
},
},
],
};