Skip to content

Help configuring useNamingConvention? #3236

Answered by Conaclos
wojtekmaj asked this question in Q&A
Discussion options

You must be logged in to vote

If you use match and formats, you have to capture a string in order to check against formats; otherwise formats is never used.
Also, if you don't specify formats and capture a string with match, the captured string is automatically forwarded to the next selection.

I could test the following config:

        "useNamingConvention": {
          "level": "error",
          "options": {
            "strictCase": false,
            "conventions": [
              {
                "selector": {
                  "kind": "typeAlias"
                },
                "match": "T(.{2,})",
                "formats": ["PascalCase"]
              },
              {
                "selector": {

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Conaclos
Comment options

@wojtekmaj
Comment options

@Conaclos
Comment options

@Conaclos
Comment options

@wojtekmaj
Comment options

Answer selected by wojtekmaj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants