Skip to content
Closed
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
15 changes: 12 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
{
"extends": "eslint-config-rackt",
"extends": ["eslint-config-airbnb", "eslint:recommended", "plugin:react/recommended"],
"env": {
"browser": true,
"mocha": true,
"node": true
},
"rules": {
"semi": ["error", "never"],
"valid-jsdoc": 2,
"react/jsx-uses-vars": 1,
"react/jsx-uses-react": 1,
"react/jsx-no-undef": 2
"react/jsx-no-undef": 2,
"comma-dangle": 0,
"react/jsx-uses-vars": 1,
"react/display-name": 1,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/forbid-prop-types": [0, { "forbid": ["object"] }],
"react/prefer-stateless-function": "off",
"no-unused-vars": "warn",
"no-console": 1,
"no-unexpected-multiline": "warn"
},
"plugins": [
"react"
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@
"@types/react": "^16.4.7",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^7.2.3",
"babel-eslint": "^8.2.6",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"eslint": "^3.19.0",
"eslint-config-rackt": "^1.1.1",
"eslint": "^5.3.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.10.0",
"expect": "^1.18.0",
"fbjs": "^0.8.17",
Expand Down
7 changes: 3 additions & 4 deletions test/components/ThemeProvider.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import TestUtils from 'react-dom/test-utils'
import { ThemeProvider } from '../../src/index'


before(function () {
before(() => {
/* eslint-disable no-console */
console.error = function () {}
})

after(function () {
after(() => {
delete console.error
})

Expand Down Expand Up @@ -47,8 +47,7 @@ describe('ThemeProvider', () => {
)).toThrow(/expected to receive a single React element child/)

expect(() => TestUtils.renderIntoDocument(
<ThemeProvider theme={theme}>
</ThemeProvider>
<ThemeProvider theme={theme} />
)).toThrow(/expected to receive a single React element child/)
} finally {
ThemeProvider.propTypes = propTypes
Expand Down
4 changes: 3 additions & 1 deletion test/setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import raf from './tempPolyfills'
import { jsdom } from 'jsdom'
/* eslint-disable no-unused-vars */
import raf from './tempPolyfills'


global.document = jsdom('<!doctype html><html><body></body></html>')
global.window = document.defaultView
Expand Down
Loading