Skip to content

Commit

Permalink
style: .eslintrc
Browse files Browse the repository at this point in the history
  • Loading branch information
halldwang committed Feb 23, 2021
1 parent 8ec3064 commit abea2c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
module.exports = {
extends: [
// 规则继承 https://github.com/AlloyTeam/eslint-config-alloy
// https://github.com/AlloyTeam/eslint-config-alloy
'alloy'
],
globals: {
// 全局变量 window 不允许被重新赋值
window: false,
define: true,
bbo: false,
jest: false
},
rules: {
// 强制使用一致的缩进
indent: [
'error',
2,
{
// case 子句将相对于 switch 语句缩进 2 个空格
SwitchCase: 1,
// 三元表达式内的三元表达式不能有缩进
flatTernaryExpressions: true
}
],
// 不强制使用一致的分号
semi: 0,
// 限制圈复杂度不超过 30
complexity: [
'error',
{
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c)2013 - 2020 halldwang
Copyright (c)2013 - 2021 halldwang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit abea2c2

Please sign in to comment.