@zpcscc/configs 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,15 +23,13 @@ module.exports = {
23
23
  'plugin:unicorn/recommended',
24
24
  // 对promise的推荐配置
25
25
  'plugin:promise/recommended',
26
- // sonarjs的推荐配置
27
- 'plugin:sonarjs/recommended',
28
26
  /**
29
27
  * eslint-plugin-prettier的推荐配置,需要放在最后一位,内部启用了eslint-plugin-prettier插件
30
28
  * 用于关闭eslint中的所有格式化配置,全部在.prettierrc中进行格式化配置
31
29
  */
32
30
  'plugin:prettier/recommended'],
33
31
  // 如果要在rules中针对某个插件做具体配置,则需要在plugins里先引入对应插件
34
- plugins: ['@typescript-eslint', 'sonarjs', 'unicorn', 'promise', 'import'],
32
+ plugins: ['@typescript-eslint', 'unicorn', 'promise', 'import'],
35
33
  parserOptions: {
36
34
  ecmaVersion: 'latest'
37
35
  },
@@ -123,8 +121,6 @@ module.exports = {
123
121
  'no-unused-expressions': 'off',
124
122
  // 函数名称后需要跟一个空格。这里关闭
125
123
  'space-before-function-paren': 'off',
126
- // 返回值必须被使用。这里关闭
127
- 'sonarjs/no-ignored-return': 'off',
128
124
  // 在属性上使用析构函数变量。这里关闭
129
125
  'unicorn/consistent-destructuring': 'off',
130
126
  // 箭头函数移动到外部作用于。这里关闭。在react组件内,经常会使用到箭头函数
@@ -242,11 +238,6 @@ module.exports = {
242
238
  quotes: ['error'],
243
239
  'require-atomic-updates': ['error'],
244
240
  semi: ['error', 'always'],
245
- 'sonarjs/cognitive-complexity': 'off',
246
- 'sonarjs/no-nested-template-literals': 'off',
247
- 'sonarjs/no-duplicate-string': 'off',
248
- 'sonarjs/no-small-switch': 'off',
249
- 'sonarjs/prefer-immediate-return': 'off',
250
241
  'space-before-blocks': ['error', 'always'],
251
242
  'space-in-parens': ['error', 'never'],
252
243
  'space-unary-ops': ['error', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zpcscc/configs",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "项目通用配置",
5
5
  "keywords": [
6
6
  "commitlint",
@@ -71,7 +71,6 @@
71
71
  "eslint-plugin-promise": "6.1.1",
72
72
  "eslint-plugin-react": "7.34.1",
73
73
  "eslint-plugin-react-hooks": "4.6.2",
74
- "eslint-plugin-sonarjs": "1.0.3",
75
74
  "eslint-plugin-unicorn": "53.0.0",
76
75
  "eslint-plugin-vue": "9.26.0",
77
76
  "inquirer": "9.2.21",