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

vue-eslint-parser

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-eslint-parser - npm Package Compare versions

Comparing version 7.1.1 to 7.2.0

4

index.d.ts

@@ -32,3 +32,3 @@ // Generated by dts-bundle v0.7.3

}
export type ErrorCode = "abrupt-closing-of-empty-comment" | "absence-of-digits-in-numeric-character-reference" | "cdata-in-html-content" | "character-reference-outside-unicode-range" | "control-character-in-input-stream" | "control-character-reference" | "eof-before-tag-name" | "eof-in-cdata" | "eof-in-comment" | "eof-in-tag" | "incorrectly-closed-comment" | "incorrectly-opened-comment" | "invalid-first-character-of-tag-name" | "missing-attribute-value" | "missing-end-tag-name" | "missing-semicolon-after-character-reference" | "missing-whitespace-between-attributes" | "nested-comment" | "noncharacter-character-reference" | "noncharacter-in-input-stream" | "null-character-reference" | "surrogate-character-reference" | "surrogate-in-input-stream" | "unexpected-character-in-attribute-name" | "unexpected-character-in-unquoted-attribute-value" | "unexpected-equals-sign-before-attribute-name" | "unexpected-null-character" | "unexpected-question-mark-instead-of-tag-name" | "unexpected-solidus-in-tag" | "unknown-named-character-reference" | "end-tag-with-attributes" | "duplicate-attribute" | "end-tag-with-trailing-solidus" | "non-void-html-element-start-tag-with-trailing-solidus" | "x-invalid-end-tag" | "x-invalid-namespace";
export type ErrorCode = "abrupt-closing-of-empty-comment" | "absence-of-digits-in-numeric-character-reference" | "cdata-in-html-content" | "character-reference-outside-unicode-range" | "control-character-in-input-stream" | "control-character-reference" | "eof-before-tag-name" | "eof-in-cdata" | "eof-in-comment" | "eof-in-tag" | "incorrectly-closed-comment" | "incorrectly-opened-comment" | "invalid-first-character-of-tag-name" | "missing-attribute-value" | "missing-end-tag-name" | "missing-semicolon-after-character-reference" | "missing-whitespace-between-attributes" | "nested-comment" | "noncharacter-character-reference" | "noncharacter-in-input-stream" | "null-character-reference" | "surrogate-character-reference" | "surrogate-in-input-stream" | "unexpected-character-in-attribute-name" | "unexpected-character-in-unquoted-attribute-value" | "unexpected-equals-sign-before-attribute-name" | "unexpected-null-character" | "unexpected-question-mark-instead-of-tag-name" | "unexpected-solidus-in-tag" | "unknown-named-character-reference" | "end-tag-with-attributes" | "duplicate-attribute" | "end-tag-with-trailing-solidus" | "non-void-html-element-start-tag-with-trailing-solidus" | "x-invalid-end-tag" | "x-invalid-namespace" | "x-missing-interpolation-end";
}

@@ -502,3 +502,3 @@

type: "VDirectiveKey";
parent: VAttribute;
parent: VDirective;
name: VIdentifier;

@@ -505,0 +505,0 @@ argument: VExpressionContainer | VIdentifier | null;

{
"name": "vue-eslint-parser",
"version": "7.1.1",
"version": "7.2.0",
"description": "The ESLint custom parser for `.vue` files.",

@@ -24,3 +24,3 @@ "engines": {

"devDependencies": {
"@mysticatea/eslint-plugin": "^11.0.0",
"@mysticatea/eslint-plugin": "^13.0.0",
"@types/debug": "0.0.30",

@@ -31,3 +31,3 @@ "@types/estree": "0.0.38",

"@types/node": "^10.12.21",
"@typescript-eslint/parser": "^2.31.0",
"@typescript-eslint/parser": "^4.7.0",
"babel-eslint": "^10.0.1",

@@ -49,3 +49,3 @@ "chokidar": "^2.0.4",

"ts-node": "^8.1.0",
"typescript": "~3.4.4",
"typescript": "~4.0.5",
"wait-on": "^3.2.0",

@@ -60,3 +60,3 @@ "warun": "^1.0.0"

"coverage": "opener ./coverage/lcov-report/index.html",
"lint": "node -e \"if(process.env.ESLINT=='5')process.exit(1)\" && eslint src test --ext .js,.ts || node -e \"if(process.env.ESLINT!='5')process.exit(1)\"",
"lint": "eslint src test --ext .js,.ts",
"setup": "git submodule update --init && cd test/fixtures/eslint && npm install",

@@ -66,2 +66,3 @@ "pretest": "run-s build lint",

"test:mocha": "nyc mocha \"test/*.js\" --reporter dot --timeout 10000",
"test:debug": "mocha --inspect --require ts-node/register \"test/*.js\" --reporter dot --timeout 10000",
"preupdate-fixtures": "npm run -s build",

@@ -82,3 +83,3 @@ "update-fixtures": "node scripts/update-fixtures-ast.js && node scripts/update-fixtures-document-fragment.js",

"type": "git",
"url": "git+https://github.com/mysticatea/vue-eslint-parser.git"
"url": "git+https://github.com/vuejs/vue-eslint-parser.git"
},

@@ -89,6 +90,6 @@ "keywords": [],

"bugs": {
"url": "https://github.com/mysticatea/vue-eslint-parser/issues"
"url": "https://github.com/vuejs/vue-eslint-parser/issues"
},
"homepage": "https://github.com/mysticatea/vue-eslint-parser#readme",
"homepage": "https://github.com/vuejs/vue-eslint-parser#readme",
"funding": "https://github.com/sponsors/mysticatea"
}

@@ -5,5 +5,5 @@ # vue-eslint-parser

[![Downloads/month](https://img.shields.io/npm/dm/vue-eslint-parser.svg)](http://www.npmtrends.com/vue-eslint-parser)
[![Build Status](https://github.com/mysticatea/vue-eslint-parser/workflows/CI/badge.svg)](https://github.com/mysticatea/vue-eslint-parser/actions)
[![Coverage Status](https://codecov.io/gh/mysticatea/vue-eslint-parser/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/vue-eslint-parser)
[![Dependency Status](https://david-dm.org/mysticatea/vue-eslint-parser.svg)](https://david-dm.org/mysticatea/vue-eslint-parser)
[![Build Status](https://github.com/vuejs/vue-eslint-parser/workflows/CI/badge.svg)](https://github.com/vuejs/vue-eslint-parser/actions)
[![Coverage Status](https://codecov.io/gh/vuejs/vue-eslint-parser/branch/master/graph/badge.svg)](https://codecov.io/gh/vuejs/vue-eslint-parser)
[![Dependency Status](https://david-dm.org/vuejs/vue-eslint-parser.svg)](https://david-dm.org/vuejs/vue-eslint-parser)

@@ -94,2 +94,79 @@ The ESLint custom parser for `.vue` files.

### parserOptions.vueFeatures
You can use `parserOptions.vueFeatures` property to specify how to parse related to Vue features.
For example:
```json
{
"parser": "vue-eslint-parser",
"parserOptions": {
"vueFeatures": {
"filter": true,
"interpolationAsNonHTML": false,
}
}
}
```
### parserOptions.vueFeatures.filter
You can use `parserOptions.vueFeatures.filter` property to specify whether to parse the Vue2 filter. If you specify `false`, the parser does not parse `|` as a filter.
For example:
```json
{
"parser": "vue-eslint-parser",
"parserOptions": {
"vueFeatures": {
"filter": false
}
}
}
```
If you specify `false`, it can be parsed in the same way as Vue 3.
The following template parses as a bitwise operation.
```vue
<template>
<div>{{ a | b }}</div>
</template>
```
However, the following template that are valid in Vue 2 cannot be parsed.
```vue
<template>
<div>{{ a | valid:filter }}</div>
</template>
```
### parserOptions.vueFeatures.interpolationAsNonHTML
You can use `parserOptions.vueFeatures.interpolationAsNonHTML` property to specify whether to parse the interpolation as HTML. If you specify `true`, the parser handles the interpolation as non-HTML (However, you can use HTML escaping in the interpolation).
For example:
```json
{
"parser": "vue-eslint-parser",
"parserOptions": {
"vueFeatures": {
"interpolationAsNonHTML": true
}
}
}
```
If you specify `true`, it can be parsed in the same way as Vue 3.
The following template can be parsed well.
```vue
<template>
<div>{{a<b}}</div>
</template>
```
But, it cannot be parsed with Vue 2.
## ๐ŸŽ‡ Usage for custom rules / plugins

@@ -119,3 +196,3 @@

- [GitHub Releases](https://github.com/mysticatea/vue-eslint-parser/releases)
- [GitHub Releases](https://github.com/vuejs/vue-eslint-parser/releases)

@@ -122,0 +199,0 @@ ## ๐Ÿป Contributing

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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