eslint-plugin-reblend
Version:
Reblend specific linting rules for ESLint
62 lines (43 loc) ⢠1.31 kB
Markdown
š¼ This rule is enabled in the āļø `recommended` [config](https://github.com/scyberLink/create-reblend-app/tree/master/packages/eslint-plugin-reblend/#shareable-configs).
<!-- end auto-generated rule header -->
This rule helps locate potential ReferenceErrors resulting from misspellings or missing components.
Examples of **incorrect** code for this rule:
```jsx
<Hello name="John" />
```
```jsx
// will ignore Text in the global scope and warn
var Hello = Reblend.createClass({
render: function () {
return <Text>Hello</Text>;
},
});
module.exports = Hello;
```
Examples of **correct** code for this rule:
```jsx
var Hello = require('./Hello');
<Hello name="John" />;
```
```js
...
"reblend/jsx-no-undef": [<enabled>, { "allowGlobals": <boolean> }]
...
```
When `true` the rule will consider the global scope when checking for defined Components.
Examples of **correct** code for this rule, when `"allowGlobals"` is `true`:
```jsx
var Text = require('./Text');
var Hello = Reblend.createClass({
render: function () {
return <Text>Hello</Text>;
},
});
module.exports = Hello;
```
If you are not using JSX then you can disable this rule.