Skip to content

Commit 680747d

Browse files
committed
Fixed: scrollbar no longer offsets flex widths, documentation deps fixed
1 parent e70b290 commit 680747d

File tree

7 files changed

+163
-204
lines changed

7 files changed

+163
-204
lines changed

.eslintrc.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
module.exports = {
2+
parserOptions: {
3+
ecmaVersion: 8,
4+
ecmaFeatures: {
5+
experimentalObjectRestSpread: true,
6+
jsx: true,
7+
node: false
8+
},
9+
sourceType: 'module'
10+
},
11+
12+
extends: ['standard'],
13+
14+
plugins: ['react'],
15+
16+
rules: {
17+
// Nozzle
18+
'jsx-quotes': [2, 'prefer-single'],
19+
'comma-dangle': [2, 'always-multiline'],
20+
21+
// // React
22+
'react/jsx-boolean-value': 2,
23+
'react/jsx-curly-spacing': [2, 'never'],
24+
'react/jsx-equals-spacing': [2, 'never'],
25+
// 'react/jsx-indent': 2,
26+
'react/jsx-indent-props': [2, 2],
27+
'react/jsx-no-duplicate-props': 2,
28+
'react/jsx-no-undef': 2,
29+
'react/jsx-tag-spacing': [
30+
2,
31+
{
32+
closingSlash: 'never',
33+
beforeSelfClosing: 'always',
34+
afterOpening: 'never'
35+
}
36+
],
37+
'react/jsx-uses-react': 2,
38+
'react/jsx-uses-vars': 2,
39+
'react/self-closing-comp': 2,
40+
'react/jsx-no-bind': [
41+
2,
42+
{
43+
allowArrowFunctions: true,
44+
allowBind: false,
45+
ignoreRefs: true
46+
}
47+
],
48+
'react/no-did-update-set-state': 2,
49+
'react/no-unknown-property': 2,
50+
'react/react-in-jsx-scope': 2,
51+
'react/jsx-closing-bracket-location': [2, 'tag-aligned'],
52+
'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
53+
'react/jsx-wrap-multilines': 2,
54+
'react/self-closing-comp': 2,
55+
'react/jsx-key': 2,
56+
'react/jsx-no-comment-textnodes': 2,
57+
'react/jsx-no-duplicate-props': 2,
58+
'react/jsx-no-target-blank': 2,
59+
'react/jsx-no-undef': 2,
60+
'react/jsx-uses-react': 2,
61+
'react/jsx-uses-vars': 2,
62+
'react/no-danger-with-children': 2,
63+
'react/no-deprecated': 2,
64+
'react/no-direct-mutation-state': 2,
65+
'react/no-find-dom-node': 2,
66+
'react/no-is-mounted': 2,
67+
'react/no-render-return-value': 2,
68+
'react/no-string-refs': 2,
69+
'react/no-unknown-property': 2,
70+
'react/react-in-jsx-scope': 2,
71+
'react/require-render-return': 2
72+
// 'react/jsx-max-props-per-line': [2, { maximum: 1 }]
73+
}
74+
}

docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
"dependencies": {
1010
"github-markdown-css": "^2.6.0",
1111
"marked": "^0.3.6",
12+
"namor": "^1.0.1",
1213
"raw-loader": "^0.5.1",
1314
"react": "^15.5.4",
1415
"react-dom": "^15.5.4",
16+
"react-json-tree": "^0.10.9",
1517
"react-story": "^0.0.6"
1618
},
1719
"scripts": {

docs/src/stories/Readme.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ import Readme from '!raw!../../../README.md'
66
import 'github-markdown-css/github-markdown.css'
77

88
export default class Story extends React.Component {
9-
render () {
10-
return <span className='markdown-body' dangerouslySetInnerHTML={{__html: marked(Readme)}} />
9+
render() {
10+
return (
11+
<span
12+
className="markdown-body"
13+
dangerouslySetInnerHTML={{ __html: marked(Readme) }}
14+
/>
15+
)
1116
}
12-
componentDidMount () {
17+
componentDidMount() {
1318
global.Prism.highlightAll()
1419
}
1520
}

docs/yarn.lock

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ babel-runtime@6.22.0:
844844
core-js "^2.4.0"
845845
regenerator-runtime "^0.10.0"
846846

847-
babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.22.0:
847+
babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.22.0, babel-runtime@^6.6.1:
848848
version "6.23.0"
849849
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b"
850850
dependencies:
@@ -892,6 +892,10 @@ balanced-match@^0.4.1, balanced-match@^0.4.2:
892892
version "0.4.2"
893893
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
894894

895+
base16@^1.0.0:
896+
version "1.0.0"
897+
resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70"
898+
895899
base64-js@^1.0.2:
896900
version "1.2.0"
897901
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1"
@@ -3473,6 +3477,14 @@ lodash.cond@^4.3.0:
34733477
version "4.5.2"
34743478
resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5"
34753479

3480+
lodash.curry@^4.0.1:
3481+
version "4.1.1"
3482+
resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170"
3483+
3484+
lodash.flow@^3.3.0:
3485+
version "3.5.0"
3486+
resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a"
3487+
34763488
lodash.isarguments@^3.0.0:
34773489
version "3.1.0"
34783490
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
@@ -3670,6 +3682,10 @@ mute-stream@0.0.5:
36703682
version "0.0.5"
36713683
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0"
36723684

3685+
namor@^1.0.1:
3686+
version "1.0.1"
3687+
resolved "https://registry.yarnpkg.com/namor/-/namor-1.0.1.tgz#ac879d9b6a0a71abecac12da6393e27ab35fb757"
3688+
36733689
nan@^2.3.0:
36743690
version "2.6.2"
36753691
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
@@ -4425,6 +4441,10 @@ punycode@^1.2.4, punycode@^1.4.1:
44254441
version "1.4.1"
44264442
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
44274443

4444+
pure-color@^1.2.0:
4445+
version "1.2.0"
4446+
resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.2.0.tgz#702d2f2819dd545b1fde5116fca5f0c2dad2d18d"
4447+
44284448
q@^1.1.2:
44294449
version "1.5.0"
44304450
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
@@ -4486,6 +4506,15 @@ rc@^1.1.7:
44864506
minimist "^1.2.0"
44874507
strip-json-comments "~2.0.1"
44884508

4509+
react-base16-styling@^0.5.1:
4510+
version "0.5.3"
4511+
resolved "https://registry.yarnpkg.com/react-base16-styling/-/react-base16-styling-0.5.3.tgz#3858f24e9c4dd8cbd3f702f3f74d581ca2917269"
4512+
dependencies:
4513+
base16 "^1.0.0"
4514+
lodash.curry "^4.0.1"
4515+
lodash.flow "^3.3.0"
4516+
pure-color "^1.2.0"
4517+
44894518
react-dev-utils@^0.5.2:
44904519
version "0.5.2"
44914520
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-0.5.2.tgz#50d0b962d3a94b6c2e8f2011ed6468e4124bc410"
@@ -4520,6 +4549,14 @@ react-html-attributes@^1.3.0:
45204549
dependencies:
45214550
html-element-attributes "^1.0.0"
45224551

4552+
react-json-tree@^0.10.9:
4553+
version "0.10.9"
4554+
resolved "https://registry.yarnpkg.com/react-json-tree/-/react-json-tree-0.10.9.tgz#7263173a2cc8bf05eac63b0419c3ce75b232e284"
4555+
dependencies:
4556+
babel-runtime "^6.6.1"
4557+
prop-types "^15.5.8"
4558+
react-base16-styling "^0.5.1"
4559+
45234560
react-router-dom@next:
45244561
version "4.0.0-beta.8"
45254562
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.0.0-beta.8.tgz#907a5a0a36e9190652c80f2feead0eadbbba262e"

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"docs:build": "cd docs && yarn && yarn run build"
3939
},
4040
"dependencies": {
41-
"classnames": "^2.2.5"
41+
"classnames": "^2.2.5",
42+
"react-json-tree": "^0.10.9"
4243
},
4344
"peerDependencies": {
4445
"react": "^15.x.x"
@@ -50,22 +51,15 @@
5051
"babel-preset-es2015": "6.14.0",
5152
"babel-preset-react": "6.11.1",
5253
"babel-preset-stage-2": "6.13.0",
53-
"github-markdown-css": "^2.4.1",
54-
"html-loader": "^0.4.4",
55-
"markdown-loader": "^0.1.7",
56-
"namor": "^0.3.0",
5754
"npm-run-all": "^3.1.1",
5855
"onchange": "^3.0.2",
5956
"postcss-cli": "^2.6.0",
60-
"raw-loader": "^0.5.1",
6157
"react": "^15.4.2",
6258
"react-dom": "^15.4.2",
63-
"react-json-tree": "^0.10.1",
6459
"rimraf": "^2.6.1",
6560
"standard": "^10.0.2",
66-
"storybook": "^0.0.0",
6761
"stylus": "^0.54.5",
68-
"webpack": "^2.4.1"
62+
"webpack": "^2.5.1"
6963
},
7064
"standard": {
7165
"parser": "babel-eslint",

src/index.styl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $expandSize = 7px
2121
.rt-thead
2222
flex: 1 0 auto
2323
display: flex
24+
overflow-y: scroll
2425
flex-direction: column
2526
-webkit-user-select: none;
2627
-moz-user-select: none;
@@ -98,7 +99,7 @@ $expandSize = 7px
9899
flex: 99999 1 auto
99100
display: flex
100101
flex-direction: column
101-
overflow: auto
102+
overflow: scroll
102103
// z-index:0
103104
.rt-tr-group
104105
border-bottom: solid 1px alpha(black, .05)

0 commit comments

Comments
 (0)