eslint and stylelint config
eslint:
module.exports = {
root: true,
env: {
browser: true,
es6: true,
node: true
},
extends: [
'plugin:vue/recommended',
'@vue/standard'
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'import/order': 2,
'no-var': 2,
'prefer-const': 0,
'no-console': 1,
'no-debugger': 1,
'standard/no-callback-literal': 0,
indent: 2,
'vue/singleline-html-element-content-newline': 0,
'vue/max-attributes-per-line': [2, {
singleline: 2,
multiline: {
max: 1,
allowFirstLine: false
}
}],
'vue/script-indent': [2, 2, {
baseIndent: 1,
switchCase: 1
}],
'vue/order-in-components': 1,
'vue/html-closing-bracket-newline': [2, {
singleline: 'never',
multiline: 'always'
}]
},
overrides: [{ files: ['*.vue'], rules: { indent: 'off' } }]
}
stylelint:
module.exports = {
extends: ['stylelint-config-standard'],
plugins: ['stylelint-order'],
rules: {
'order/order': [
'custom-properties',
'declarations'
],
'order/properties-alphabetical-order': true
}
}
package.json:
"@vue/cli-plugin-babel": "~4.3.0",
"@vue/cli-plugin-eslint": "~4.3.0",
"@vue/cli-service": "~4.3.0",
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"eslint": "^7.0.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",
"less-loader": "^6.1.0",
"stylelint": "^13.5.0",
"stylelint-order": "^4.0.0",
"stylelint-config-standard": "^20.0.0",
"vue-template-compiler": "^2.6.11"
eslint and stylelint config的更多相关文章
- 如何为你的 Vue 项目添加配置 Stylelint
如何为你的 Vue 项目添加配置 Stylelint 现在已经是 9102 年了,网上许多教程和分享帖都已经过期,照着他们的步骤来会踩一些坑,如 stylelint-processor-html 已经 ...
- StyleLint 使用指南
StyleLint 是『一个强大的.现代化的 CSS 检测工具』, 与 ESLint 类似, 是通过定义一系列的编码风格规则帮助我们避免在样式表中出现错误. 安装stylelint npm insta ...
- 前端规范之CSS规范(Stylelint)
代码规范是软件开发领域经久不衰的话题,几乎所有工程师在开发过程中都会遇到或思考过这一问题.而随着前端应用的大型化和复杂化,越来越多的前端团队也开始重视代码规范.同样,前段时间,笔者所在的团队也开展了一 ...
- 前端进阶(8) - 前端开发需要了解的工具集合:webpack, eslint, prettier, ...
前端开发需要了解的工具集合:webpack, eslint, prettier, ... 前端开发需要了解的一些工具,这些工具能够帮助你在项目开发中事半功倍. 1. nrm: npm registry ...
- 使用stylelint对CSS/Sass做代码审查
对样式审查?很少人会这么做吧,但实际上开发者应该有这样的态度,尤其是不同团队多人开发时,这一点尤为重要. 在本文中,我将陈述两点:一是为什么我们需要对样式进行审查,二是如何将审查工具融合到整体的构建流 ...
- eslint 代码规范
官网:https://github.com/standard/standard/blob/master/docs/RULES-zhcn.md JavaScript Standard Style Eng ...
- webpack4.26的详细配置,包含babel, eslint, postcss, 及各种所需loader,内含大量注释
github地址:https://github.com/qianxiaoning/demo-webpack4.26 内含详尽注释 欢迎大家star或者fork呀~ 目录结构: completeDemo ...
- stylelint — css书写规范
sass lint guidance 一.安装:npm intsall -g stylelint 二.配置:http://stylelint.io/user-guide/rules/ (以下规则文件配 ...
- vscode 全局安装和配置 stylelint 像 webstorm 等 ide 一样来检查项目
商店里安装完插件以后全局安装或者在项目中(记得加--save-dev)安装配置: npm install stylelint-config-recommended -g 然后在vscode setti ...
随机推荐
- Docker run 命令参数及使用
Docker run 命令参数及使用 Docker run :创建一个新的容器并运行一个命令 语法 docker run [OPTIONS] IMAGE [COMMAND] [ARG...] OPTI ...
- 构建后端第5篇之---Idea 查看继承 实现关系图
first question: how to show a class children class : move mousrmark to class name , Ctrl + H how t ...
- js学习笔记之自调用函数、闭包、原型链
自调用函数 var name = 'world!'; // console.log(typeof name) (function () { console.log(this.name, name, ...
- js 时间戳转为日期
1 function time(){ //页面时间戳转换成时间 2 $(".time").each(function(){ 3 var time = $(this).text(); ...
- java中 字符串的构造方法和直接创建
java.long.String类代表字符串.Java 程序中的所有字符串字面值(如 "abc" )都作为此类的实例实现.(程序当中所有的双引号字符串,都是String类的对象[没 ...
- 缩减Azure上Linux虚拟机系统盘容量
[话在前头] 这么些年微软 Azure 创建虚拟机一直不能修改系统盘大小,但很多时候实际又用不了这么大的操作系统磁盘.微软自己甚至还针对 Windows 服务器镜像推出一个 smalldisk 的镜像 ...
- C++ //关系运算符重载 < = > !=
1 //关系运算符重载 < = > != 2 #include <iostream> 3 #include <string> 4 using namespace s ...
- [TensorFlow2.0]-手写神经网络实现鸢尾花分类
本人人工智能初学者,现在在学习TensorFlow2.0,对一些学习内容做一下笔记.笔记中,有些内容理解可能较为肤浅.有偏差等,各位在阅读时如有发现问题,请评论或者邮箱(右侧边栏有邮箱地址)提醒. 若 ...
- Create Virtual Network with Virtualbox
Create a virtual machine "ubs1" with ubuntu server 12.04, set its network as Host-only; St ...
- 【笔记】numpy.array基础(1)
numpy.array基础 使用numpy.__version__可以检查numpy的版本 当然也可以直接使用命令行检查numpy版本 也可以用来简化引用,使用as python list特点 num ...