Please provide us with the following information:
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
macOS Sierra
Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here:
angular-cli: 1.0.0-beta.22-1
node: 7.2.0
os: darwin x64
Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
ng lint
Normally this include a stack trace and some more information.
> tslint "src/**/*.ts"
.../node_modules/tslint/lib/tslint-cli.js:234
throw error;
^
TypeError: this.nameValidator is not a function
at Rule.SelectorRule.validateName (.../node_modules/codelyzer/selectorNameBase.js:40:25)
at .../node_modules/codelyzer/selectorNameBase.js:125:33
at Array.every (native)
at validateSelectors (.../node_modules/codelyzer/selectorNameBase.js:124:39)
at .../node_modules/codelyzer/selectorNameBase.js:132:27
at Array.forEach (native)
at SelectorValidatorWalker.validateSelector (.../node_modules/codelyzer/selectorNameBase.js:121:18)
at SelectorValidatorWalker.validateDecorator (.../node_modules/codelyzer/selectorNameBase.js:113:18)
at Array.forEach (native)
at SelectorValidatorWalker.visitClassDeclaration (.../node_modules/codelyzer/selectorNameBase.js:103:14)
Thanks! We'll be in touch soon.
@mgechev any idea? This seems to occur in the codelyzer code itself.
Yes, most likely the configuration is not valid. The current master contains valid configuration. You can fix it manually, by updating tslint.json or the fix will come with the next release automatically.
@hansl I think we can close this issue.
right
I know this is closed, but it might help someone :)
I got here looking for the this.nameValidator is not a function codelyzer error. It turned out to be because I was not specifying the selectorPrefix in the component|directive-selector rule in tslint.json.
before
"directive-selector": [true, "attribute", "camelCase"]
after (and working)
"directive-selector": [true, "attribute", "", "camelCase"]
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
I know this is closed, but it might help someone :)
I got here looking for the
this.nameValidator is not a functioncodelyzer error. It turned out to be because I was not specifying the selectorPrefix in thecomponent|directive-selectorrule intslint.json.before
after (and working)