mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-10 19:56:54 +03:00
linting
This commit is contained in:
parent
deb9fa6225
commit
b74e977974
|
@ -3,7 +3,6 @@ import reactMixin from 'react-mixin';
|
|||
import { ExpandedStateHandlerMixin } from './mixins';
|
||||
import JSONArrow from './JSONArrow';
|
||||
import grabNode from './grab-node';
|
||||
import hexToRgb from '../../utils/hexToRgb';
|
||||
|
||||
const styles = {
|
||||
base: {
|
||||
|
@ -97,8 +96,7 @@ export default class JSONArrayNode extends React.Component {
|
|||
containerStyle = {
|
||||
...styles.base,
|
||||
...styles.parentNode
|
||||
}
|
||||
|
||||
};
|
||||
if (this.state.expanded) {
|
||||
spanStyle = {
|
||||
...spanStyle,
|
||||
|
|
|
@ -3,8 +3,6 @@ import reactMixin from 'react-mixin';
|
|||
import { ExpandedStateHandlerMixin } from './mixins';
|
||||
import JSONArrow from './JSONArrow';
|
||||
import grabNode from './grab-node';
|
||||
import shallowEqual from '../../utils/shallowEqual';
|
||||
import hexToRgb from '../../utils/hexToRgb';
|
||||
|
||||
const styles = {
|
||||
base: {
|
||||
|
@ -86,6 +84,7 @@ export default class JSONObjectNode extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
console.log('render');
|
||||
let childListStyle = {
|
||||
padding: 0,
|
||||
margin: 0,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
export default function(hex) {
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return result ? {
|
||||
r: parseInt(result[1], 16),
|
||||
g: parseInt(result[2], 16),
|
||||
b: parseInt(result[3], 16)
|
||||
} : null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
export default function shallowEqual(objA, objB) {
|
||||
if (objA === objB) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const keysA = Object.keys(objA);
|
||||
const keysB = Object.keys(objB);
|
||||
|
||||
if (keysA.length !== keysB.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Test for A's keys different from B.
|
||||
const hasOwn = Object.prototype.hasOwnProperty;
|
||||
for (let i = 0; i < keysA.length; i++) {
|
||||
if (!hasOwn.call(objB, keysA[i]) ||
|
||||
objA[keysA[i]] !== objB[keysA[i]]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
Loading…
Reference in New Issue
Block a user