Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[directive-selector] Allow different prefix for attribute and element usages #1119

@Futhark

Description

@Futhark

Description and reproduction of the issue

This rule should allow something like this:

      "@angular-eslint/directive-selector": [
          "error",
          {
              "type": "attribute",
              "prefix": "testLib",
              "style": "camelCase"
          },
          {
              "type": "element",
              "prefix": "test-lib",
              "style": "kebab-case"
          }
      ],

we need to use directives in our project as an attribute AND as an element. Currently we have to use something like this:

      "@angular-eslint/directive-selector": [
          "error",
          {
              "type": ["element", "attribute"],
              "prefix": ["testLib", "test-lib"]
              "style": ???
          }
      ],

but now the style property doesn't make sense, and of course this approach doesn't checks the prefix validity by usage

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginAngular-specific TypeScript rulestriageThis issue needs to be looked at and categorized by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions