-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy patheslint.config.js
More file actions
50 lines (48 loc) · 1.21 KB
/
eslint.config.js
File metadata and controls
50 lines (48 loc) · 1.21 KB
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
import eslintjs from '@eslint/js';
import { configs as tseslintConfigs } from 'typescript-eslint';
import prettierConfig from 'eslint-config-prettier';
const { configs: eslintConfigs } = eslintjs;
const completionFileGlobs = [
'src/**/*.ts',
'bin/**/*.ts',
'benchmarks/**/*.ts',
'*.ts',
];
export default [
{
ignores: ['dist/**'],
},
{
...eslintConfigs.recommended,
files: completionFileGlobs,
},
...tseslintConfigs.strict,
{
files: completionFileGlobs,
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^ignore',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'separate-type-imports',
},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'default-case-last': 'error',
eqeqeq: ['error', 'smart'],
'no-fallthrough': ['error', { allowEmptyCase: true }],
'prefer-template': 'error',
'no-console': 'off',
},
},
prettierConfig,
];