-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
36 lines (35 loc) · 1.14 KB
/
Copy patheslint.config.js
File metadata and controls
36 lines (35 loc) · 1.14 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
import eslint from '@eslint/js';
import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
export default defineConfig([
// general config
{
files: ['**/*.{ts,tsx}'],
ignores: ['**/dist/**'],
plugins: {
js: eslint,
ts: tseslint,
'no-relative-import-paths': noRelativeImportPaths,
},
extends: ['js/recommended', 'ts/recommended'],
rules: {
'no-empty': 'warn',
'no-relative-import-paths/no-relative-import-paths': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': ['warn', { allowObjectTypes: 'always' }],
'@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^_' }],
},
},
// no relative paths
...['backend', 'frontend', 'engine'].map((root) => ({
files: [`${root}/**/*.{ts,tsx}`],
ignores: ['**/dist/**'],
plugins: {
'no-relative-import-paths': noRelativeImportPaths,
},
rules: {
'no-relative-import-paths/no-relative-import-paths': ['warn', { rootDir: root }],
},
})),
]);