You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following rules specified in configuration couldn't be applied to .js or .jsx files:
jsx-ban-elements
jsx-curly-spacing
Make sure to exclude them from "jsRules" section of your tslint.json.
Files are not linted and therefore no error reported.
It is because the source of the rules at tslint-react/src/rules/jsxBanElementsRule.ts and tslint-react/src/rules/jsxCurlySpacingRule.ts contain typescriptOnly: true.
But if I manually modify the source of the rules (inside node_modules) to typescriptOnly: false, then the errors are properly reported.
WARNING: /Test1.jsx[5, 14]: JSX element 'foo' is banned. Use 'bar' instead.
WARNING: /Test2.jsx[5, 22]: There should be no space after {
WARNING: /Test2.jsx[5, 37]: There should be no space before }
Nowadays source code on master branch leads to this situation. All other rules support jsx (jsRules).
The text was updated successfully, but these errors were encountered:
artola
changed the title
support for jsx (jsRules) for jsx-ban-elements and
support for jsx (jsRules) for jsx-ban-elements and jsx-curly-spacingApr 22, 2018
Having the following
tslint.json
:and these files:
I get the following messages at lint time:
Files are not linted and therefore no error reported.
It is because the source of the rules at
tslint-react/src/rules/jsxBanElementsRule.ts
andtslint-react/src/rules/jsxCurlySpacingRule.ts
containtypescriptOnly: true
.But if I manually modify the source of the rules (inside
node_modules
) totypescriptOnly: false
, then the errors are properly reported.Nowadays source code on master branch leads to this situation. All other rules support
jsx
(jsRules
).The text was updated successfully, but these errors were encountered: