Skip to content

Commit 3a886fe

Browse files
authored
chore: Upgrade dev dependencies (react-dropzone#643)
1 parent f9fc440 commit 3a886fe

10 files changed

+1825
-1205
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
coverage/

.eslintrc

+4-19
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,16 @@
11
{
2-
"extends": [
3-
"okonet",
4-
"prettier"
5-
],
6-
"plugins": [
7-
"prettier"
8-
],
2+
"extends": ["okonet/node"],
93
"rules": {
10-
// React
11-
"react/forbid-prop-types": [
12-
2,
13-
{
14-
"forbid": [
15-
"any",
16-
"array"
17-
]
18-
}
19-
],
20-
"react/require-default-props": 0,
21-
4+
"strict": 0,
5+
"node/no-unpublished-require": 0,
226
// Import
237
"import/no-extraneous-dependencies": [
248
2,
259
{
2610
"devDependencies": [
2711
"webpack*.js",
2812
"**/*.spec.js",
13+
"**/*.config.js",
2914
"**/testSetup.js"
3015
]
3116
}

package.json

+32-26
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111
"build:es": "cross-env BABEL_ENV=es babel ./src --out-dir ./dist/es --ignore spec.js",
1212
"start": "styleguidist server",
1313
"styleguide": "styleguidist build",
14-
"test": "npm run eslint:src && jest --coverage && npm run size",
15-
"test:es": "cross-env JEST_TARGET=../dist/es/index jest --coverage",
16-
"test:umd": "cross-env JEST_TARGET=../dist/index jest --coverage",
17-
"eslint:src": "eslint ./src ./examples ./*.js",
14+
"test": "npm run eslint:src && jest --coverage",
15+
"eslint:src": "eslint .",
1816
"commitmsg": "commitlint -e",
1917
"precommit": "lint-staged",
20-
"prepublish": "npm run build && npm run test:umd && npm run test:es",
18+
"prepublish": "npm run build && npm run size",
2119
"logo": "cd logo && sketchtool export artboards logo.sketch",
2220
"imagemin": "imagemin --out-dir=logo --plugin=pngquant --plugin=svgo",
2321
"size": "size-limit",
@@ -30,7 +28,7 @@
3028
},
3129
{
3230
"path": "dist/es/index.js",
33-
"limit": "4 KB"
31+
"limit": "6 KB"
3432
}
3533
],
3634
"lint-staged": {
@@ -78,36 +76,41 @@
7876
"prop-types": "^15.6.2"
7977
},
8078
"devDependencies": {
81-
"@commitlint/cli": "^3.2.0",
82-
"@commitlint/config-angular": "^3.0.3",
83-
"@commitlint/prompt": "^3.2.0",
84-
"@commitlint/prompt-cli": "^3.2.0",
79+
"@commitlint/cli": "^7.0.0",
80+
"@commitlint/config-angular": "^7.0.1",
81+
"@commitlint/prompt": "^7.0.0",
82+
"@commitlint/prompt-cli": "^7.0.0",
8583
"babel-cli": "^6.9.0",
86-
"babel-core": "^6.9.1",
87-
"babel-eslint": "^7.1.1",
88-
"babel-jest": "^21.0.0",
84+
"babel-core": "^6.26.3",
85+
"babel-eslint": "*",
86+
"babel-jest": "^23.4.2",
8987
"babel-plugin-add-module-exports": "^0.2.1",
9088
"babel-plugin-external-helpers": "^6.22.0",
91-
"babel-preset-env": "^1.6.0",
89+
"babel-preset-env": "^1.7.0",
9290
"babel-preset-react": "^6.3.13",
9391
"babel-preset-stage-1": "^6.24.1",
9492
"babel-register": "^6.9.0",
95-
"commitizen": "^2.9.6",
96-
"cross-env": "^5.1.3",
93+
"commitizen": "^2.10.1",
94+
"cross-env": "^5.2.0",
9795
"enzyme": "^3.4.4",
9896
"enzyme-adapter-react-16": "^1.2.0",
99-
"eslint": "^4.6.1",
100-
"eslint-config-okonet": "^5.0.1",
101-
"eslint-config-prettier": "^2.4.0",
102-
"eslint-plugin-prettier": "^2.2.0",
97+
"eslint": "4.x",
98+
"eslint-config-okonet": "^7.0.2",
99+
"eslint-config-prettier": "2.x",
100+
"eslint-plugin-flowtype": "2.x",
101+
"eslint-plugin-import": "2.x",
102+
"eslint-plugin-jsx-a11y": "5.x",
103+
"eslint-plugin-node": "5.x",
104+
"eslint-plugin-prettier": "2.x",
105+
"eslint-plugin-react": "7.x",
103106
"husky": "^0.14.3",
104107
"imagemin-cli": "^3.0.0",
105108
"imagemin-pngquant": "^5.0.0",
106-
"jest": "^21.0.1",
109+
"jest": "^23.5.0",
107110
"jest-enzyme": "^6.0.3",
108-
"lint-staged": "^4.1.0",
109-
"markdownlint-cli": "^0.3.1",
110-
"prettier": "^1.6.1",
111+
"lint-staged": "^7.2.2",
112+
"markdownlint-cli": "^0.13.0",
113+
"prettier": "*",
111114
"react": "^16.4.2",
112115
"react-dom": "^16.4.2",
113116
"react-styleguidist": "^7.2.3",
@@ -119,13 +122,16 @@
119122
"rollup-plugin-node-resolve": "^3.3.0",
120123
"rollup-plugin-uglify": "^3.0.0",
121124
"sinon": "^3.2.1",
122-
"size-limit": "^0.11.0",
125+
"size-limit": "^0.19.2",
123126
"webpack-blocks": "^1.0.0"
124127
},
125128
"config": {
126129
"commitizen": {
127130
"path": "@commitlint/prompt"
128131
}
129132
},
130-
"version": "0.0.0-development"
133+
"version": "0.0.0-development",
134+
"engines": {
135+
"node": ">= 6"
136+
}
131137
}

rollup.config.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
/* eslint import/no-extraneous-dependencies: 0 */
2-
3-
import nodeResolve from 'rollup-plugin-node-resolve'
4-
import commonjs from 'rollup-plugin-commonjs'
5-
import babel from 'rollup-plugin-babel'
6-
import uglify from 'rollup-plugin-uglify'
1+
const nodeResolve = require('rollup-plugin-node-resolve')
2+
const commonjs = require('rollup-plugin-commonjs')
3+
const babel = require('rollup-plugin-babel')
4+
const uglify = require('rollup-plugin-uglify')
75

86
const umdGlobals = {
97
react: 'React',
108
'prop-types': 'PropTypes'
119
}
1210

13-
export default [
11+
module.exports = [
1412
{
1513
input: './src/index.js',
1614
output: {

src/.eslintrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"root": true,
3+
"extends": ["okonet/react"],
4+
"rules": {
5+
"react/require-default-props": 0,
6+
"react/forbid-prop-types": 0
7+
}
8+
}

src/index.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* global process */
12
/* eslint prefer-template: 0 */
23

34
import React from 'react'
@@ -402,6 +403,7 @@ class Dropzone extends React.Component {
402403
}
403404

404405
// Destructure custom props away from props used for the div element
406+
/* eslint-disable no-unused-vars */
405407
const {
406408
acceptedFiles,
407409
preventDropOnDocument,
@@ -415,12 +417,17 @@ class Dropzone extends React.Component {
415417
getDataTransferItems,
416418
...divProps
417419
} = props
420+
/* eslint-enable no-unused-vars */
418421

422+
/* eslint-disable jsx-a11y/no-static-element-interactions */
423+
/* eslint-disable jsx-a11y/click-events-have-key-events */
419424
return (
420425
<div
421426
className={className}
422427
style={appliedStyle}
423-
{...divProps /* expand user provided props first so event handlers are never overridden */}
428+
{
429+
...divProps /* expand user provided props first so event handlers are never overridden */
430+
}
424431
onClick={this.composeHandlers(this.onClick)}
425432
onDragStart={this.composeHandlers(this.onDragStart)}
426433
onDragEnter={this.composeHandlers(this.onDragEnter)}
@@ -432,7 +439,9 @@ class Dropzone extends React.Component {
432439
>
433440
{this.renderChildren(children, isDragActive, isDragAccept, isDragReject)}
434441
<input
435-
{...inputProps /* expand user provided inputProps first so inputAttributes override them */}
442+
{
443+
...inputProps /* expand user provided inputProps first so inputAttributes override them */
444+
}
436445
{...inputAttributes}
437446
/>
438447
</div>

src/index.spec.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1+
/* eslint jsx-a11y/click-events-have-key-events: 0 */
2+
/* eslint jsx-a11y/no-static-element-interactions: 0 */
3+
14
import React from 'react'
25
import { mount, render } from 'enzyme'
36
import { spy, stub } from 'sinon'
47
import { onDocumentDragOver } from './utils'
58

69
const flushPromises = wrapper =>
710
new Promise(resolve =>
8-
setImmediate(() => {
11+
global.setImmediate(() => {
912
wrapper.update()
1013
resolve(wrapper)
1114
})
1215
)
13-
const Dropzone = require(process.env.JEST_TARGET ? process.env.JEST_TARGET : './index') // eslint-disable-line import/no-dynamic-require
16+
const Dropzone = require('./index')
1417
const DummyChildComponent = () => null
1518

1619
let files

testSetup.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import Enzyme from 'enzyme'
2-
import Adapter from 'enzyme-adapter-react-16'
3-
import 'jest-enzyme'
1+
/* eslint prefer-template: 0 */
2+
/* eslint node/no-unpublished-require: 0 */
3+
4+
const Enzyme = require('enzyme')
5+
const Adapter = require('enzyme-adapter-react-16')
6+
require('jest-enzyme')
47

58
Enzyme.configure({ adapter: new Adapter() })
69

wallaby.config.js

-17
This file was deleted.

0 commit comments

Comments
 (0)