当前位置: 首页 > news >正文

做百度网站每年的费用多少钱西安百度竞价开户

做百度网站每年的费用多少钱,西安百度竞价开户,凡科轻站小程序模板,wordpress安卓ios应用在项目团队开发过程中,多人协同开发为保证项目格式书写格式统一标准化,因此需要进行代码格式化校验,包括在代码编写过程中以及代码提交前进行自动格式化,因此需要进行在项目中进行相关的配置使之代码格式一致。 一、eslint配置 …

        在项目团队开发过程中,多人协同开发为保证项目格式书写格式统一标准化,因此需要进行代码格式化校验,包括在代码编写过程中以及代码提交前进行自动格式化,因此需要进行在项目中进行相关的配置使之代码格式一致。 

一、eslint配置

eslint是提供一个插件化的javascript代码检测工具。

安装eslint

pnpm i eslint -D

生成配置文件,执行如下命令后自动生成对应的配置文件:eslint.cjs

 nps eslint --init

执行命令后根据提示选择如下配置完成文件生成 

添加eslint校验规则

module.exports = {// 环境配置"env": {"browser": true,//浏览器运行"es2021": true},// 规则继承"extends": [// 全部规则默认是关闭的,该配置会开启推荐规则,按照文档进行配置"eslint:recommended","plugin:@typescript-eslint/recommended","plugin:vue/vue3-essential"],"overrides": [{"env": {"node": true},"files": [".eslintrc.{js,cjs}"],"parserOptions": {"sourceType": "script"}}],"parserOptions": {"ecmaVersion": "latest","parser": "@typescript-eslint/parser","sourceType": "module"},"plugins": ["@typescript-eslint","vue"],// eslint 规则"rules": {'no-var': 'error',  // 禁止var'no-multiple-empty-lines': ['warn', {max: 1}], // 不允许多个空行'no-useless-escape': 'off', // 关闭禁止不必要的转义字符// typeScript'@typescript-eslint/no-unused-vars': 'error','@typescript-eslint/no-explicit-any': 'off',// eslint-plugin-vue'vue/multi-word-component-names': 'off',  // 关闭名称只能-连接'vue/no-mutating-props': 'off',  // 关闭组件prop不能改变'vue/attribute-hyphenation': 'off', // 关闭对模板中自定义组件强制执行属性命名样式}
}

添加忽略校验文件配置,创建文件:.eslintignore 

dist
node_modeules

添加运行脚本

在package.json 中新增运行脚本

  "scripts": {"lint": "eslint src","fix": "eslint src --fix"},

 二、配置prettier

eslint是针对javascript进行语法检测,保证程序的准确运行,preitter是对代码格式进行统一格式化的工具,保证项目格式一致美观;

1、安装依赖包

 pnpm install -D eslint-plugin-prettier prettier eslint-config-prettier

2、添加.preitterc.json文件

{"singleQuote": true,"semi": false,"bracketSpacing": true,"htmlWhitespaceSensitivity": "ignore","endOfLine": "auto","trailingComma": "all","tabWidth": 2}

3、添加.prettierignore文件

/dist/*
/html/*
.local
/node_modules/**
**/*.svg
**/*.sh
/public/*

当代码不规范时执行如下就会提示错误:

 三、配置stylelintrc.cjs

1、安装依赖

pnpm add sass sass-loader stylelint postcss postcss-scss postcss-html stylelint-config-prettier stylelint-cnfig-recess-order stylelint-config-recommended-scss stylelint-config-standard stylelint-config-standard-vue stylelint-scss stylelint-order stylelint-config-standard-scss -D

2、配置.stylelintignore文件

/node_modules/*
/dist/*
/html/*
/public/*

3、配置.stylelintrc.cjs文件

// @see https://stylelint.bootcss.com/module.exports = {extends: ['stylelint-config-standard', // 配置stylelint拓展插件'stylelint-config-html/vue', // 配置 vue 中 template 样式格式化'stylelint-config-standard-scss', // 配置stylelint scss插件'stylelint-config-recommended-vue/scss', // 配置 vue 中 scss 样式格式化'stylelint-config-recess-order', // 配置stylelint css属性书写顺序插件,'stylelint-config-prettier', // 配置stylelint和prettier兼容],overrides: [{files: ['**/*.(scss|css|vue|html)'],customSyntax: 'postcss-scss',},{files: ['**/*.(html|vue)'],customSyntax: 'postcss-html',},],ignoreFiles: ['**/*.js','**/*.jsx','**/*.tsx','**/*.ts','**/*.json','**/*.md','**/*.yaml',],/*** null  => 关闭该规则* always => 必须*/rules: {'value-keyword-case': null, // 在 css 中使用 v-bind,不报错'no-descending-specificity': null, // 禁止在具有较高优先级的选择器后出现被其覆盖的较低优先级的选择器'function-url-quotes': 'always', // 要求或禁止 URL 的引号 "always(必须加上引号)"|"never(没有引号)"'no-empty-source': null, // 关闭禁止空源码'selector-class-pattern': null, // 关闭强制选择器类名的格式'property-no-unknown': null, // 禁止未知的属性(true 为不允许)'block-opening-brace-space-before': 'always', //大括号之前必须有一个空格或不能有空白符'value-no-vendor-prefix': null, // 关闭 属性值前缀 --webkit-box'property-no-vendor-prefix': null, // 关闭 属性前缀 -webkit-mask'selector-pseudo-class-no-unknown': [// 不允许未知的选择器true,{ignorePseudoClasses: ['global', 'v-deep', 'deep'], // 忽略属性,修改element默认样式的时候能使用到},],},
}

http://www.hkea.cn/news/603750/

相关文章:

  • 物联网平台有哪些排名优化外包公司
  • 秦皇岛汽车网站制作数字营销工具
  • 培训教育的网站怎么做东莞做网站的联系电话
  • 云南做网站的公司外贸谷歌优化
  • 网页设计学徒培训可试学巢湖seo推广
  • 让顾客心动的句子seo模拟点击软件源码
  • 设计类专业包括哪些kj6699的seo综合查询
  • 手机网站制作哪家好查关键词
  • 米拓企业网站管理系统电商培训机构排名前十
  • 做效果图有哪些网站seo点击排名
  • 网络营销推广网站收录seo推广排名平台有哪些
  • 产品经理如何看待网站开发广州软件系统开发seo推广
  • wordpress 忘记管理员如何做网站seo
  • app和网站哪个有优势淘宝关键词排名
  • wordpress该域名宁波网站seo公司
  • 建购物网站怎么建呀简单的网站建设
  • 江苏省建设教育协会网站首页百度知道合伙人答题兼职入口
  • 做优化的网站平台搭建
  • 做网站需要多久网络推广是什么专业
  • 厦门加盟网站建设线上推广营销
  • 定制网站案例seo搜索引擎优化薪酬
  • 网站制作成功后怎么使用浏览器观看b站视频的最佳设置
  • 一家专门做开网店的网站北京seo专员
  • 专业企业网站搭建服务头条权重查询
  • 去哪儿网站上做民宿需要材料免费的黄冈网站有哪些平台
  • 网站建设网现在推广什么app最挣钱
  • 嘉兴装修公司做网站安装百度到桌面
  • 电商网站特点外贸营销网站建站
  • 上海市住房城乡建设管理委员会网站网络营销软文范例大全800
  • 莱芜区政协网站做网络优化的公司排名