it-console/code/web/IT工具综合平台/.eslintrc.js

45 lines
1.4 KiB
JavaScript
Raw Normal View History

2023-01-29 02:17:49 +00:00
/*
* @Author: Kane
* @Date: 2022-12-14 15:12:46
* @LastEditors: Kane
2023-02-05 16:41:47 +00:00
* @LastEditTime: 2023-02-06 00:36:26
* @FilePath: /IT工具综合平台/.eslintrc.js
2023-01-29 02:17:49 +00:00
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
module.exports = {
root: true,
env: {
2023-02-05 16:41:47 +00:00
node: true,
2023-01-29 02:17:49 +00:00
},
'extends': [
'plugin:vue/vue3-essential',
2023-02-05 16:41:47 +00:00
'eslint:recommended',
2023-01-29 02:17:49 +00:00
],
parserOptions: {
2023-02-05 16:41:47 +00:00
parser: '@babel/eslint-parser',
2023-01-29 02:17:49 +00:00
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
2023-02-05 16:41:47 +00:00
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
2023-02-06 10:35:37 +00:00
"no-unused-vars": "warn",
2023-02-05 16:41:47 +00:00
"semi": ["error", "always",],//控制行尾部分号
"comma-dangle": ["error", {
"arrays": "always",
"objects": "always",
"imports": "never",
"exports": "never",
"functions": "never",
},],//数组和对象键值对最后一个逗号
"comma-style": ["error", "last",], //逗号在行位
"array-bracket-spacing": ["error", "never",],
"no-undef-init": "error",
"no-invalid-this": "error",
"no-use-before-define": "error",
"no-shadow-restricted-names": "error", //禁止对一些关键字或者保留字进行赋值操作比如NaN、Infinity、undefined、eval、arguments等
// "comma-spacing": ["error", { "before": false, "after": true, },],
"brace-style": ["error", "allman", { "allowSingleLine": true, },],
},
};