-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add id-length lint rule and refactor related code #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,14 @@ export default defineConfig({ | |
| 'prefer-template': 'warn', | ||
| 'typescript/no-explicit-any': 'error', | ||
| 'prefer-const': 'error', | ||
| 'id-length': [ | ||
| 'error', | ||
| { | ||
| min: 2, | ||
| checkGeneric: false, | ||
| exceptions: ['_', 'i', 'j', 'x', 'y', 'z'], | ||
| }, | ||
| ], | ||
|
Comment on lines
+16
to
+21
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add an error message saying:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure about this either? Can we have custom lint messages? |
||
| }, | ||
| ignorePatterns: ['node_modules', 'dist', 'build', 'coverage', '.git'], | ||
| }); | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,3 +1,4 @@ | ||||||
| // oxlint-disable id-length | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| import '@/loadEnvFile.js'; | ||||||
|
|
||||||
| function optionalEnv(key: string): string | undefined { | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to "disallow-abbreviation".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the rule id-length
I'm not sure what you mean by rename it? unless you want to use different rule?