1 Star 0 Fork 4

UUshuai/weather-screen

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.js 2.67 KB
一键复制 编辑 原始数据 按行查看 历史
Lauset 提交于 2023-05-16 14:46 +08:00 . chore: upgrade
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:vue/essential',
'plugin:vue/recommended',
'airbnb-base',
'./packages/web/auto-imports.json',
],
parserOptions: {
ecmaVersion: 13,
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
plugins: ['vue', '@typescript-eslint', 'import'],
rules: {
indent: ['error', 2],
// 'linebreak-style': ['error', 'unix'],
'linebreak-style': 'off',
quotes: ['error', 'single'],
semi: ['error', 'never'],
'no-console': 'warn',
'no-unused-vars': 0,
'arrow-parens': 0,
// 防止赋值给声明为函数参数的变量引起的错误
'no-param-reassign': ['warn', { props: false }],
// 可以使用 for in
'no-restricted-syntax': 0,
// 可在方法中使用require
'global-require': 'warn',
// 函数内局部变量可与全局变量重名,阅读代码时容易混淆
'no-shadow': 'warn',
// 数组和对象键值对最后一个逗号, never参数:不能带末尾的逗号, always参数:必须带末尾的逗号,
// 'comma-dangle': [
// 'error',
// {
// arrays: 'always',
// objects: 'always',
// imports: 'never',
// exports: 'never',
// functions: 'never',
// },
// ],
// 控制逗号前后的空格
'comma-spacing': [2, { before: false, after: true }],
// 控制逗号在行尾出现还是在行首出现
'comma-style': [2, 'last'],
'no-tabs': 0,
'no-undef': 'off',
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'import/no-extraneous-dependencies': [1, { devDependencies: true }],
'import/no-unresolved': 0,
'import/no-absolute-path': 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/html-self-closing': 'off',
'vue/no-multiple-template-root': 0,
'vue/multi-word-component-names': 0,
'vue/max-attributes-per-line': ['warn', { // 标签一行最多容纳6个属性,超过换行
singleline: 6,
multiline: { max: 1 },
}],
'max-len': ['warn', 120],
'object-curly-newline': ['error', { multiline: true }],
'prefer-destructuring': ['error', { object: true, array: false }],
// add new line above comment
'lines-around-comment': [
'error',
{
beforeBlockComment: true,
beforeLineComment: true,
allowBlockStart: true,
allowClassStart: true,
allowObjectStart: true,
allowArrayStart: true,
},
],
'newline-before-return': 0,
'import/newline-after-import': ['error', { count: 1 }],
'import/extensions': ['warn', { scss: 'ignorePackages' }],
},
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/uushuai/weather-screen.git
[email protected]:uushuai/weather-screen.git
uushuai
weather-screen
weather-screen
master

搜索帮助