How to use the @vue/cli-plugin-eslint/eslintOptions.config function in @vue/cli-plugin-eslint

To help you get started, we’ve selected a few @vue/cli-plugin-eslint 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 vuejs / vue-cli / packages / @vue / cli / __tests__ / invoke.spec.js View on Github external
jest.setTimeout(20000)
jest.mock('inquirer')

const invoke = require('../lib/invoke')
const { expectPrompts } = require('inquirer')
const create = require('@vue/cli-test-utils/createTestProject')

const parseJS = file => {
  const res = {}
  ;(new Function('module', file))(res)
  return res.exports
}

const baseESLintConfig = Object.assign({}, require('@vue/cli-plugin-eslint/eslintOptions').config({
  hasPlugin: () => false
}), {
  rules: {
    'no-console': 'off',
    'no-debugger': 'off'
  }
})

async function createAndInstall (name) {
  const project = await create(name, {
    plugins: {
      '@vue/cli-plugin-babel': {}
    }
  })
  // mock install
  const pkg = JSON.parse(await project.read('package.json'))

@vue/cli-plugin-eslint

eslint plugin for vue-cli

MIT
Latest version published 2 years ago

Package Health Score

70 / 100
Full package analysis