This repository was archived by the owner on Jan 19, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 75
camelcase: false positive on interface properties #492
Comments
I've dug into the codebase a little bit. typescript-eslint-parser outputs an interface's property as the following AST:
{
"type": "TSPropertySignature",
"range": [
16,
29
],
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 29
}
},
"computed": false,
"key": {
"type": "Identifier",
"range": [
16,
19
],
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 19
}
},
"name": "bar"
},
"typeAnnotation": {
"type": "TSTypeAnnotation",
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 28
}
},
"range": [
20,
28
],
"typeAnnotation": {
"type": "TSStringKeyword",
"range": [
22,
28
],
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 28
}
}
}
}
} Which is ace. Note that the property's Running through the rule definition, they have an So this is the problem I think. Our parent type is Sooooo.. Correct me if I'm wrong - but based on my understanding of how this parser is intended to work...
So I really see two solutions.
|
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of TypeScript are you using?
2.9.1
What version of
typescript-eslint-parser
are you using?16.0.0
What code were you trying to parse?
What did you expect to happen?
the interface property passes fine
What happened?
[eslint] Identifier 'bar_baz' is not in camel case. (camelcase)
The text was updated successfully, but these errors were encountered: