Última actividad 1762426249

eslint.config.mjs Sin formato
1// @ts-check
2
3import eslint from '@eslint/js';
4import { defineConfig } from 'eslint/config';
5import tseslint from 'typescript-eslint';
6
7export default defineConfig(
8 eslint.configs.recommended,
9 tseslint.configs.recommended,
10 {
11 rules: {
12 'no-console': 'error',
13 },
14 },
15 {
16 rules: {
17 '@typescript-eslint/no-unused-vars': ['off', { varsIgnorePattern: '^_' }],
18 },
19 },
20 {
21 rules: {
22 '@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }],
23 },
24 },
25 {
26 files: ['src/1_domain/**/*.ts'],
27 rules: {
28 '@typescript-eslint/no-restricted-imports': [
29 'error',
30 {
31 patterns: [
32 {
33 regex: '2_app',
34 message: 'The domain layer should not depend on the app layer.',
35 },
36 {
37 regex: '3_infra',
38 message: 'The domain layer should not depend on the infra layer.',
39 },
40 ],
41 },
42 ],
43 },
44 },
45 {
46 files: ['src/2_app/**/*.ts'],
47 rules: {
48 '@typescript-eslint/no-restricted-imports': [
49 'error',
50 {
51 patterns: [
52 {
53 regex: '3_infra',
54 message: 'The app layer should not depend on the infra layer.',
55 },
56 ],
57 },
58 ],
59 },
60 },
61);
62