Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Repro
{"rules": {"@typescript-eslint/camelcase": ["error", {"properties":"never" } ] }}
exportclassMyClassWithAStatic{publicstaticthis_should_pass():boolean{returntrue;}}
Expected Result
The static method should pass linting.
Actual Result
An error is reported:
2:18 error Identifier'this_should_pass' is notin camelcase @typescript-eslint/camelcase
Additional Info
When disabling the camelCase rule for properties, I would assume class members would also not be checked. However, ideally we would have even more control over this rule and be able to disable it for certain types of members (e.g. by accessibility, and especially for our use, static vs. instance)
The reason this is causing us an issue is that our coding standard is to use camelCase for all variables, properties and methods, but use snake_case for static methods. This is a common coding standard and it would be good to support it.
Even if our use case isn't specifically supported, being able to disable the rule for class methods and properties would be consistent with the currentproperties
option.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 1.2.0 |
TypeScript | 3.3.1 |
ESLint | 5.11.1 |
node | 8.10.0 |
npm | 6.4.1 |