前端项目相关配置文件

prettier配置文件

.prettierrc.js

module.exports = {
   
    // 一行最多 80 字符
    printWidth: 80,
    // 使用 2 个空格缩进
    tabWidth: 2,
    // 不使用缩进符,而使用空格
    useTabs: false,
    // 行尾需要有分号
    semi: false,
    // 避免报: delete (cr)的错
    endOfLine: 'auto',
    // 使用单引号
    singleQuote: true,
    // 在jsx中把'>' 单独放一行
    jsxBracketSameLine: false,
    // 末尾不添加多余的逗号
    trailingComma: 'none',
    // 此配置用于避免vue模板的html元素内容最后一个>被强制放到单独一行的问题
    htmlWhitespaceSensitivity:'ignore',
}

.prettierignore

node_modules
.history
dist
.vscode
mock
tsconfig.json
vue.config.js
babel.config.js
.eslintrc.js
webstorm.config.js

eslint配置文件

.eslintrc.js

module.exports = {
   
  root: true,
  env: {
   
    node: true,
  },
  extends: [
    "plugin:vue/vue3-essential",
    "eslint:recommended",
    "@vue/typescript/recommended",
    "@vue/prettier",
    "@vue/prettier/@typescript-eslint",
  ],
  parserOptions: {
   
    ecmaVersion: 2020,
  },
  rules: {
   
    "no-console": process
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值