Skip to content

Commit 748beac

Browse files
committed
Docs: update README.md
1 parent e5b2cbb commit 748beac

File tree

1 file changed

+54
-1
lines changed

1 file changed

+54
-1
lines changed

README.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,55 @@
11
# vue-eslint-parser
2-
An experiment for the ESLint custom parser of `.vue` file.
2+
3+
[![npm version](https://img.shields.io/npm/v/vue-eslint-parser.svg)](https://www.npmjs.com/package/vue-eslint-parser)
4+
[![Downloads/month](https://img.shields.io/npm/dm/vue-eslint-parser.svg)](http://www.npmtrends.com/vue-eslint-parser)
5+
[![Build Status](https://travis-ci.org/mysticatea/vue-eslint-parser.svg?branch=master)](https://travis-ci.org/mysticatea/vue-eslint-parser)
6+
[![Coverage Status](https://codecov.io/gh/mysticatea/vue-eslint-parser/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/vue-eslint-parser)
7+
[![Dependency Status](https://david-dm.org/mysticatea/vue-eslint-parser.svg)](https://david-dm.org/mysticatea/vue-eslint-parser)
8+
9+
The ESLint custom parser of `.vue` file.
10+
11+
ESLint supports autofix on custom parsers but does not support autofix on plugins which have processors ([eslint/eslint#7510](https://github.com/eslint/eslint/issues/7510)). The motivation of this custom parser is that it supports autofix on `.vue` files.
12+
13+
## :cd: Installation
14+
15+
```bash
16+
$ npm install --save-dev eslint vue-eslint-parser
17+
```
18+
19+
- `vue-eslint-parser` requires ESLint 3.5.0 or later.
20+
21+
## :book: Usage
22+
23+
1. Write `parser` option in your `.eslintrc.*` file.
24+
2. Use glob patterns or `--ext .vue` CLI option.
25+
26+
```json
27+
{
28+
"extends": "eslint:recommended",
29+
"parser": "vue-eslint-parser"
30+
}
31+
```
32+
33+
```bash
34+
$ eslint "src/**.{js,vue}"
35+
# or
36+
$ eslint src --ext .vue
37+
```
38+
39+
## :newspaper: Changelog
40+
41+
- [GitHub Releases](https://github.com/mysticatea/vue-eslint-parser/releases)
42+
43+
## :muscle: Contributing
44+
45+
Welcome contributing!
46+
47+
Please use GitHub's Issues/PRs.
48+
49+
### Development Tools
50+
51+
- `npm test` runs tests and measures coverage.
52+
- `npm run coverage` shows the coverage result of `npm test` command with the default browser.
53+
- `npm run clean` removes the coverage result of `npm test` command.
54+
- `npm run lint` runs ESLint.
55+
- `npm run watch` runs tests with `--watch` option.

0 commit comments

Comments
 (0)