-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
120 lines (119 loc) · 3.22 KB
/
Copy patheslint.config.mjs
File metadata and controls
120 lines (119 loc) · 3.22 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import importPlugin from 'eslint-plugin-import';
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
'node_modules/',
'dist/',
'build/',
'**/dist/**',
'**/target/**',
'**/src-tauri/target/**',
'**/node_modules/**',
'**/.expo/**',
'coverage/',
'scripts/',
'**/expo-env.d.ts',
'**/*.d.ts',
'**/app.config.js',
'**/babel.config.js',
'**/metro.config.js',
'**/webpack.config.js',
'**/plugins/*.js',
'**/*.config.js',
'**/*.config.mjs',
'**/*.config.ts',
'**/*.cjs',
'**/.release-it.notes.js',
'**/import-meta-shim.js',
'.dev/**',
'.worktrees/**',
'.claude/worktrees/**',
],
},
{
files: ['**/*.{ts,tsx,js,mjs,cjs}'],
languageOptions: {
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
globals: {
console: 'readonly',
process: 'readonly',
global: 'readonly',
require: 'readonly',
module: 'readonly',
__filename: 'readonly',
__dirname: 'readonly',
},
},
plugins: {
import: importPlugin,
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'prefer-const': 'off',
'no-var': 'off',
'import/order': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-require-imports': 'off',
'no-case-declarations': 'off',
'no-prototype-builtins': 'off',
'no-undef': 'off',
'no-empty': 'off',
'no-useless-escape': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-namespace': 'off',
'no-empty-pattern': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'no-control-regex': 'off',
'no-fallthrough': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
},
},
{
files: ['**/*.{ts,tsx}'],
settings: {
react: {
version: 'detect',
},
},
plugins: {
react,
'react-hooks': reactHooks,
},
rules: {
'react/react-in-jsx-scope': 'off',
'react-hooks/rules-of-hooks': 'off',
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['apps/free/app/sources/sync/**/*.{ts,tsx}'],
rules: {
/**
* Architecture guard:
* sync is a state/business layer and must not statically depend on UI/realtime layers.
* Use function-level require() for cross-cutting runtime callbacks when needed.
*/
'no-restricted-imports': [
'error',
{
patterns: ['@/components/*', '@/components/**', '@/realtime/*', '@/realtime/**'],
},
],
},
},
);