4 Star 1 Fork 9

Discuz / discuz-com

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 3.49 KB
一键复制 编辑 原始数据 按行查看 历史
module.exports = {
root: true,
env: {
es6: true,
node: true,
browser: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
modules: true,
},
},
extends: [
// https://git.code.oa.com/standards/javascript
//'@tencent/eslint-config-tencent',
// https://eslint.vuejs.org/rules/
'plugin:vue/recommended',
'@vue/airbnb',
'@vue/prettier',
// Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
'plugin:prettier/recommended',
],
plugins: [
'vue',
'import',
],
rules: {
// 'no-underscore-dangle': 'off',
// // allow debugger during development
// 'no-debugger': process.env.NODE_ENV === 'production' ? 1 : 0,
// 'no-console': process.env.NODE_ENV === 'production' ? 1 : 0,
// // allow async-await
// 'generator-star-spacing': 0,
// 'import/extensions': [
// 'error',
// 'ignorePackages',
// {
// js: 'never',
// vue: 'never',
// },
// ],
// // vuex
// 'no-param-reassign': [
// 'error',
// {
// props: true,
// ignorePropertyModificationsFor: [
// 'state',
// 'acc',
// 'e',
// 'ctx',
// 'req',
// 'request',
// 'res',
// 'response',
// '$scope',
// ],
// },
// ],
// // vuex
// 'no-shadow': ['error', { allow: ['state'] }],
// // 禁止使用 var
// 'no-var': 2,
// 'vue/attribute-hyphenation': 2,
// 'vue/html-closing-bracket-spacing': 2,
// 'vue/html-end-tags': 2,
// 'vue/html-self-closing': [
// 2,
// {
// html: {
// void: 'always',
// normal: 'always',
// component: 'always',
// },
// svg: 'always',
// math: 'always',
// },
// ],
// 'vue/max-attributes-per-line': 0,
// 'vue/no-template-shadow': 2,
// 'vue/singleline-html-element-content-newline': 0,
// 'vue/v-bind-style': 2,
// 'vue/v-on-style': 2,
// 'vue/attributes-order': 0,
// 'vue/this-in-template': 2,
// 'import/no-unresolved': 0,
// 'import/prefer-default-export': 0,
// 'consistent-return': 0,
// 'vue/multiline-html-element-content-newline': 0,
// 'vue/no-v-html': 0,
// 'vue/html-closing-bracket-newline': [
// 2,
// {
// singleline: 'never',
// multiline: 'always',
// },
// ],
// 'vue/html-self-closing': 0,
// 'prettier/prettier': [
// 2,
// {
// // 声明结尾使用分号(默认true)
// semi: true,
// // 是否使用尾逗号,三个可选之’<none/es5/all>'
// trailingComma: 'all',
// // 字符串是否使用单引号。默认 false 使用双引号
// singleQuote: true,
// // 一行的字符数,如果超过会进行换行。默认 80
// printWidth: 100,
// // tab 使用 2 个空格
// tabWidth: 2,
// htmlWhitespaceSensitivity: 'ignore',
// // https://stackoverflow.com/questions/53516594/why-do-i-keep-getting-delete-cr-prettier-prettier
// endOfLine: 'auto',
// ignorePath: '.prettierignore',
// },
// ],
},
globals: {
// https://imgcache.qq.com/qcloud/main/scripts/release/common/login/api.js
QCLogin: true,
},
};
JavaScript
1
https://gitee.com/Discuz/discuz-com.git
git@gitee.com:Discuz/discuz-com.git
Discuz
discuz-com
discuz-com
master

搜索帮助