How to use the @typescript-eslint/eslint-plugin/dist/util.getNameFromPropertyName function in @typescript-eslint/eslint-plugin

To help you get started, we’ve selected a few @typescript-eslint/eslint-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / fluent-ui-react / packages / eslint-plugin / rules / no-visibility-modifiers / index.js View on Github external
function checkPropertyAccessibilityModifier(classProperty) {
      const nodeType = 'class property'

      if (isTypeScriptFile(context.getFilename())) {
        const propertyName = util.getNameFromPropertyName(classProperty.key)

        if (!!classProperty.accessibility) {
          reportIssue('presentModifier', nodeType, classProperty, propertyName)
        }
      }
    }