-
Notifications
You must be signed in to change notification settings - Fork 44
/
eslint.config.js
53 lines (51 loc) · 1.35 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
52
53
// @ts-check
import globals from 'globals';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import * as pluginImport from 'eslint-plugin-import';
import pluginPrettier from 'eslint-plugin-prettier';
import { FlatCompat } from '@eslint/eslintrc';
const compat = new FlatCompat();
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
'dist/',
'__mocks__/',
'__tests__/',
'**/test.js',
'src/constants/__tests__/',
'src/crawlers/__tests__/',
],
},
...compat.extends('airbnb-base', 'plugin:prettier/recommended'),
{
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: {
pluginImport,
pluginPrettier,
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
// disabling import/no-unresolved as typescript already checks this
// https://typescript-eslint.io/troubleshooting/typed-linting/performance/#eslint-plugin-import
'import/no-unresolved': 'off',
'lines-between-class-members': 'off',
},
},
);