-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
54 lines (51 loc) · 1.82 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
54
//@ts-check
import eslint from '@eslint/js';
import importPlugin from 'eslint-plugin-import';
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
plugins: {
['import']: importPlugin,
['simple-import-sort']: simpleImportSortPlugin,
},
languageOptions: {
globals: {
...globals.browser,
...globals.es2020,
...globals.node,
},
parserOptions: {
allowAutomaticSingleRunInference: true,
cacheLifetime: {
// we pretty well never create/change tsconfig structure - so no need to ever evict the cache
// in the rare case that we do - just need to manually restart their IDE.
glob: 'Infinity',
},
project: [
'tsconfig.json',
'apps/*/tsconfig.json',
'packages/*/tsconfig.json',
'apps/client/tsconfig.node.json',
],
tsconfigRootDir: import.meta.dirname,
warnOnUnsupportedTypeScriptVersion: false,
},
},
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-absolute-path': 'error',
'import/no-mutable-exports': 'error',
'import/no-self-import': 'error',
'simple-import-sort/imports': 'error',
},
},
{
ignores: ['**/dist/**', '**/node_modules/**'],
},
);