forked from misskey-dev/summaly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
38 lines (37 loc) · 889 Bytes
/
eslint.config.js
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
import pluginMisskey from '@misskey-dev/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
//@ts-check
/** @type {import('eslint').Linter.Config[]} */
export default [ // eslint-disable-line import/no-default-export
...pluginMisskey.configs['recommended'],
{
ignores: [
'**/node_modules',
'src/@types/package.json.d.ts',
'built',
'jest.config.js',
'test',
],
},
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parserOptions: {
parser: tsParser,
project: ['./tsconfig.json', './test/tsconfig.json'],
sourceType: 'module',
tsConfigRootDir: import.meta.dirname,
},
},
rules: {
// 空文字でもフォールバックしたいので無効
'@typescript-eslint/prefer-nullish-coalescing': 'off',
},
},
{
files: ['**/*.js', '**/*.cjs'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
];