Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-wxml

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-wxml

eslint plugin for wxml

  • 0.8.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslint-plugin-wxml

npm version CI GitHub license Twitter Follow Author PRs Welcome

An ESLint plugin to lint wxml files.

Show Case

vscode eslint-plugin-wxml

Installation

## npm
$ npm install eslint-plugin-wxml --save-dev

## cnpm (for china user)
$ cnpm install eslint-plugin-wxml --save-dev

## pnpm
$ pnpm add eslint-plugin-wxml -D

## yarn
$ yarn add eslint-plugin-wxml -D

Basic Usage

Configuration (eslint.config.mjs)

Use eslint.config.mjs file to configure rules. This is the default in ESLint v9, but can be used starting from ESLint v8.57.0. See also: https://eslint.org/docs/latest/use/configure/configuration-files-new.

Example eslint.config.mjs:

import wxml from "eslint-plugin-wxml";
import wxmlParser from "@wxml/parser";

export default [
  {
    files: ["**/*.wxml"],
    plugins: {
      wxml: wxml,
    },
    languageOptions: {
      parser: wxmlParser,
    },
    rules: {
      "wxml/report-wxml-syntax-error": "error",
    },
  },
];

Configuration (.eslintrc)

Use .eslintrc.* file to configure rules. See also: https://eslint.org/docs/v8.x/use/configure/configuration-files.

+  "overrides": [
+    {
+      "files": ["*.wxml"],
+      "rules": {
+        "wxml/report-wxml-syntax-error": "error"
+      },
+      "plugins": ["wxml"],
+      "processor": "wxml/wxml",
+      "parser": "@wxml/parser"
+    }
+  ],

Missing Rule

Missing your wanted rule ? please report it as a new github issue, thanks !

Documentation

See the official website

License

MIT

Copyright (c) 2021-present, Lei Chen

Keywords

FAQs

Package last updated on 20 Apr 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc