eslint and stylelint config
2024-08-30 19:24:41
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"
最新文章
- Json解析工具Jackson(使用注解)
- 使用配置文件来配置JDBC连接数据库
- APP图标和启动页
- const, static and readonly
- jsp java 数据库 乱码总结
- Android中实现全屏、无标题栏的两种办法(另附Android系统自带样式的解释)
- js取整数、取余数的方法
- wcf 速成,转的啊 第一天
- 安装Codeception框架
- linux cut命令详解
- XWindow启动流程
- JAVA常用API(Date、DateFormat、Calendar、System、Math、基本数据类型包装类)
- idea/eclipse下Maven工程集成web服务(tomcat、jetty)
- SAP MM ME21N 创建PO时报错 - Net price in CNY becomes too large –
- Struts2.5学习笔记----org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter报错
- 无法定位程序输入点 zend_empty_string php7.dll
- Maven中-DskipTests和-Dmaven.test.skip=true的区别
- 51. N-Queens (Array; Back-Track, Bit)
- 前端独立引用 ejs模版
- EOJ Monthly 2019.2 (based on February Selection) D.进制转换