🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

mpxml-eslint-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpxml-eslint-parser

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

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

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.

💿 Installation

$ 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

  • Write parser option into your .eslintrc.* file.
  • Use glob patterns or --ext .wxml CLI option.
{
    "extends": "eslint:recommended",
    "parser": "mpxml-eslint-parser"
}
$ 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, the default parser of ESLint, is supporting. For example:

{
    "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.

FAQs

Package last updated on 01 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts