How to use the eslint-plugin-vue.processors function in eslint-plugin-vue

To help you get started, we’ve selected a few eslint-plugin-vue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mysticatea / vue-eslint-demo / src / lib / eslint.js View on Github external
import Linter from "eslint4b"
import plugin from "eslint-plugin-vue"
import * as parser from "vue-eslint-parser"

const verifyOptions = Object.freeze({
    preprocess: plugin.processors[".vue"].preprocess,
    postprocess: plugin.processors[".vue"].postprocess,
})

export const linter = new class extends Linter {
    /** Initialize this linter. */
    constructor() {
        super()
        this.defineParser("vue-eslint-parser", parser)
        for (const name of Object.keys(plugin.rules)) {
            this.defineRule(`vue/${name}`, plugin.rules[name])
        }
    }

    /** @inheritdoc */
    verify(textOrSourceCode, config, options) {
        return super.verify(textOrSourceCode, config, {
            ...options,
github mysticatea / vue-eslint-demo / src / lib / eslint.js View on Github external
import Linter from "eslint4b"
import plugin from "eslint-plugin-vue"
import * as parser from "vue-eslint-parser"

const verifyOptions = Object.freeze({
    preprocess: plugin.processors[".vue"].preprocess,
    postprocess: plugin.processors[".vue"].postprocess,
})

export const linter = new class extends Linter {
    /** Initialize this linter. */
    constructor() {
        super()
        this.defineParser("vue-eslint-parser", parser)
        for (const name of Object.keys(plugin.rules)) {
            this.defineRule(`vue/${name}`, plugin.rules[name])
        }
    }

    /** @inheritdoc */
    verify(textOrSourceCode, config, options) {
        return super.verify(textOrSourceCode, config, {