Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

chore(package): upgrade dependencies #168

Merged
merged 1 commit into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ rules:
no-else-return: 2
no-empty: 2
no-empty-character-class: 2
no-empty-label: 2
no-eq-null: 2
no-eval: 2
no-ex-assign: 2
Expand Down Expand Up @@ -133,7 +132,6 @@ rules:
space-before-function-paren: [2, "never"]
space-in-parens: 2
space-infix-ops: 2
space-return-throw-case: 2
space-unary-ops: [2, {words: true, nonwords: false}]
spaced-comment: 2
strict: [2, 'global']
Expand All @@ -153,4 +151,3 @@ rules:
react/prop-types: 1
react/react-in-jsx-scope: 1
react/self-closing-comp: 1
react/wrap-multilines: 1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ build/Release
node_modules

lib/

.idea
6 changes: 2 additions & 4 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict';

var gulp = require('gulp');
var gutil = require('gulp-util');
var babel = require('gulp-babel');
var eslint= require('gulp-eslint');
var eslint = require('gulp-eslint');
var open = require('gulp-open');
var del = require('del');
var url = require('url');
Expand Down Expand Up @@ -58,7 +56,7 @@ gulp.task('webpack-dev-server', function(){
gulp.task('lint', function(){
return gulp.src(['src/**/*.js', 'test/**/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.format());
});

gulp.task('watch', function() {
Expand Down
12 changes: 5 additions & 7 deletions example/app.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
'use strict';

import React from 'react';
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import {Treebeard, decorators} from '../src/index';
import styled from '@emotion/styled';


import data from './data';
import styles from './styles';
import * as filters from './filter';

const Div = styled('Div', {
shouldForwardProp: prop => ['className', 'children'].indexOf(prop) !== -1
})(({ style }) => style);
})(({style}) => style);

const HELP_MSG = 'Select A Node To See Its Data Structure Here...';

Expand All @@ -34,7 +31,7 @@ decorators.Header = ({style, node}) => {
);
};

class NodeViewer extends React.Component {
class NodeViewer extends PureComponent {
render() {
const style = styles.viewer;
let json = JSON.stringify(this.props.node, null, 4);
Expand All @@ -46,11 +43,12 @@ class NodeViewer extends React.Component {
return <Div style={style.base}>{json}</Div>;
}
}

NodeViewer.propTypes = {
node: PropTypes.object
};

class DemoTree extends React.Component {
class DemoTree extends PureComponent {
constructor() {
super();

Expand Down
2 changes: 1 addition & 1 deletion example/data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';


export default {
name: 'react-treebeard',
Expand Down
2 changes: 1 addition & 1 deletion example/filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';


// Helper functions for filtering
export const defaultMatcher = (filterText, node) => {
Expand Down
2 changes: 1 addition & 1 deletion example/styles.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';


export default {
component: {
Expand Down
2 changes: 0 additions & 2 deletions example/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const webpack = require('webpack');

module.exports = {
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
'use strict';
module.exports = require('./lib/index');
7 changes: 2 additions & 5 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
'use strict';

var webpack = require('webpack');
var webpackCfg = require('./webpack.config.test.js');

module.exports = function(config) {
Expand Down Expand Up @@ -44,5 +41,5 @@ module.exports = function(config) {
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
})
}
});
};
Loading