You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(rules): consolidate imports and add contributing guide 🦖
- Add CONTRIBUTING.md documentation file
- Reduce code duplication across rule implementations
- Refactor all rule files to use namespace imports
- Replace named imports with namespace imports for better organization
Deno.test('your-rule-name (should not trigger)', () =>runnerTest(rulesId, 'valid code', 0))
87
+
88
+
Deno.test('verify auto-fix', () =>
89
+
verifyAutoFix(rulesId, 'code to fix', 'expected fixed code', 'description')
90
+
)
91
+
```
92
+
93
+
### 5. Add Documentation
94
+
95
+
Create an example file in `examples/your-rule-name.md` with:
96
+
97
+
- Rule description
98
+
- Examples of violations
99
+
- Examples of correct usage
100
+
- Auto-fix examples (if applicable)
101
+
102
+
## Code Style
103
+
104
+
- Follow the project's TypeScript configuration
105
+
- Use JSDoc comments for functions and exports
106
+
- Prefer explicit type annotations
107
+
- Use arrow functions for callbacks
108
+
- Follow the existing naming conventions
109
+
- Use utility functions from `@utils/index.ts` when available
110
+
- Include comprehensive test coverage with both positive and negative cases
111
+
-**Import all types using namespace imports from `@interfaces/index.ts`** (may not be 100% complete yet) - if you find missing types, add them following the existing style
112
+
113
+
## Testing
114
+
115
+
- All rules must have comprehensive tests
116
+
- Test both positive and negative cases
117
+
- Include auto-fix tests when applicable
118
+
- Run `deno task test` before submitting
119
+
120
+
## Submitting Changes
121
+
122
+
1. Ensure all tests pass: `deno task test`
123
+
2. Run code checks: `deno task check`
124
+
3. Create a pull request with a clear description
125
+
4. Reference any related issues
126
+
127
+
## Rule Guidelines
128
+
129
+
-**Do not duplicate existing Deno lint features** - Check [Deno's built-in rules](./development/DENO-RULES.md) before creating new ones
130
+
- Rules should be focused and specific
131
+
- Provide helpful error messages
132
+
- Include auto-fixes when possible
133
+
- Consider performance implications
134
+
- Follow Deno's lint plugin conventions
135
+
136
+
## Questions?
137
+
138
+
Feel free to open an issue for questions about contributing or rule implementation.
0 commit comments