-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
46 lines (44 loc) · 1.48 KB
/
eslint.config.js
File metadata and controls
46 lines (44 loc) · 1.48 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
import { defineConfig } from 'eslint/config';
import { FlatCompat } from '@eslint/eslintrc';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import prettierPlugin from 'eslint-plugin-prettier';
import importPlugin from 'eslint-plugin-import';
import preferArrowPlugin from 'eslint-plugin-prefer-arrow';
const compat = new FlatCompat();
// eslint-disable-next-line import/no-default-export
export default defineConfig([
{
languageOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2015,
sourceType: 'module',
},
plugins: {
'@typescript-eslint': tsPlugin,
prettier: prettierPlugin,
import: importPlugin,
'prefer-arrow': preferArrowPlugin,
},
},
...compat.extends('plugin:@typescript-eslint/recommended'),
...compat.extends('plugin:prettier/recommended'),
{
rules: {
'no-bitwise': 'off',
'@typescript-eslint/no-empty': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-var-requires': 'off',
'prefer-rest-params': 'off',
'sort-keys': 'off',
'no-this-alias': 'off',
'import/no-default-export': 'error',
'one-variable-per-declaration': 'off',
'prefer-object-spread': 'off',
'prefer-spread': 'off',
},
},
]);