@lsby/eslint-plugin 0.0.14 → 0.0.15

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.
@@ -6,7 +6,7 @@ module.exports = {
6
6
  recommended: 'error',
7
7
  },
8
8
  messages: {
9
- noDefiniteAssignment: '类属性 "{{name}}" 不允许使用确定赋值断言 (!:)',
9
+ noDefiniteAssignment: '类属性不允许使用确定赋值断言 (!:)',
10
10
  },
11
11
  schema: [],
12
12
  },
@@ -14,27 +14,17 @@ module.exports = {
14
14
  return {
15
15
  ClassProperty(node) {
16
16
  if (node.definite) {
17
- let name = '未知属性名'
18
- if (node.key && node.key.type === 'Identifier') {
19
- name = node.key.name
20
- }
21
17
  context.report({
22
18
  node,
23
19
  messageId: 'noDefiniteAssignment',
24
- data: { name },
25
20
  })
26
21
  }
27
22
  },
28
23
  PropertyDefinition(node) {
29
24
  if (node.definite) {
30
- let name = '未知属性名'
31
- if (node.key && node.key.type === 'Identifier') {
32
- name = node.key.name
33
- }
34
25
  context.report({
35
26
  node,
36
27
  messageId: 'noDefiniteAssignment',
37
- data: { name },
38
28
  })
39
29
  }
40
30
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/eslint-plugin",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "pub:public": "bumpp && npm publish --access public",