https://github.com/txchen/eslint-plugin-riot
An ESLint plugin to extract and lint scripts from riotjs tag.
https://github.com/txchen/eslint-plugin-riot
Last synced: 4 months ago
JSON representation
An ESLint plugin to extract and lint scripts from riotjs tag.
- Host: GitHub
- URL: https://github.com/txchen/eslint-plugin-riot
- Owner: txchen
- License: mit
- Created: 2015-08-05T05:08:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-09-20T22:31:56.000Z (almost 6 years ago)
- Last Synced: 2025-10-31T00:40:39.574Z (8 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/eslint-plugin-riot
- Size: 20.5 KB
- Stars: 28
- Watchers: 2
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## eslint-plugin-riot
[![Build Status][travis-image]][travis-url]
[![NPM version][npm-version-image]][npm-url]
[![Code Climate][codeclimate-image]][codeclimate-url]
An [ESLint](http://eslint.org/) plugin to extract and lint scripts from [riot](https://riotjs.com) tag.
Supported extensions are `.html` and `.tag`.
It only lints `es6`, `babel` or `javascript` script in tag. It does not support riot mini es6 syntax.
### Usage
Install the plugin:
```sh
npm install --save-dev eslint-plugin-riot
```
Add it to your `.eslintrc`:
```json
{
"plugins": ["riot"]
}
```
Write your riot tag file with extension `.html` or `.tag`, and wrap your script with ` `, for example:
```html
this.likePost = () => {
riot.control.trigger(riot.VE.LIKE_POST, opts.data.postId)
}
```
### Example
[Here](https://github.com/txchen/feplay/tree/gh-pages/riot_webpack) is an example of project that use riot + es6 + webpack + eslint + eslint-plugin-riot. It will show you how to use this plugin to configure your project.
[codeclimate-image]:https://codeclimate.com/github/txchen/eslint-plugin-riot/badges/gpa.svg
[codeclimate-url]:https://codeclimate.com/github/txchen/eslint-plugin-riot
[npm-version-image]:http://img.shields.io/npm/v/eslint-plugin-riot.svg?style=flat-square
[npm-url]:https://www.npmjs.com/package/eslint-plugin-riot
[travis-image]:https://api.travis-ci.org/txchen/eslint-plugin-riot.svg?branch=master
[travis-url]:https://travis-ci.org/txchen/eslint-plugin-riot