0.0.2-rc.2 • Published 4 years ago

eslint-config-vue3-jsx v0.0.2-rc.2

Weekly downloads
-
License
-
Repository
github
Last release
4 years ago

eslint-config-vue3-jsx

A config preset for develop vue3, which using jsx

Installation

$ npm i eslint-config-vue3-jsx -D

Usage

Add vue3-jsx to the extends section of your .eslintrc configuration file. You can omit the eslint-config- prefix:

module.exports = {
    extends: ['vue3-jsx'],
}

需保证项目已安装 typescript 依赖,另外如果项目的 TS 配置文件不是 ./tsconfig.json,则需要设置 .eslintrc 中的 parserOptions.project 字段 ,例如:

module.exports = {
    extends: ['vue3-jsx'],
    parserOptions: {
        project: './tsconfig.eslint.json',
    },
}

Others

 项目中已经内置了 prettier,  你只需根据个人喜好或 复制 .prettierignore.prettierrc.js文件到你的根项目即可

如果vscode不能正确显示报错信息,请打开settings.json, 键入

    "eslint.validate": ["javascript", "javascriptreact", "typescriptreact"]