0.8.0 • Published 9 months ago

eslint-plugin-wxml v0.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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

0.8.0

9 months ago

0.7.5

2 years ago

0.7.2

3 years ago

0.7.4

2 years ago

0.7.3

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.5.0

3 years ago

0.4.1

3 years ago

0.6.0

3 years ago

0.3.0

3 years ago

0.4.0

3 years ago

0.1.0

3 years ago

0.2.1

3 years ago

0.0.3

3 years ago

0.2.0

3 years ago

0.0.2

3 years ago

0.0.4

3 years ago

0.0.1

6 years ago