-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
43 lines (41 loc) · 1.15 KB
/
eslint.config.js
File metadata and controls
43 lines (41 loc) · 1.15 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
/* eslint-env node */
import path from 'path';
import { fileURLToPath } from 'url';
import js from '@eslint/js';
import tsEslint from 'typescript-eslint';
import tsEslintParser from '@typescript-eslint/parser';
// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default [
js.configs.recommended,
...tsEslint.configs.recommended,
{
// Note: there should be no other properties in this object
ignores: ['dist', 'eslint.config.js'],
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
parser: tsEslintParser,
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
},
rules: {
'default-case': 'error',
'@typescript-eslint/consistent-type-exports': 'warn',
'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unused-expressions': [
'warn',
{ allowShortCircuit: true },
],
},
settings: {
'max-warnings': 0,
},
},
];