Skip to content

Commit

Permalink
feat(naming-convention): allow specifying parameter exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
d3lm committed Oct 17, 2024
1 parent d7aa176 commit 305b112
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blitz/eslint-plugin",
"version": "0.1.2",
"version": "0.1.3",
"license": "MIT",
"description": "An ESLint config to enforce a consistent code styles across StackBlitz projects",
"keywords": [
Expand Down
9 changes: 9 additions & 0 deletions src/configs/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export interface TSRuleExtensions {
variable?: {
exceptions?: string[];
};
parameter?: {
exceptions?: string[];
};
};
}

Expand All @@ -32,6 +35,12 @@ export function getNamingConventionRule(
selector: 'parameter',
format: ['camelCase'],
leadingUnderscore: 'allow',
...(extensions?.parameter?.exceptions?.length && {
filter: {
regex: generateNamingConventionRegex([], extensions?.parameter?.exceptions),
match: false,
},
}),
},
{
selector: 'typeLike',
Expand Down

0 comments on commit 305b112

Please sign in to comment.