2 Star 0 Fork 0

mainkeys/Mouses-blog-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.js 12.89 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
/*
* @Description: ESlint 配置
* .--, .--,
* ( ( \.---./ ) )
* '.__/o o\__.'
* {= ^ =}
* > - <
* / \
* // blog \\
* //| . |\\
* "'\ /'"_.-~^`'-.
* \ _ /--'
* ___)( )(___
* (((__) (__)))
* @Author: Mainkeys
* @Date: 2023-09-19 01:02:08
* @LastEditTime: 2023-09-19 22:23:49
* @LastEditors: Mainkeys
*/
module.exports = {
extends: ['plugin:vue/essential', 'airbnb-base'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
experimentalObjectRestSpread: true,
modules: true
}
},
env: {
browser: true,
node: true,
commonjs: true,
es6: true
},
root: true,
plugins: ['vue', 'import'],
rules: {
'quotes': [2, 'single', {
'avoidEscape': true
}],
'for-direction': 'error',
'getter-return': [
'error',
{
allowImplicit: false
}
],
'no-await-in-loop': 'off',
'no-compare-neg-zero': 'error',
'no-cond-assign': [
'error',
'except-parens'
],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-constant-condition': [
'error',
{
checkLoops: false
}
],
'no-control-regex': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-empty': [
'error',
{
allowEmptyCatch: true
}
],
'no-empty-character-class': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-parens': [
'error',
'functions'
],
'no-extra-semi': 'error',
'no-func-assign': 'error',
'no-inner-declarations': [
'error',
'both'
],
'no-invalid-regexp': 'error',
'no-irregular-whitespace': [
'error',
{
skipStrings: true,
skipComments: false,
skipRegExps: true,
skipTemplates: true
}
],
'no-obj-calls': 'error',
'no-prototype-builtins': 'off',
'no-regex-spaces': 'error',
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'error',
'no-unexpected-multiline': 'error',
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'use-isnan': 'error',
'valid-jsdoc': 'off',
'valid-typeof': 'error',
'accessor-pairs': [
'error',
{
setWithoutGet: true,
getWithoutSet: false
}
],
'array-callback-return': 'off',
'block-scoped-var': 'error',
'class-methods-use-this': 'off',
'complexity': [
'error',
{
max: 20
}
],
'consistent-return': 'off',
'curly': [
'error',
'multi-line',
'consistent'
],
'default-case': 'off',
'dot-location': [
'error',
'property'
],
'dot-notation': 'off',
'eqeqeq': [
'error',
'always',
{
null: 'ignore'
}
],
'guard-for-in': 'error',
'no-alert': 'off',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-div-regex': 'off',
'no-else-return': 'off',
'no-eq-null': 'off',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-label': 'error',
'no-fallthrough': 'error',
'no-floating-decimal': 'error',
'no-global-assign': 'error',
'no-implicit-coercion': [
'error',
{
allow: [
'!!'
]
}
],
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-invalid-this': 'off',
'no-iterator': 'error',
'no-labels': 'error',
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-magic-numbers': 'off',
'no-multi-spaces': [
'error',
{
ignoreEOLComments: true,
exceptions: {
Property: true,
BinaryExpression: false,
VariableDeclarator: true,
ImportDeclaration: true
}
}
],
'no-multi-str': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-param-reassign': 'off',
'no-proto': 'error',
'no-redeclare': 'error',
'no-restricted-properties': 'off',
'no-return-assign': [
'error',
'always'
],
'no-return-await': 'error',
'no-script-url': 'error',
'no-sequences': 'error',
'no-throw-literal': 'error',
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true
}
],
'no-unused-labels': 'error',
'no-useless-call': 'error',
'no-useless-concat': 'error',
'no-useless-escape': 'off',
'no-useless-return': 'off',
'no-void': 'error',
'no-warning-comments': 'off',
'no-with': 'error',
'prefer-promise-reject-errors': 'error',
'radix': 'error',
'require-await': 'off',
'vars-on-top': 'off',
'wrap-iife': [
'error',
'inside',
{
functionPrototypeMethods: true
}
],
'yoda': [
'error',
'never',
{
onlyEquality: true
}
],
'strict': [
'error',
'never'
],
'init-declarations': 'off',
'no-catch-shadow': 'off',
'no-delete-var': 'error',
'no-label-var': 'error',
'no-restricted-globals': 'off',
'no-shadow': 'off',
'no-shadow-restricted-names': 'error',
'no-undef': [
'error',
{
typeof: false
}
],
'no-undef-init': 'error',
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
caughtErrors: 'none',
ignoreRestSiblings: true
}
],
'no-use-before-define': [
'error',
{
functions: false,
classes: false,
variables: false
}
],
'global-require': 'off',
'no-buffer-constructor': 'error',
'no-mixed-requires': 'off',
'no-new-require': 'error',
'no-path-concat': 'error',
'no-process-env': 'off',
'no-process-exit': 'off',
'no-restricted-modules': 'off',
'no-sync': 'off',
'array-bracket-newline': 'off',
'array-bracket-spacing': [
'error',
'never'
],
'array-element-newline': 'off',
'block-spacing': [
'error',
'always'
],
'brace-style': 'off',
'camelcase': 'off',
'capitalized-comments': 'off',
'comma-dangle': 'off',
'comma-spacing': [
'error',
{
'before': false,
'after': true
}
],
'comma-style': [
'error',
'last'
],
'computed-property-spacing': [
'error',
'never'
],
'consistent-this': 'off',
'eol-last': 'off',
'func-call-spacing': [
'error',
'never'
],
'func-name-matching': [
'error',
'always',
{
includeCommonJSModuleExports: false
}
],
'func-names': 'off',
'func-style': 'off',
'id-blacklist': 'off',
'id-length': 'off',
'id-match': 'off',
'indent': [
'error',
2,
{
SwitchCase: 1,
flatTernaryExpressions: true
}
],
'key-spacing': [
'error',
{
beforeColon: false,
afterColon: true,
mode: 'strict',
}
],
'keyword-spacing': [
'error',
{
before: true,
after: true
}
],
'line-comment-position': 'off',
'linebreak-style': 'off',
'lines-around-comment': 'off',
'max-depth': [
'error',
5
],
'max-len': 'off',
'max-lines': 'off',
'max-nested-callbacks': [
'error',
3
],
'max-params': [
'error',
7
],
'max-statements': 'off',
'max-statements-per-line': 'off',
'multiline-ternary': 'off',
'new-cap': [
'error',
{
newIsCap: true,
capIsNew: false,
properties: true
}
],
'new-parens': 'error',
'newline-per-chained-call': 'off',
'no-array-constructor': 'error',
'no-bitwise': 'off',
'no-continue': 'off',
'no-inline-comments': 'off',
'no-lonely-if': 'off',
'no-mixed-operators': 'off',
'no-mixed-spaces-and-tabs': 'error',
'no-multi-assign': 'off',
'no-multiple-empty-lines': [
'error',
{
max: 3,
maxEOF: 1,
maxBOF: 1
}
],
'no-negated-condition': 'off',
'no-nested-ternary': 'off',
'no-new-object': 'error',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-tabs': 'error',
'no-ternary': 'off',
'no-trailing-spaces': 'error',
'no-underscore-dangle': 'off',
'no-unneeded-ternary': 'off',
'no-whitespace-before-property': 'error',
'nonblock-statement-body-position': [
'error',
'beside',
{
overrides: {
while: 'below'
}
}
],
'object-curly-newline': [
'error',
{
multiline: true,
consistent: true
}
],
'object-curly-spacing': [
'error',
'always',
{
arraysInObjects: true,
objectsInObjects: false
}
],
'object-property-newline': 'off',
'one-var': [
'error',
'never'
],
'one-var-declaration-per-line': [
'error',
'always'
],
'operator-assignment': 'off',
'operator-linebreak': 'off',
'padded-blocks': 'off',
'padding-line-between-statements': 'off',
'quote-props': 'off',
'require-jsdoc': 'off',
'semi': [
'error',
'always',
{
omitLastInOneLineBlock: true
}
],
'semi-spacing': [
'error',
{
before: false,
after: true
}
],
'semi-style': [
'error',
'last'
],
'sort-keys': 'off',
'sort-vars': 'off',
'space-before-blocks': [
'error',
'always'
],
'space-before-function-paren': 'off',
'space-in-parens': [
'error',
'never'
],
'space-infix-ops': 'error',
'space-unary-ops': [
'error',
{
words: true,
nonwords: false
}
],
'spaced-comment': [
'error',
'always',
{
block: {
exceptions: [
'*'
],
balanced: true
}
}
],
'switch-colon-spacing': [
'error',
{
after: true,
before: false
}
],
'template-tag-spacing': [
'error',
'never'
],
'unicode-bom': [
'error',
'never'
],
'wrap-regex': 'off',
'arrow-body-style': 'off',
'arrow-parens': 'off',
'arrow-spacing': [
'error',
{
before: true,
after: true
}
],
'constructor-super': 'error',
'generator-star-spacing': [
'error',
{
before: false,
after: true
}
],
'no-class-assign': 'error',
'no-confusing-arrow': [
'error',
{
allowParens: true
}
],
'no-const-assign': 'error',
'no-dupe-class-members': 'error',
'no-duplicate-imports': 'error',
'no-new-symbol': 'error',
'no-restricted-imports': 'off',
'no-this-before-super': 'error',
'no-useless-computed-key': 'error',
'no-useless-constructor': 'error',
'no-useless-rename': 'error',
'no-var': 'error',
'object-shorthand': 'off',
'prefer-arrow-callback': 'off',
'prefer-const': 'off',
'prefer-destructuring': 'off',
'prefer-numeric-literals': 'off',
'prefer-rest-params': 'off',
'prefer-spread': 'off',
'prefer-template': 'off',
'require-yield': 'error',
'rest-spread-spacing': [
'error',
'never'
],
'sort-imports': 'off',
'symbol-description': 'error',
'template-curly-spacing': [
'error',
'never'
],
'yield-star-spacing': [
'error',
'after'
],
'import/first': 'off',
'import/order': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'import/newline-after-import': 'off',
'import/no-dynamic-require': 'off',
'import/no-absolute-path': 'off',
'prefer-object-spread': 'off',
'import/no-useless-path-segments': 'off',
'import/no-extraneous-dependencies': 'off'
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mainkeys/mouses-blog-web.git
git@gitee.com:mainkeys/mouses-blog-web.git
mainkeys
mouses-blog-web
Mouses-blog-web
master

搜索帮助