Closed Jessidhia closed 7 years ago
It looks like TypeScript 2.3 has a new JSXAttributes
kind (253), which is the new type of the opening element attributes
property, instead of being a just an array of JSXAttribute
.
The commit to blame is probably https://github.com/Microsoft/TypeScript/commit/41108dbaaec656b3bfedc77be63ac143c56c76ee
I worked around it locally by editing node_modules/tslint-react/rules/jsxAlignmentRule.js
like so:
JsxAlignmentWalker.prototype.checkElement = function (elementOpen, attributes, elementClose, closingTag) {
+ attributes = attributes && attributes.properties ? attributes.properties : attributes;
if (attributes == null || attributes.length === 0) {
But this change would be invalid in the typescript source.
The above error seems to happen when using tslint 5.1.0, typescript 2.3.0; not sure how to reduce the input to a code snippet.
The unique part of the stack trace, for which I had to edit
tslint/lib/linter.js
to be able to obtain at all, looks like this: