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

@pathscale/eslint-plugin-vue3

Package Overview
Dependencies
Maintainers
8
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pathscale/eslint-plugin-vue3

Extra linting rules for clean Vue3

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
8
Created
Source

@pathscale/eslint-plugin-vue3

linting rules to help enforce our rather limited view of the world.. Highly opinionated and not for everyone

Currently requires eslint-plugin-vue.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install @pathscale/eslint-plugin-vue3:

$ npm install @pathscale/eslint-plugin-vue3 --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install @pathscale/eslint-plugin-vue3 globally.

Usage

Add @pathscale/vue3 to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "@pathscale/vue3"
    ]
}

Then configure the rules you want to use under the rules section. Defaults shown below.

{
    "rules": {
        "@pathscale/vue3/v-directive": ["error", {
            // Add AST that should always be allowed
            "safe": [
                "Literal",
                "Identifier",
                // This only allows the inner template elements; one can still
                //   block `TemplateLiteral`
                "TemplateElement"
            ],

            // Add AST that should not be allowed
            "unsafe": [
                // These just add a single operator, so not blocked by default
                // 'SpreadElement',
                // 'UnaryExpression',

                // This can have design features so not blocking by default
                // 'TemplateLiteral',

                // Note: in avoiding these, one can use a call expression
                "AssignmentExpression",
                "BinaryExpression",
                "LogicalExpression",
                "ConditionalExpression",
            ],

            // Add AST that should not be allowed except at root
            "unsafeNested": [
                "CallExpression"
            ]
        }]
    }
}

Supported Rules

  • @pathscale/vue3/v-directive - See example above

Keywords

FAQs

Package last updated on 08 Oct 2020

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