This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for complex matching to file-name-casing-rule (#4284)
* Add support for complex matching to file-name-casing-rule fixes #4220 * Fix linter issue * Fix Validator shape * Improve types * Change validator result response * Update option examples * Change validator names * Remove forcing regex to end of the file name * Fix validate * Fix type * Fix validate factory checking * Fix documentation * Remove casting * Fix option validation * Improve documentation * Fix docs formatting * Typo: "reprents" / "represents"
- Loading branch information
Showing
7 changed files
with
119 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
2 changes: 2 additions & 0 deletions
2
test/rules/file-name-casing/complex/InvalidNonComponentName.ts.lint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
~nil [File name must be camelCase] |
2 changes: 2 additions & 0 deletions
2
test/rules/file-name-casing/complex/invalid-component-name.tsx.lint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
~nil [File name must be PascalCase] |
2 changes: 2 additions & 0 deletions
2
test/rules/file-name-casing/complex/my-button.component.ts.lint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
~nil [File name must be PascalCase] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"rules": { | ||
"file-name-casing": [true, { | ||
".component.ts": "pascal-case", | ||
".tsx": "pascal-case", | ||
".ts": "camel-case" | ||
}] | ||
} | ||
} |