Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ezhlobo/eslint-plugin-react-pug
Add supporting of pugjs with react
https://github.com/ezhlobo/eslint-plugin-react-pug
babel eslint eslint-plugin eslint-rules eslintplugin pug pug-templates pugjs react
Last synced: 26 days ago
JSON representation
Add supporting of pugjs with react
- Host: GitHub
- URL: https://github.com/ezhlobo/eslint-plugin-react-pug
- Owner: ezhlobo
- License: mit
- Created: 2017-09-19T14:01:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T21:47:09.000Z (over 2 years ago)
- Last Synced: 2024-09-27T08:40:47.824Z (about 1 month ago)
- Topics: babel, eslint, eslint-plugin, eslint-rules, eslintplugin, pug, pug-templates, pugjs, react
- Language: JavaScript
- Size: 274 KB
- Stars: 20
- Watchers: 3
- Forks: 4
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-react-pug
Add supporting of pugjs with react.
[![npm version](https://img.shields.io/npm/v/eslint-plugin-react-pug.svg?longCache)](https://www.npmjs.com/package/eslint-plugin-react-pug) [![CI Status](https://img.shields.io/circleci/project/github/ezhlobo/eslint-plugin-react-pug/master.svg?longCache)](https://circleci.com/gh/ezhlobo/eslint-plugin-react-pug/tree/master)
It adds supporting of [babel-plugin-transform-react-pug](https://github.com/pugjs/babel-plugin-transform-react-pug).
## Table of Contents
* [Installation](#installation)
* [Usage](#usage)
* [List of supported rules](#list-of-supported-rules)## Installation
You'll first need to install [ESLint](http://eslint.org):
```
$ npm i eslint --save-dev
```Next, install `eslint-plugin-react-pug`:
```
$ npm install eslint-plugin-react-pug --save-dev
```**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-react-pug` globally.
## Usage
Add `react-pug` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": [
"react-pug"
]
}
```Then configure the rules you want to use under the rules section.
```json
{
"extends": [
"plugin:react-pug/all"
]
}
```## List of supported rules
* [`react-pug/empty-lines`](./docs/rules/empty-lines.md): Manage empty lines in Pug
* [`react-pug/eslint`](./docs/rules/eslint.md): Lint JavaScript code inside Pug
* [`react-pug/indent`](./docs/rules/indent.md): Enforce consistent indentation
* [`react-pug/no-broken-template`](./docs/rules/no-broken-template.md): Disallow broken template
* [`react-pug/no-interpolation`](./docs/rules/no-interpolation.md): Disallow JavaScript interpolation
* [`react-pug/no-undef`](./docs/rules/no-undef.md): Disallow undeclared variables in Pug
* [`react-pug/prop-types`](./docs/rules/prop-types.md): Manage prop-types usage
* [`react-pug/quotes`](./docs/rules/quotes.md): Manage quotes in Pug
* [`react-pug/uses-react`](./docs/rules/uses-react.md): Prevent React to be marked as unused
* [`react-pug/uses-vars`](./docs/rules/uses-vars.md): Prevent variables used in Pug to be marked as unusedExperimental:
* [`react-pug/pug-lint`](./docs/rules/pug-lint.md): Inherit pug-lint to validate pug