Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peakchen90/eslint-plugin-react-directives
some rules for babel-plugin-react-directives.
https://github.com/peakchen90/eslint-plugin-react-directives
directive eslint eslint-plugin no-undef no-unused-vars react react-directive x-for
Last synced: about 5 hours ago
JSON representation
some rules for babel-plugin-react-directives.
- Host: GitHub
- URL: https://github.com/peakchen90/eslint-plugin-react-directives
- Owner: peakchen90
- License: mit
- Created: 2019-10-06T14:29:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-18T15:33:58.000Z (over 2 years ago)
- Last Synced: 2024-11-11T20:42:26.691Z (7 days ago)
- Topics: directive, eslint, eslint-plugin, no-undef, no-unused-vars, react, react-directive, x-for
- Language: JavaScript
- Homepage: https://npm.im/eslint-plugin-react-directives
- Size: 20.5 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-react-directives
[![Build Status](https://app.travis-ci.com/peakchen90/eslint-plugin-react-directives.svg?branch=master)](https://app.travis-ci.com/peakchen90/eslint-plugin-react-directives)
![node](https://img.shields.io/node/v/eslint-plugin-react-directives.svg)
![npm peer dependency version](https://img.shields.io/npm/dependency-version/eslint-plugin-react-directives/peer/eslint.svg)
[![npm](https://img.shields.io/npm/v/eslint-plugin-react-directives.svg)](https://www.npmjs.com/package/eslint-plugin-react-directives)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/peakchen90/eslint-plugin-react-directives/blob/master/LICENSE)some rules for [babel-plugin-react-directives](https://github.com/peakchen90/babel-plugin-react-directives).
## Installation
You'll first need to install [ESLint](http://eslint.org):
```
$ npm i eslint --save-dev
```Next, install `eslint-plugin-react-directives`:
```
$ npm install eslint-plugin-react-directives --save-dev
```**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-react-directives` globally.
## Usage
There are two ways to configure it via `.eslintrc`:
```json
{
"plugins": [
"react-directives"
],
"rules": {
"no-undef": "off",
"react-directives/no-undef": "error"
}
}
```or use the recommended rules:
```json
{
"extends": [
"plugin:react-directives/recommended"
],
"rules": {
"no-undef": "off"
}
}
```## Settings
If you have configured some options in [`babel-plugin-react-directives`](https://github.com/peakchen90/babel-plugin-react-directives#plugin-options), add `settings` section to `.eslintrc` file.
```json
{
"settings": {
"react-directives": {
"prefix": "x"
}
}
}
```## List of supported rules
* [react-directives/no-undef](./docs/rules/no-undef.md) Disallow Undeclared Variables.
## Shareable configurations
### Recommended
This plugin exports a recommended configuration.To enable this configuration use the extends property in your .eslintrc config file:
```json
{
"extends": [
"plugin:react-directives/recommended"
]
}
```The rules enabled in this configuration are:
* [react-directives/no-undef](./docs/rules/no-undef.md)