Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@swanide/eslint-plugin-swan

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swanide/eslint-plugin-swan

swan eslint plugin

latest
npmnpm
Version
0.0.3
Version published
Maintainers
4
Created
Source

@swanide/eslint-plugin-swan

eslint plugin for swan program.

support codes:

  • swan Baidu smart program tpl language
  • sjs JavasSript code

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install @swanide/eslint-plugin-swan:

$ npm install @swanide/eslint-plugin-swan --save-dev

Bin

Install @swanide/eslint-plugin-swan global.

$ npm install eslint @swanide/eslint-plugin-swan -g

Use swan-lint to lint mini program project.

$ swan-lint .

Use different lint level.

$ SWAN_LINT_CONFIG=[base|recommended|strict] swan-lint .
  • base basic lint rules, must be fixed
  • recommended recommended lint rules
  • strict strict lint rules

Usage

Add swan to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "@swanide/swan"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "@swanide/swan/valid-bind": 2
    }
}

Supported Rules

FAQs

Package last updated on 23 Aug 2023

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