-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
51 lines (48 loc) · 1.38 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import prettierConfig from 'eslint-config-prettier';
import jest from 'eslint-plugin-jest';
import jsdoc from 'eslint-plugin-jsdoc';
import globals from 'globals';
export default [
{
files: ['packages/**/*.ts', 'docs-builder/scripts/*.ts', 'docs-builder/scripts/**/*.ts'],
ignores: ['build/*', 'node_modules/*', 'packages/**/*.(mjs|cjs|js|d.ts)'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.json',
},
sourceType: 'module',
globals: {
...globals.node,
...globals.browser,
...globals.es2021,
...globals.jest,
},
},
plugins: {
jsdoc,
jest,
'@typescript-eslint': typescriptEslint,
},
rules: {
...typescriptEslint.configs.recommended.rules,
...typescriptEslint.configs['recommended-requiring-type-checking'].rules,
...prettierConfig.rules,
'no-console': 2,
'no-duplicate-imports': 2,
'prefer-const': 2,
'@typescript-eslint/consistent-type-imports': [
2,
{
prefer: 'type-imports',
disallowTypeAnnotations: true,
fixStyle: 'inline-type-imports',
},
],
},
},
];