@hero-design/snowflake-guard 1.2.4-alpha.1 → 1.2.4-alpha.2

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.
@@ -76,7 +76,7 @@ const reportInlineStyle = (ast, attributes, componentName) => {
76
76
  // Case 1: Use direct object, e.g. <Card style={{ color: 'red' }} />
77
77
  if (prop.type === 'ObjectProperty' &&
78
78
  prop.key.type === 'Identifier' &&
79
- PROHIBITED_PROPERTIES.includes(prop.key.name)) {
79
+ (PROHIBITED_PROPERTIES === null || PROHIBITED_PROPERTIES === void 0 ? void 0 : PROHIBITED_PROPERTIES.includes(prop.key.name))) {
80
80
  hasCustomStyle = true;
81
81
  addViolatingAttribute(prop, styleObjName, componentName, (_a = attr.loc) === null || _a === void 0 ? void 0 : _a.start.line, violatingAttributes);
82
82
  }
@@ -97,7 +97,7 @@ const reportInlineStyle = (ast, attributes, componentName) => {
97
97
  var _a;
98
98
  if (deProp.type === 'ObjectProperty' &&
99
99
  deProp.key.type === 'Identifier' &&
100
- PROHIBITED_PROPERTIES.includes(deProp.key.name)) {
100
+ (PROHIBITED_PROPERTIES === null || PROHIBITED_PROPERTIES === void 0 ? void 0 : PROHIBITED_PROPERTIES.includes(deProp.key.name))) {
101
101
  hasCustomStyle = true;
102
102
  addViolatingAttribute(deProp, styleObjName, componentName, (_a = attr.loc) === null || _a === void 0 ? void 0 : _a.start.line, violatingAttributes);
103
103
  }
@@ -131,7 +131,7 @@ const reportInlineStyle = (ast, attributes, componentName) => {
131
131
  var _a;
132
132
  if (p.type === 'ObjectProperty' &&
133
133
  p.key.type === 'Identifier' &&
134
- PROHIBITED_PROPERTIES.includes(p.key.name)) {
134
+ (PROHIBITED_PROPERTIES === null || PROHIBITED_PROPERTIES === void 0 ? void 0 : PROHIBITED_PROPERTIES.includes(p.key.name))) {
135
135
  hasCustomStyle = true;
136
136
  addViolatingAttribute(p, styleObjName, componentName, (_a = attr.loc) === null || _a === void 0 ? void 0 : _a.start.line, violatingAttributes);
137
137
  }
@@ -160,7 +160,7 @@ const reportInlineStyle = (ast, attributes, componentName) => {
160
160
  var _a;
161
161
  if (prop.type === 'ObjectProperty' &&
162
162
  prop.key.type === 'Identifier' &&
163
- PROHIBITED_PROPERTIES.includes(prop.key.name)) {
163
+ (PROHIBITED_PROPERTIES === null || PROHIBITED_PROPERTIES === void 0 ? void 0 : PROHIBITED_PROPERTIES.includes(prop.key.name))) {
164
164
  hasCustomStyle = true;
165
165
  addViolatingAttribute(prop, styleObjName, componentName, (_a = attr.loc) === null || _a === void 0 ? void 0 : _a.start.line, violatingAttributes);
166
166
  }
@@ -193,7 +193,7 @@ const reportInlineStyle = (ast, attributes, componentName) => {
193
193
  var _a;
194
194
  if (p.type === 'ObjectProperty' &&
195
195
  p.key.type === 'Identifier' &&
196
- PROHIBITED_PROPERTIES.includes(p.key.name)) {
196
+ (PROHIBITED_PROPERTIES === null || PROHIBITED_PROPERTIES === void 0 ? void 0 : PROHIBITED_PROPERTIES.includes(p.key.name))) {
197
197
  hasCustomStyle = true;
198
198
  addViolatingAttribute(p, styleObjName, componentName, (_a = attr.loc) === null || _a === void 0 ? void 0 : _a.start.line, violatingAttributes);
199
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/snowflake-guard",
3
- "version": "1.2.4-alpha.1",
3
+ "version": "1.2.4-alpha.2",
4
4
  "description": "A hero-design bot detecting snowflake usage",
5
5
  "author": "Hau Dao",
6
6
  "license": "ISC",
File without changes
@@ -1 +0,0 @@
1
- "use strict";