lint: custom lint rules
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
- ✅ introduce a way to write custom lint rules: https://github.com/aws/aws-toolkit-vscode/pull/4118
- implement these custom lint rules:
- ✅ disallow `.only()` in tests https://github.com/aws/aws-toolkit-vscode/pull/950#discussion_r387819343
- ✅ disallow direct use of `console.log` (use `getLogger` instead) https://github.com/aws/aws-toolkit-vscode/pull/5087
- require `awsToolkit.clock.setInterval`/`setTimeout`/etc (instead of `setInterval`/`setTimeout`/etc), `awsToolkit.clock.Date` (instead of `new Date()` or `Date.foo()`) #2343
- disallow backend Vue code in `src/webviews/util.ts` https://github.com/aws/aws-toolkit-vscode/pull/3868/files#diff-4fd67c2312884124b237854f76518a3833a94909984327434aeabc942974bb50
- other potential custom lint rules:
- `plugins/eslint-aws/lib/rules/no-localize-aws.ts` in [#1859](https://github.com/aws/aws-toolkit-vscode/pull/1859/files)
- `plugins/eslint-aws/lib/rules/no-mocha-arrows.ts` in [#1859](https://github.com/aws/aws-toolkit-vscode/pull/1859/files)
Contributor guide
Research direction
Start by reviewing the custom-rule mechanism introduced in PR #4118 and the existing examples in plugins/eslint-aws/lib/rules/no-localize-aws.ts and no-mocha-arrows.ts. Then inspect the remaining requirements for awsToolkit.clock usage and Vue code in src/webviews/util.ts. Done means the requested rules are implemented and enforce the stated patterns without affecting the already completed items.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100