This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

eslint-preset-vue
TypeScript icon, indicating that this package has built-in type declarations

2.3.3 • Public • Published

ESLint

version downloads

Shareable ESLint preset for vue.

Usage

  1. Install package:
pnpm add --save-dev eslint eslint-preset-basic eslint-preset-vue
  1. Create ESLint configuration file eslint.config.js:
import { defineFlatConfig, presetBasic } from 'eslint-preset-basic'
import { presetVue } from 'eslint-preset-vue'

export default defineFlatConfig([
  presetBasic({ enableTs: true }),
  presetVue({ enableTs: true }),
  // {
  //   rules: {...}
  // }
])

If your project does not specify "type":"module" in its package.json file, then eslint.config.js must be in CommonJS format, such as:

module.exports = (async () => {
  const { defineFlatConfig, presetBasic } = await import('eslint-preset-basic')
  const { presetVue } = await import('eslint-preset-vue')
  return defineFlatConfig([
    presetBasic({ enableTs: true }),
    presetVue({ enableTs: true }),
    // {
    //   rules: {...}
    // }
  ])
})()
  1. Add script for package.json:
{
  "scripts": {
    "lint": "eslint .",
  }
}

VS Code support

Install VS Code ESLint extension

Add the following settings to your project setting .vscode/settings.json:

{
  // Auto fix
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true,
    "source.organizeImports": false
  },

  // Enable the flat config support
  "eslint.experimental.useFlatConfig": true,

  // Enable eslint for supported languages
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
    "vue"
  ]
}

Please support this project by simply putting a star.

And, enjoy :)

Package Sidebar

Install

npm i eslint-preset-vue

Weekly Downloads

0

Version

2.3.3

License

MIT

Unpacked Size

8.9 kB

Total Files

12

Last publish

Collaborators

  • usings