Skip to content

Commit 3bc84fd

Browse files
committed
[CHORE] Add .prettierignore and update ESLint configuration for test files
- Created a .prettierignore file to exclude unnecessary files and directories from formatting. - Updated ESLint configuration to relax import ordering and other rules specifically for test files, enhancing flexibility in test code structure.
1 parent f4dddea commit 3bc84fd

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

.prettierignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Dependencies
2+
node_modules/
3+
.yarn/
4+
yarn-error.log
5+
yarn.lock
6+
7+
# Build output
8+
dist/
9+
**/dist/
10+
*.tsbuildinfo
11+
12+
# Test coverage
13+
coverage/
14+
**/coverage/
15+
16+
# Generated type definitions
17+
*.d.ts
18+
**/*.d.ts
19+
20+
# IDE and editor files
21+
.vscode/
22+
.idea/
23+
*.swp
24+
*.swo
25+
26+
# OS files
27+
.DS_Store
28+
Thumbs.db
29+
30+
# Environment variables
31+
.env*
32+
.env.local
33+
.env.*.local
34+
35+
# Development files
36+
dummy/
37+
38+
# Build artifacts
39+
*.log
40+
*.cache
41+
42+
# Package manager
43+
.pnp.*
44+
.yarn/cache
45+
.yarn/unplugged
46+
.yarn/build-state.yml
47+
.yarn/install-state.gz
48+

eslint.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ module.exports = [
136136
prev: '*',
137137
next: 'break',
138138
},
139+
{
140+
blankLine: 'always',
141+
prev: '*',
142+
next: 'continue',
143+
},
139144
{
140145
blankLine: 'always',
141146
prev: '*',
@@ -179,6 +184,30 @@ module.exports = [
179184
],
180185
},
181186
},
187+
{
188+
// Test files: Relaxed import ordering for testing priorities
189+
files: [
190+
'**/*.test.ts',
191+
'**/*.test.tsx',
192+
'**/*.spec.ts',
193+
'**/*.spec.tsx',
194+
'**/jest.setup.ts',
195+
'**/jest.setup.tsx',
196+
'**/setup-tests.ts',
197+
'**/setup-tests.tsx',
198+
],
199+
plugins: {
200+
import: importPlugin,
201+
},
202+
rules: {
203+
// Disable strict import ordering for test files
204+
'import/order': 'off',
205+
// Allow var declarations in test files
206+
'no-var': 'off',
207+
// Allow empty functions in test files (useful for mocks and stubs)
208+
'@typescript-eslint/no-empty-function': 'off',
209+
},
210+
},
182211
{
183212
// Browser/Renderer JavaScript files (Electron renderer process)
184213
files: ['packages/mac/src/renderer/**/*.js'],

0 commit comments

Comments
 (0)