You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/17 17:26:32 UTC

[GitHub] [superset] geido opened a new pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

geido opened a new pull request #19239:
URL: https://github.com/apache/superset/pull/19239


   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r833783716



##########
File path: superset-frontend/.eslintrc.js
##########
@@ -181,10 +181,12 @@ module.exports = {
         ],
         'no-only-tests/no-only-tests': 'error',
         'max-classes-per-file': 0,
+        'theme-colors/no-literal-colors': 0,

Review comment:
       I think we could exclude Cypress files as well.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] geido commented on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
geido commented on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1072404025


   > Thanks for adding this plugin, I left a few comments. I have tried it and it works fine, but there is a limitation that it isn't able to check the color in Styled. Is it expected?
   
   Yes, that's the current limitation that I am trying to resolve. Thanks for your comments!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (06eb078) into [master](https://codecov.io/gh/apache/superset/commit/cfb967f430a75d363693d79494239b1686fd6e5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfb967f) will **decrease** coverage by `0.16%`.
   > The diff coverage is `72.98%`.
   
   > :exclamation: Current head 06eb078 differs from pull request most recent head 085a248. Consider uploading reports for the commit 085a248 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   - Coverage   66.73%   66.57%   -0.17%     
   ==========================================
     Files        1668     1667       -1     
     Lines       64271    64415     +144     
     Branches     6496     6503       +7     
   ==========================================
   - Hits        42894    42885       -9     
   - Misses      19695    19847     +152     
   - Partials     1682     1683       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.36% <52.57%> (+0.04%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ntend/packages/superset-ui-core/src/color/index.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvY29sb3IvaW5kZXgudHM=) | `100.00% <ø> (ø)` | |
   | [.../src/time-format/TimeFormatterRegistrySingleton.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdGltZS1mb3JtYXQvVGltZUZvcm1hdHRlclJlZ2lzdHJ5U2luZ2xldG9uLnRz) | `100.00% <ø> (ø)` | |
   | [...ackages/superset-ui-core/src/utils/featureFlags.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdXRpbHMvZmVhdHVyZUZsYWdzLnRz) | `100.00% <ø> (ø)` | |
   | [...end/plugins/legacy-plugin-chart-chord/src/Chord.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNob3JkL3NyYy9DaG9yZC5qcw==) | `0.00% <0.00%> (ø)` | |
   | [...ns/legacy-plugin-chart-chord/src/transformProps.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNob3JkL3NyYy90cmFuc2Zvcm1Qcm9wcy5qcw==) | `0.00% <0.00%> (ø)` | |
   | [.../legacy-plugin-chart-country-map/src/CountryMap.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNvdW50cnktbWFwL3NyYy9Db3VudHJ5TWFwLmpz) | `0.00% <0.00%> (ø)` | |
   | [...acy-plugin-chart-country-map/src/transformProps.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNvdW50cnktbWFwL3NyYy90cmFuc2Zvcm1Qcm9wcy5qcw==) | `0.00% <0.00%> (ø)` | |
   | [...ns/legacy-plugin-chart-histogram/src/Histogram.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWhpc3RvZ3JhbS9zcmMvSGlzdG9ncmFtLmpzeA==) | `0.00% <0.00%> (ø)` | |
   | [...egacy-plugin-chart-histogram/src/transformProps.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWhpc3RvZ3JhbS9zcmMvdHJhbnNmb3JtUHJvcHMuanM=) | `0.00% <ø> (ø)` | |
   | [...ns/legacy-plugin-chart-horizon/src/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWhvcml6b24vc3JjL2NvbnRyb2xQYW5lbC50cw==) | `100.00% <ø> (+50.00%)` | :arrow_up: |
   | ... and [155 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cfb967f...085a248](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r829665971



##########
File path: superset-frontend/eslint/eslint-plugin-literal-colors/index.js
##########
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about literal colors
+ * @author Apache
+ */
+
+const cssData = require('mdn-data').css;
+const _ = require('lodash');
+
+const ALLOWED_VALUES = [
+  'auto',
+  'inherit',
+  'initial',
+  'unset',
+  'none',
+  'revert',
+  'invert',
+];
+
+function getObjectExpressionPropertyNodes(
+  objectExpressionNode,
+  propertyNodes = [],
+) {
+  _.each(objectExpressionNode.properties, propertyNode => {
+    propertyNodes.push(propertyNode);
+
+    if (
+      propertyNode.value &&
+      propertyNode.value.type &&
+      propertyNode.value.type === 'ObjectExpression'

Review comment:
       use optional chaining to simplify expression
   ```suggestion
         propertyNode?.value?.type === 'ObjectExpression'
   ```

##########
File path: superset-frontend/eslint/eslint-plugin-literal-colors/index.js
##########
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about literal colors
+ * @author Apache
+ */
+
+const cssData = require('mdn-data').css;
+const _ = require('lodash');
+
+const ALLOWED_VALUES = [
+  'auto',
+  'inherit',
+  'initial',
+  'unset',
+  'none',
+  'revert',
+  'invert',
+];
+
+function getObjectExpressionPropertyNodes(
+  objectExpressionNode,
+  propertyNodes = [],
+) {
+  _.each(objectExpressionNode.properties, propertyNode => {
+    propertyNodes.push(propertyNode);
+
+    if (
+      propertyNode.value &&
+      propertyNode.value.type &&
+      propertyNode.value.type === 'ObjectExpression'
+    ) {
+      propertyNodes.concat(
+        getObjectExpressionPropertyNodes(propertyNode.value, propertyNodes),
+      );
+    }
+  });
+
+  return propertyNodes;
+}
+
+// returns all CSS properties that might contain a color
+function getColorProperties() {
+  const colorProperties = [];
+  const cssProperties = Object.keys(cssData.properties);
+
+  cssProperties.forEach(key => {
+    const cssProp = cssData.properties[key];
+    if (cssProp.syntax.includes('<color>')) {
+      const positions = cssProp.syntax.includes('||')
+        ? cssProp.syntax.split(' || ')
+        : ['<color>'];
+      // the position of the color in the CSS property value
+      const colorPosition = positions.indexOf('<color>');
+      colorProperties.push({
+        name: key,
+        colorPosition,
+        ...cssProp,
+      });
+    }
+  });
+  return colorProperties;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+/** @type {import('eslint').Rule.RuleModule} */
+module.exports = {
+  rules: {
+    'no-literal-colors': {
+      create(context) {
+        return {
+          ObjectExpression(node) {
+            const propertyNodes = _.uniqBy(
+              getObjectExpressionPropertyNodes(node),
+              'loc',
+            );
+            propertyNodes.forEach(prop => {
+              if (
+                prop.value &&
+                prop.value.type &&
+                prop.value.type === 'Literal' &&

Review comment:
       use conditional chaining

##########
File path: superset-frontend/package.json
##########
@@ -126,6 +126,7 @@
     "d3-scale": "^2.1.2",
     "dom-to-image": "^2.6.0",
     "emotion-rgba": "0.0.9",
+    "eslint-plugin-literal-colors": "file:eslint/eslint-plugin-literal-colors",

Review comment:
       use relative directory. An additional suggestion, use a more generic directory name, for example: `build-tools` or other wises.
   
   ```
       "eslint-plugin-literal-colors": "./file:eslint/eslint-plugin-literal-colors",
   ```

##########
File path: superset-frontend/eslint/eslint-plugin-literal-colors/index.js
##########
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about literal colors
+ * @author Apache
+ */
+
+const cssData = require('mdn-data').css;
+const _ = require('lodash');
+
+const ALLOWED_VALUES = [
+  'auto',
+  'inherit',
+  'initial',
+  'unset',
+  'none',
+  'revert',
+  'invert',
+];
+
+function getObjectExpressionPropertyNodes(
+  objectExpressionNode,
+  propertyNodes = [],
+) {
+  _.each(objectExpressionNode.properties, propertyNode => {
+    propertyNodes.push(propertyNode);
+
+    if (
+      propertyNode.value &&
+      propertyNode.value.type &&
+      propertyNode.value.type === 'ObjectExpression'

Review comment:
       use optional chaining to simplify expression
   ```suggestion
         propertyNode?.value?.type === 'ObjectExpression'
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] geido merged pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
geido merged pull request #19239:
URL: https://github.com/apache/superset/pull/19239


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r833785557



##########
File path: superset-frontend/buildtools/eslint-plugin-theme-colors/index.js
##########
@@ -0,0 +1,115 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about literal colors
+ * @author Apache
+ */
+
+const COLOR_KEYWORDS = require('./colors');
+
+function hasHexColor(quasi) {
+  if (typeof quasi === 'string') {
+    const regex = /#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})\b/gi;
+    return !!quasi.match(regex);
+  }
+

Review comment:
       ```suggestion
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b49402f) into [master](https://codecov.io/gh/apache/superset/commit/cfb967f430a75d363693d79494239b1686fd6e5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfb967f) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head b49402f differs from pull request most recent head 7de8f05. Consider uploading reports for the commit 7de8f05 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   - Coverage   66.73%   66.72%   -0.02%     
   ==========================================
     Files        1668     1668              
     Lines       64271    64304      +33     
     Branches     6496     6502       +6     
   ==========================================
   + Hits        42894    42908      +14     
   - Misses      19695    19711      +16     
   - Partials     1682     1685       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.31% <ø> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...RUD/data/database/DatabaseModal/SqlAlchemyForm.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL1NxbEFsY2hlbXlGb3JtLnRzeA==) | `57.14% <0.00%> (-9.53%)` | :arrow_down: |
   | [...nd/src/components/MessageToasts/ToastPresenter.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVzc2FnZVRvYXN0cy9Ub2FzdFByZXNlbnRlci50c3g=) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...d/src/dashboard/components/FiltersBadge/Styles.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9TdHlsZXMudHN4) | `86.36% <0.00%> (-5.53%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/styles.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL3N0eWxlcy50cw==) | `76.00% <0.00%> (-5.25%)` | :arrow_down: |
   | [.../src/explore/components/DataTableControl/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhVGFibGVDb250cm9sL2luZGV4LnRzeA==) | `71.62% <0.00%> (-2.67%)` | :arrow_down: |
   | [...rc/explore/components/ExploreChartHeader/index.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlQ2hhcnRIZWFkZXIvaW5kZXguanN4) | `48.68% <0.00%> (-2.01%)` | :arrow_down: |
   | [superset-frontend/src/views/components/SubMenu.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2NvbXBvbmVudHMvU3ViTWVudS50c3g=) | `87.50% <0.00%> (-1.87%)` | :arrow_down: |
   | [superset-frontend/src/components/Chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvQ2hhcnQuanN4) | `52.45% <0.00%> (-1.64%)` | :arrow_down: |
   | [...et-ui-chart-controls/src/shared-controls/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NoYXJlZC1jb250cm9scy9pbmRleC50c3g=) | `36.53% <0.00%> (-1.47%)` | :arrow_down: |
   | [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `64.47% <0.00%> (-1.32%)` | :arrow_down: |
   | ... and [126 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cfb967f...7de8f05](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r829665971



##########
File path: superset-frontend/eslint/eslint-plugin-literal-colors/index.js
##########
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about literal colors
+ * @author Apache
+ */
+
+const cssData = require('mdn-data').css;
+const _ = require('lodash');
+
+const ALLOWED_VALUES = [
+  'auto',
+  'inherit',
+  'initial',
+  'unset',
+  'none',
+  'revert',
+  'invert',
+];
+
+function getObjectExpressionPropertyNodes(
+  objectExpressionNode,
+  propertyNodes = [],
+) {
+  _.each(objectExpressionNode.properties, propertyNode => {
+    propertyNodes.push(propertyNode);
+
+    if (
+      propertyNode.value &&
+      propertyNode.value.type &&
+      propertyNode.value.type === 'ObjectExpression'

Review comment:
       use optional chaining to simplify expression
   ```suggestion
         propertyNode?.value?.type === 'ObjectExpression'
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] geido commented on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
geido commented on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1072404025


   > Thanks for adding this plugin, I left a few comments. I have tried it and it works fine, but there is a limitation that it isn't able to check the color in Styled. Is it expected?
   
   Yes, that's the current limitation that I am trying to resolve. Thanks for your comments!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bbc9740) into [master](https://codecov.io/gh/apache/superset/commit/cfb967f430a75d363693d79494239b1686fd6e5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfb967f) will **decrease** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head bbc9740 differs from pull request most recent head b49402f. Consider uploading reports for the commit b49402f to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   - Coverage   66.73%   66.73%   -0.01%     
   ==========================================
     Files        1668     1667       -1     
     Lines       64271    64309      +38     
     Branches     6496     6506      +10     
   ==========================================
   + Hits        42894    42917      +23     
   - Misses      19695    19709      +14     
   - Partials     1682     1683       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.33% <ø> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...RUD/data/database/DatabaseModal/SqlAlchemyForm.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL1NxbEFsY2hlbXlGb3JtLnRzeA==) | `57.14% <0.00%> (-9.53%)` | :arrow_down: |
   | [...nd/src/components/MessageToasts/ToastPresenter.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVzc2FnZVRvYXN0cy9Ub2FzdFByZXNlbnRlci50c3g=) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...d/src/dashboard/components/FiltersBadge/Styles.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9TdHlsZXMudHN4) | `86.36% <0.00%> (-5.53%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/styles.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL3N0eWxlcy50cw==) | `76.00% <0.00%> (-5.25%)` | :arrow_down: |
   | [...rc/explore/components/ExploreChartHeader/index.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlQ2hhcnRIZWFkZXIvaW5kZXguanN4) | `48.68% <0.00%> (-2.01%)` | :arrow_down: |
   | [superset-frontend/src/views/components/SubMenu.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2NvbXBvbmVudHMvU3ViTWVudS50c3g=) | `87.50% <0.00%> (-1.87%)` | :arrow_down: |
   | [...et-ui-chart-controls/src/shared-controls/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NoYXJlZC1jb250cm9scy9pbmRleC50c3g=) | `36.53% <0.00%> (-1.47%)` | :arrow_down: |
   | [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `64.47% <0.00%> (-1.32%)` | :arrow_down: |
   | [...ashboard/components/gridComponents/ChartHolder.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0SG9sZGVyLmpzeA==) | `57.95% <0.00%> (-0.87%)` | :arrow_down: |
   | [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `63.81% <0.00%> (-0.52%)` | :arrow_down: |
   | ... and [108 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cfb967f...b49402f](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r832511507



##########
File path: superset-frontend/buildtools/eslint-plugin-theme-colors/index.js
##########
@@ -0,0 +1,144 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about literal colors
+ * @author Apache
+ */
+
+const _ = require('lodash');
+const COLOR_KEYWORDS = require('./colors');
+
+function getObjectExpressionPropertyNodes(
+  objectExpressionNode,
+  propertyNodes = [],
+) {
+  _.each(objectExpressionNode.properties, propertyNode => {
+    propertyNodes.push(propertyNode);
+
+    if (propertyNode?.value?.type === 'ObjectExpression') {
+      propertyNodes.concat(
+        getObjectExpressionPropertyNodes(propertyNode.value, propertyNodes),
+      );
+    }
+  });
+
+  return propertyNodes;
+}
+
+function hasHexColor(quasi) {
+  if (typeof quasi === 'string') {
+    const regex = /#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})\b/gi;
+    return quasi.match(regex);
+  }
+
+  return false;
+}
+
+function hasRgbColor(quasi) {
+  if (typeof quasi === 'string') {
+    const regex = /rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)/i;
+    return quasi.match(regex);
+  }
+  return false;
+}
+
+function hasLiteralColor(quasi, strict = false) {
+  let match = false;
+  if (typeof quasi === 'string') {
+    // matches literal colors at the start or end of a CSS prop
+    COLOR_KEYWORDS.forEach(color => {
+      const regexColon = new RegExp(`: ${color}`);
+      const regexSemicolon = new RegExp(` ${color};`);
+      if (
+        quasi.match(regexColon) ||
+        quasi.match(regexSemicolon) ||
+        (strict && quasi === color)
+      ) {
+        match = true;
+      }
+    });
+  }
+  return match;
+}

Review comment:
       ```suggestion
   function hasLiteralColor(quasi, strict = false) {
     if (typeof quasi === 'string') {
       // matches literal colors at the start or end of a CSS prop
       return COLOR_KEYWORDS.some(color => {
         const regexColon = new RegExp(`: ${color}`);
         const regexSemicolon = new RegExp(` ${color};`);
         return (
           quasi.match(regexColon) ||
           quasi.match(regexSemicolon) ||
           (strict && quasi === color)
         );
       });
     }
     return false;
   }
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] geido commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
geido commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r835270175



##########
File path: superset-frontend/package.json
##########
@@ -126,6 +126,7 @@
     "d3-scale": "^2.1.2",
     "dom-to-image": "^2.6.0",
     "emotion-rgba": "0.0.9",
+    "eslint-plugin-literal-colors": "file:eslint/eslint-plugin-literal-colors",

Review comment:
       Ok agreed. Moved it to `tools`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b49402f) into [master](https://codecov.io/gh/apache/superset/commit/cfb967f430a75d363693d79494239b1686fd6e5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfb967f) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   - Coverage   66.73%   66.72%   -0.02%     
   ==========================================
     Files        1668     1668              
     Lines       64271    64304      +33     
     Branches     6496     6502       +6     
   ==========================================
   + Hits        42894    42908      +14     
   - Misses      19695    19711      +16     
   - Partials     1682     1685       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.31% <ø> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...RUD/data/database/DatabaseModal/SqlAlchemyForm.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL1NxbEFsY2hlbXlGb3JtLnRzeA==) | `57.14% <0.00%> (-9.53%)` | :arrow_down: |
   | [...nd/src/components/MessageToasts/ToastPresenter.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVzc2FnZVRvYXN0cy9Ub2FzdFByZXNlbnRlci50c3g=) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...d/src/dashboard/components/FiltersBadge/Styles.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9TdHlsZXMudHN4) | `86.36% <0.00%> (-5.53%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/styles.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL3N0eWxlcy50cw==) | `76.00% <0.00%> (-5.25%)` | :arrow_down: |
   | [.../src/explore/components/DataTableControl/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhVGFibGVDb250cm9sL2luZGV4LnRzeA==) | `71.62% <0.00%> (-2.67%)` | :arrow_down: |
   | [...rc/explore/components/ExploreChartHeader/index.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlQ2hhcnRIZWFkZXIvaW5kZXguanN4) | `48.68% <0.00%> (-2.01%)` | :arrow_down: |
   | [superset-frontend/src/views/components/SubMenu.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2NvbXBvbmVudHMvU3ViTWVudS50c3g=) | `87.50% <0.00%> (-1.87%)` | :arrow_down: |
   | [superset-frontend/src/components/Chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvQ2hhcnQuanN4) | `52.45% <0.00%> (-1.64%)` | :arrow_down: |
   | [...et-ui-chart-controls/src/shared-controls/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NoYXJlZC1jb250cm9scy9pbmRleC50c3g=) | `36.53% <0.00%> (-1.47%)` | :arrow_down: |
   | [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `64.47% <0.00%> (-1.32%)` | :arrow_down: |
   | ... and [126 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cfb967f...b49402f](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r832203024



##########
File path: superset-frontend/package.json
##########
@@ -126,6 +126,7 @@
     "d3-scale": "^2.1.2",
     "dom-to-image": "^2.6.0",
     "emotion-rgba": "0.0.9",
+    "eslint-plugin-literal-colors": "file:eslint/eslint-plugin-literal-colors",

Review comment:
       I agree with @zhaoyongjie about the name. I personally prefer `tools` to leave room for other tools that are not build-related.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bbc9740) into [master](https://codecov.io/gh/apache/superset/commit/cfb967f430a75d363693d79494239b1686fd6e5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfb967f) will **decrease** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   - Coverage   66.73%   66.73%   -0.01%     
   ==========================================
     Files        1668     1667       -1     
     Lines       64271    64309      +38     
     Branches     6496     6506      +10     
   ==========================================
   + Hits        42894    42917      +23     
   - Misses      19695    19709      +14     
   - Partials     1682     1683       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.33% <ø> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...RUD/data/database/DatabaseModal/SqlAlchemyForm.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL1NxbEFsY2hlbXlGb3JtLnRzeA==) | `57.14% <0.00%> (-9.53%)` | :arrow_down: |
   | [...nd/src/components/MessageToasts/ToastPresenter.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVzc2FnZVRvYXN0cy9Ub2FzdFByZXNlbnRlci50c3g=) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...d/src/dashboard/components/FiltersBadge/Styles.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9TdHlsZXMudHN4) | `86.36% <0.00%> (-5.53%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/styles.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL3N0eWxlcy50cw==) | `76.00% <0.00%> (-5.25%)` | :arrow_down: |
   | [...rc/explore/components/ExploreChartHeader/index.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlQ2hhcnRIZWFkZXIvaW5kZXguanN4) | `48.68% <0.00%> (-2.01%)` | :arrow_down: |
   | [superset-frontend/src/views/components/SubMenu.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2NvbXBvbmVudHMvU3ViTWVudS50c3g=) | `87.50% <0.00%> (-1.87%)` | :arrow_down: |
   | [...et-ui-chart-controls/src/shared-controls/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NoYXJlZC1jb250cm9scy9pbmRleC50c3g=) | `36.53% <0.00%> (-1.47%)` | :arrow_down: |
   | [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `64.47% <0.00%> (-1.32%)` | :arrow_down: |
   | [...ashboard/components/gridComponents/ChartHolder.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0SG9sZGVyLmpzeA==) | `57.95% <0.00%> (-0.87%)` | :arrow_down: |
   | [...src/dashboard/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1Byb3BlcnRpZXNNb2RhbC9pbmRleC50c3g=) | `63.81% <0.00%> (-0.52%)` | :arrow_down: |
   | ... and [108 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cfb967f...bbc9740](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r833792637



##########
File path: superset-frontend/package.json
##########
@@ -126,6 +126,7 @@
     "d3-scale": "^2.1.2",
     "dom-to-image": "^2.6.0",
     "emotion-rgba": "0.0.9",
+    "eslint-plugin-literal-colors": "file:eslint/eslint-plugin-literal-colors",

Review comment:
       I'm still not sure about this name. Since this is a top-level folder, I would really like to use the opportunity to name it more generically. In the future, we could have sub-folders for `build`, `formatting`, etc. If not, at least let's rename it to `build-tools` to follow the same plugin naming convention. 
   
   I'm curious for @rusackas input here as well.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1076907755


   @geido Wow nice improvements! Really reduced the execution time. One way we can test it is to compare the output with the previous version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b49402f) into [master](https://codecov.io/gh/apache/superset/commit/cfb967f430a75d363693d79494239b1686fd6e5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfb967f) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head b49402f differs from pull request most recent head 6fa678e. Consider uploading reports for the commit 6fa678e to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   - Coverage   66.73%   66.72%   -0.02%     
   ==========================================
     Files        1668     1668              
     Lines       64271    64304      +33     
     Branches     6496     6502       +6     
   ==========================================
   + Hits        42894    42908      +14     
   - Misses      19695    19711      +16     
   - Partials     1682     1685       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.31% <ø> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...RUD/data/database/DatabaseModal/SqlAlchemyForm.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL1NxbEFsY2hlbXlGb3JtLnRzeA==) | `57.14% <0.00%> (-9.53%)` | :arrow_down: |
   | [...nd/src/components/MessageToasts/ToastPresenter.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVzc2FnZVRvYXN0cy9Ub2FzdFByZXNlbnRlci50c3g=) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...d/src/dashboard/components/FiltersBadge/Styles.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9TdHlsZXMudHN4) | `86.36% <0.00%> (-5.53%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/styles.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL3N0eWxlcy50cw==) | `76.00% <0.00%> (-5.25%)` | :arrow_down: |
   | [.../src/explore/components/DataTableControl/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhVGFibGVDb250cm9sL2luZGV4LnRzeA==) | `71.62% <0.00%> (-2.67%)` | :arrow_down: |
   | [...rc/explore/components/ExploreChartHeader/index.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlQ2hhcnRIZWFkZXIvaW5kZXguanN4) | `48.68% <0.00%> (-2.01%)` | :arrow_down: |
   | [superset-frontend/src/views/components/SubMenu.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2NvbXBvbmVudHMvU3ViTWVudS50c3g=) | `87.50% <0.00%> (-1.87%)` | :arrow_down: |
   | [superset-frontend/src/components/Chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvQ2hhcnQuanN4) | `52.45% <0.00%> (-1.64%)` | :arrow_down: |
   | [...et-ui-chart-controls/src/shared-controls/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NoYXJlZC1jb250cm9scy9pbmRleC50c3g=) | `36.53% <0.00%> (-1.47%)` | :arrow_down: |
   | [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `64.47% <0.00%> (-1.32%)` | :arrow_down: |
   | ... and [126 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cfb967f...6fa678e](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6fa678e) into [master](https://codecov.io/gh/apache/superset/commit/cfb967f430a75d363693d79494239b1686fd6e5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfb967f) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 6fa678e differs from pull request most recent head 7de8f05. Consider uploading reports for the commit 7de8f05 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   - Coverage   66.73%   66.72%   -0.02%     
   ==========================================
     Files        1668     1668              
     Lines       64271    64317      +46     
     Branches     6496     6506      +10     
   ==========================================
   + Hits        42894    42918      +24     
   - Misses      19695    19713      +18     
   - Partials     1682     1686       +4     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.32% <ø> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...RUD/data/database/DatabaseModal/SqlAlchemyForm.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL1NxbEFsY2hlbXlGb3JtLnRzeA==) | `57.14% <0.00%> (-9.53%)` | :arrow_down: |
   | [...nd/src/components/MessageToasts/ToastPresenter.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVzc2FnZVRvYXN0cy9Ub2FzdFByZXNlbnRlci50c3g=) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...d/src/dashboard/components/FiltersBadge/Styles.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9TdHlsZXMudHN4) | `86.36% <0.00%> (-5.53%)` | :arrow_down: |
   | [...c/views/CRUD/data/database/DatabaseModal/styles.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL3N0eWxlcy50cw==) | `76.00% <0.00%> (-5.25%)` | :arrow_down: |
   | [...rset-frontend/src/components/ReportModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvUmVwb3J0TW9kYWwvaW5kZXgudHN4) | `82.08% <0.00%> (-3.63%)` | :arrow_down: |
   | [.../src/explore/components/DataTableControl/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhVGFibGVDb250cm9sL2luZGV4LnRzeA==) | `71.62% <0.00%> (-2.67%)` | :arrow_down: |
   | [...rc/explore/components/ExploreChartHeader/index.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlQ2hhcnRIZWFkZXIvaW5kZXguanN4) | `48.68% <0.00%> (-2.01%)` | :arrow_down: |
   | [superset-frontend/src/views/components/SubMenu.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2NvbXBvbmVudHMvU3ViTWVudS50c3g=) | `87.50% <0.00%> (-1.87%)` | :arrow_down: |
   | [...et-ui-chart-controls/src/shared-controls/index.tsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NoYXJlZC1jb250cm9scy9pbmRleC50c3g=) | `36.19% <0.00%> (-1.81%)` | :arrow_down: |
   | [superset-frontend/src/components/Chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvQ2hhcnQuanN4) | `52.45% <0.00%> (-1.64%)` | :arrow_down: |
   | ... and [134 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cfb967f...7de8f05](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6fa678e) into [master](https://codecov.io/gh/apache/superset/commit/d46a550774cb139768f6c00fb1ecdf7fb58f136e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d46a550) will **increase** coverage by `0.24%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 6fa678e differs from pull request most recent head 62fe81e. Consider uploading reports for the commit 62fe81e to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   + Coverage   66.48%   66.72%   +0.24%     
   ==========================================
     Files        1670     1668       -2     
     Lines       63952    64317     +365     
     Branches     6506     6506              
   ==========================================
   + Hits        42519    42918     +399     
   + Misses      19747    19713      -34     
     Partials     1686     1686              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.32% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/cli/test.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY2xpL3Rlc3QucHk=) | `83.72% <0.00%> (-10.22%)` | :arrow_down: |
   | [superset/utils/cache\_manager.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGVfbWFuYWdlci5weQ==) | `93.75% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/views/css\_templates.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvY3NzX3RlbXBsYXRlcy5weQ==) | `90.90% <0.00%> (-5.76%)` | :arrow_down: |
   | [superset/views/annotations.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvYW5ub3RhdGlvbnMucHk=) | `77.27% <0.00%> (-4.70%)` | :arrow_down: |
   | [superset/key\_value/commands/create.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `89.47% <0.00%> (-4.01%)` | :arrow_down: |
   | [superset/key\_value/utils.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL3V0aWxzLnB5) | `91.66% <0.00%> (-2.46%)` | :arrow_down: |
   | [superset/views/chart/views.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvY2hhcnQvdmlld3MucHk=) | `88.09% <0.00%> (-1.65%)` | :arrow_down: |
   | [superset/utils/pandas\_postprocessing/compare.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nL2NvbXBhcmUucHk=) | `88.88% <0.00%> (-1.44%)` | :arrow_down: |
   | [superset/utils/pandas\_postprocessing/utils.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nL3V0aWxzLnB5) | `95.83% <0.00%> (-0.66%)` | :arrow_down: |
   | [superset/views/base\_api.py](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.89% <0.00%> (-0.43%)` | :arrow_down: |
   | ... and [100 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [d46a550...62fe81e](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r829669756



##########
File path: superset-frontend/eslint/eslint-plugin-literal-colors/index.js
##########
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about literal colors
+ * @author Apache
+ */
+
+const cssData = require('mdn-data').css;
+const _ = require('lodash');
+
+const ALLOWED_VALUES = [
+  'auto',
+  'inherit',
+  'initial',
+  'unset',
+  'none',
+  'revert',
+  'invert',
+];
+
+function getObjectExpressionPropertyNodes(
+  objectExpressionNode,
+  propertyNodes = [],
+) {
+  _.each(objectExpressionNode.properties, propertyNode => {
+    propertyNodes.push(propertyNode);
+
+    if (
+      propertyNode.value &&
+      propertyNode.value.type &&
+      propertyNode.value.type === 'ObjectExpression'
+    ) {
+      propertyNodes.concat(
+        getObjectExpressionPropertyNodes(propertyNode.value, propertyNodes),
+      );
+    }
+  });
+
+  return propertyNodes;
+}
+
+// returns all CSS properties that might contain a color
+function getColorProperties() {
+  const colorProperties = [];
+  const cssProperties = Object.keys(cssData.properties);
+
+  cssProperties.forEach(key => {
+    const cssProp = cssData.properties[key];
+    if (cssProp.syntax.includes('<color>')) {
+      const positions = cssProp.syntax.includes('||')
+        ? cssProp.syntax.split(' || ')
+        : ['<color>'];
+      // the position of the color in the CSS property value
+      const colorPosition = positions.indexOf('<color>');
+      colorProperties.push({
+        name: key,
+        colorPosition,
+        ...cssProp,
+      });
+    }
+  });
+  return colorProperties;
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+/** @type {import('eslint').Rule.RuleModule} */
+module.exports = {
+  rules: {
+    'no-literal-colors': {
+      create(context) {
+        return {
+          ObjectExpression(node) {
+            const propertyNodes = _.uniqBy(
+              getObjectExpressionPropertyNodes(node),
+              'loc',
+            );
+            propertyNodes.forEach(prop => {
+              if (
+                prop.value &&
+                prop.value.type &&
+                prop.value.type === 'Literal' &&

Review comment:
       use conditional chaining

##########
File path: superset-frontend/package.json
##########
@@ -126,6 +126,7 @@
     "d3-scale": "^2.1.2",
     "dom-to-image": "^2.6.0",
     "emotion-rgba": "0.0.9",
+    "eslint-plugin-literal-colors": "file:eslint/eslint-plugin-literal-colors",

Review comment:
       use relative directory. An additional suggestion, use a more generic directory name, for example: `build-tools` or other wises.
   
   ```
       "eslint-plugin-literal-colors": "./file:eslint/eslint-plugin-literal-colors",
   ```

##########
File path: superset-frontend/eslint/eslint-plugin-literal-colors/index.js
##########
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about literal colors
+ * @author Apache
+ */
+
+const cssData = require('mdn-data').css;
+const _ = require('lodash');
+
+const ALLOWED_VALUES = [
+  'auto',
+  'inherit',
+  'initial',
+  'unset',
+  'none',
+  'revert',
+  'invert',
+];
+
+function getObjectExpressionPropertyNodes(
+  objectExpressionNode,
+  propertyNodes = [],
+) {
+  _.each(objectExpressionNode.properties, propertyNode => {
+    propertyNodes.push(propertyNode);
+
+    if (
+      propertyNode.value &&
+      propertyNode.value.type &&
+      propertyNode.value.type === 'ObjectExpression'

Review comment:
       use optional chaining to simplify expression
   ```suggestion
         propertyNode?.value?.type === 'ObjectExpression'
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] geido commented on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
geido commented on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1076680441


   > I'm worried about the execution time. Even with the suggestion to improve `hasLiteralColor` the time is still high. Here's `npm run _lint` execution times (in minutes:seconds):
   > 
   > With rule disabled: `1:44` With original rule enabled: `27:41` With code suggestions: `25:54`
   > 
   > I also found a false positive in `src/visualizations/TimeTable/TimeTable.jsx`.
   > 
   > Maybe we can invest some time to make it faster?
   
   I am looking into the performance and see what we can do.
   
   As for the false-positive in `src/visualizations/TimeTable/TimeTable.jsx`, I am not sure why you think it is a false positive. This is what I see at line 247 where it complains. Lmk!
   
   > borderRight: '2px solid #fff',


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1076682615


   > This is what I see at line 247 where it complains. Lmk!
   
   Oh, I missed that! Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (06eb078) into [master](https://codecov.io/gh/apache/superset/commit/cfb967f430a75d363693d79494239b1686fd6e5d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfb967f) will **decrease** coverage by `0.16%`.
   > The diff coverage is `72.98%`.
   
   > :exclamation: Current head 06eb078 differs from pull request most recent head bbc9740. Consider uploading reports for the commit bbc9740 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19239      +/-   ##
   ==========================================
   - Coverage   66.73%   66.57%   -0.17%     
   ==========================================
     Files        1668     1667       -1     
     Lines       64271    64415     +144     
     Branches     6496     6503       +7     
   ==========================================
   - Hits        42894    42885       -9     
   - Misses      19695    19847     +152     
   - Partials     1682     1683       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.36% <52.57%> (+0.04%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ntend/packages/superset-ui-core/src/color/index.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvY29sb3IvaW5kZXgudHM=) | `100.00% <ø> (ø)` | |
   | [.../src/time-format/TimeFormatterRegistrySingleton.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdGltZS1mb3JtYXQvVGltZUZvcm1hdHRlclJlZ2lzdHJ5U2luZ2xldG9uLnRz) | `100.00% <ø> (ø)` | |
   | [...ackages/superset-ui-core/src/utils/featureFlags.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdXRpbHMvZmVhdHVyZUZsYWdzLnRz) | `100.00% <ø> (ø)` | |
   | [...end/plugins/legacy-plugin-chart-chord/src/Chord.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNob3JkL3NyYy9DaG9yZC5qcw==) | `0.00% <0.00%> (ø)` | |
   | [...ns/legacy-plugin-chart-chord/src/transformProps.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNob3JkL3NyYy90cmFuc2Zvcm1Qcm9wcy5qcw==) | `0.00% <0.00%> (ø)` | |
   | [.../legacy-plugin-chart-country-map/src/CountryMap.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNvdW50cnktbWFwL3NyYy9Db3VudHJ5TWFwLmpz) | `0.00% <0.00%> (ø)` | |
   | [...acy-plugin-chart-country-map/src/transformProps.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNvdW50cnktbWFwL3NyYy90cmFuc2Zvcm1Qcm9wcy5qcw==) | `0.00% <0.00%> (ø)` | |
   | [...ns/legacy-plugin-chart-histogram/src/Histogram.jsx](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWhpc3RvZ3JhbS9zcmMvSGlzdG9ncmFtLmpzeA==) | `0.00% <0.00%> (ø)` | |
   | [...egacy-plugin-chart-histogram/src/transformProps.js](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWhpc3RvZ3JhbS9zcmMvdHJhbnNmb3JtUHJvcHMuanM=) | `0.00% <ø> (ø)` | |
   | [...ns/legacy-plugin-chart-horizon/src/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWhvcml6b24vc3JjL2NvbnRyb2xQYW5lbC50cw==) | `100.00% <ø> (+50.00%)` | :arrow_up: |
   | ... and [155 more](https://codecov.io/gh/apache/superset/pull/19239/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cfb967f...bbc9740](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] geido commented on a change in pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
geido commented on a change in pull request #19239:
URL: https://github.com/apache/superset/pull/19239#discussion_r832469726



##########
File path: superset-frontend/package.json
##########
@@ -126,6 +126,7 @@
     "d3-scale": "^2.1.2",
     "dom-to-image": "^2.6.0",
     "emotion-rgba": "0.0.9",
+    "eslint-plugin-literal-colors": "file:eslint/eslint-plugin-literal-colors",

Review comment:
       For now, I moved it to `buildtools`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #19239: chore: Eslint custom plugin to warn about hex and literal colors

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19239:
URL: https://github.com/apache/superset/pull/19239#issuecomment-1074125705


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19239](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (62fe81e) into [master](https://codecov.io/gh/apache/superset/commit/d46a550774cb139768f6c00fb1ecdf7fb58f136e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d46a550) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #19239   +/-   ##
   =======================================
     Coverage   66.48%   66.48%           
   =======================================
     Files        1670     1670           
     Lines       63952    63952           
     Branches     6506     6506           
   =======================================
     Hits        42519    42519           
     Misses      19747    19747           
     Partials     1686     1686           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.32% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [d46a550...62fe81e](https://codecov.io/gh/apache/superset/pull/19239?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org