# mpxml-eslint-parser

> The ESLint custom parser for `.wxml`, `.axml`, `.swan` files.

Latest version **0.0.2** (published 2021-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install mpxml-eslint-parser
pnpm add mpxml-eslint-parser
yarn add mpxml-eslint-parser
bun add mpxml-eslint-parser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-02-01 |
| First published | 2020-11-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0 |
| Dependencies | 6 |
| Unpacked size | 725.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kekee000@gmail.com |
| Maintainers | kekee000 |

## Links

- npm: https://www.npmjs.com/package/mpxml-eslint-parser
- npm.io page: https://npm.io/package/mpxml-eslint-parser

## Dependencies (6)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [espree](https://npm.io/package/espree.md) ^6.2.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [esquery](https://npm.io/package/esquery.md) ^1.0.1
- [eslint-scope](https://npm.io/package/eslint-scope.md) ^5.0.0
- [eslint-visitor-keys](https://npm.io/package/eslint-visitor-keys.md) ^1.1.0

## Recent versions

- 0.0.2 (latest) — 2021-02-01
- 0.0.1 — 2020-11-18

## README

# mpxml-eslint-parser

The ESLint custom parser for `.wxml`, `.axml`, `.swan` files.

The `.wxs` files will be parsed as js files, see `parserOptions`.

modified from [vue-eslint-parser](https://github.com/vuejs/vue-eslint-parser).



## 💿 Installation

```bash
$ npm install --save-dev eslint mpxml-eslint-parser
```

- Requires Node.js 10.18.0 or later.
- Requires ESLint 7.0.0 or later.
- Requires `babel-eslint` 10.1.0 or later if you want it. (optional)
- Requires `@typescript-eslint/parser` 2.31 or later if you want it. (optional)

## 📖 Usage

1. Write `parser` option into your `.eslintrc.*` file.
2. Use glob patterns or `--ext .wxml` CLI option.

```json
{
    "extends": "eslint:recommended",
    "parser": "mpxml-eslint-parser"
}
```

```console
$ eslint "src/**/*.{js,wxml,axml,swan,wxs}"
# or
$ eslint src --ext .wxml --ext .axml --ext .swan  --ext .wxs
```

## 🔧 Options

`parserOptions` has the same properties as what [espree](https://github.com/eslint/espree#usage), the default parser of ESLint, is supporting.
For example:

```json
{
    "parser": "mpxml-eslint-parser",
    "parserOptions": {
        "sourceType": "module",
        "ecmaVersion": 2018,
        "ecmaFeatures": {
            "globalReturn": false,
            "impliedStrict": false,
            "jsx": false
        }
    }
}
```

## 🍻 Contributing

Welcome contributing!


If you want to write code, please execute `npm install && npm run setup` after you cloned this repository.
The `npm install` command installs dependencies.
The `npm run setup` command initializes ESLint as git submodules for tests.

### Development Tools

- `npm test` runs tests and measures coverage.
- `npm run build` compiles TypeScript source code to `index.js`, `index.js.map`, and `index.d.ts`.
- `npm run coverage` shows the coverage result of `npm test` command with the default browser.
- `npm run clean` removes the temporary files which are created by `npm test` and `npm run build`.
- `npm run lint` runs ESLint.
- `npm run setup` setups submodules to develop.
- `npm run watch` runs `build`, `update-fixtures`, and tests with `--watch` option.

---
_Source: https://npm.io/package/mpxml-eslint-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
