Skip to content

Commit 32365e4

Browse files
chore: bump dependencies (#4000)
* chore: bump test devDependencies * wip * fix script * fix lint errors * fix UTs * fix size regression * use a proper version * fix TS error * fix lint errors * run prettier * fix lint error Co-authored-by: Malcolm <noinkling@users.noreply.github.com>
1 parent 33b5d5a commit 32365e4

172 files changed

Lines changed: 6569 additions & 6801 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babel-preset.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ const plugins = [
2424
'@babel/plugin-transform-runtime',
2525
{
2626
regenerator: isDocsBuild,
27+
useESModules: isESBuild,
28+
// https://github.com/babel/babel/issues/10261
29+
version: require('@babel/runtime/package.json').version,
2730
},
2831
],
2932
// Plugins that allow to reduce the target bundle size

.circleci/config.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,7 @@ jobs:
7171
at: ~/project
7272
- *restore_node_modules
7373
- run:
74-
name: Lint TypeScript
75-
command: yarn tsd:lint
76-
- run:
77-
name: Lint JavaScript
74+
name: Lint
7875
command: yarn lint
7976

8077
workflows:

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
bundle-size/dist/*
12
coverage/*
23
dist/*
34
docs/dist/*

.eslintrc

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"root": true,
23
"parser": "babel-eslint",
34
"extends": ["airbnb", "prettier"],
45
"env": {
@@ -15,11 +16,14 @@
1516
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
1617
"no-return-assign": ["error", "except-parens"],
1718
"no-underscore-dangle": "off",
18-
"padded-blocks": ["error", {
19-
"blocks": "never",
20-
"switches": "never",
21-
"classes": "never"
22-
}],
19+
"padded-blocks": [
20+
"error",
21+
{
22+
"blocks": "never",
23+
"switches": "never",
24+
"classes": "never"
25+
}
26+
],
2327
"prefer-destructuring": "off",
2428
"jsx-a11y/alt-text": "warn",
2529
"jsx-a11y/anchor-is-valid": "off",
@@ -28,6 +32,8 @@
2832
"jsx-a11y/label-has-associated-control": "warn",
2933
"jsx-a11y/no-static-element-interactions": "warn",
3034
"jsx-a11y/role-has-required-aria-props": "warn",
35+
"import/named": "off",
36+
"import/no-cycle": "off",
3137
"import/no-dynamic-require": "off",
3238
"import/no-extraneous-dependencies": "off",
3339
"import/no-unresolved": "off",
@@ -36,11 +42,32 @@
3642
"react/button-has-type": "off",
3743
"react/destructuring-assignment": "off",
3844
"react/forbid-prop-types": "off",
39-
"react/jsx-one-expression-per-line": "off",
40-
"react/jsx-filename-extension": [2, { "extensions": [".js"] }],
45+
"react/jsx-curly-newline": "off",
46+
"react/jsx-one-expression-per-line": "off",
47+
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".tsx"] }],
48+
"react/jsx-props-no-spreading": "off",
4149
"react/jsx-wrap-multilines": "off",
50+
"react/prefer-stateless-function": "off",
4251
"react/no-unused-prop-types": "off",
4352
"react/sort-comp": "off",
44-
"react/require-default-props":"off"
45-
}
53+
"react/state-in-constructor": "off",
54+
"react/require-default-props": "off"
55+
},
56+
"overrides": [
57+
{
58+
"files": ["**/*.ts", "**/*.tsx"],
59+
"parser": "@typescript-eslint/parser",
60+
"extends": [
61+
"eslint:recommended",
62+
"plugin:@typescript-eslint/eslint-recommended",
63+
"plugin:@typescript-eslint/recommended"
64+
],
65+
"plugins": ["@typescript-eslint"],
66+
"rules": {
67+
"@typescript-eslint/explicit-module-boundary-types": "off",
68+
"@typescript-eslint/no-explicit-any": "off",
69+
"@typescript-eslint/no-empty-interface": "off"
70+
}
71+
}
72+
]
4673
}

.prettierrc.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
"parser": "json"
1515
}
1616
},
17-
{
18-
"files": "*.{ts,tsx}",
19-
"options": {
20-
"semi": true
21-
}
22-
},
2317
{
2418
"files": "docs/src/examples/**/*.js",
2519
"options": {

bundle-size/fixtures/Portal.size.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33
import ReactDOM from 'react-dom'
44

55
function App() {
6-
return <Portal trigger={<button />}>Some content</Portal>
6+
return <Portal trigger={<button>A button</button>}>Some content</Portal>
77
}
88

99
ReactDOM.render(<App />, document.querySelector('#root'))

config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const config = {
6161
hash: false, // the hash of the compilation
6262
version: false, // webpack version info
6363
timings: true, // timing info
64-
assets: true, // assets info
64+
assets: false, // assets info
6565
chunks: false, // chunk info
6666
colors: true, // with console colors
6767
chunkModules: false, // built modules info to chunk info
@@ -74,6 +74,7 @@ const config = {
7474
modulesSort: '', // (string) sort the modules by that field
7575
chunksSort: '', // (string) sort the chunks by that field
7676
assetsSort: '', // (string) sort the assets by that field
77+
warningsFilter: [/critical dependency:/i],
7778
},
7879
}
7980

docs/src/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { docTypes } from './utils'
1111
const App = ({ componentMenu, versions }) => (
1212
<div style={style.container}>
1313
<Router>
14-
<React.Fragment>
14+
<>
1515
<Switch>
1616
{/*
1717
* We can't place <Sidebar /> inside of <Routes /> because it will be remounted on page
@@ -33,7 +33,7 @@ const App = ({ componentMenu, versions }) => (
3333
</Switch>
3434

3535
<Routes />
36-
</React.Fragment>
36+
</>
3737
</Router>
3838
</div>
3939
)

docs/src/components/CarbonAd/CarbonAd.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ const waitForLoad = () => {
3030
}
3131

3232
class CarbonAd extends Component {
33-
static propTypes = {
34-
location: PropTypes.object.isRequired,
35-
}
36-
3733
shouldComponentUpdate(nextProps) {
3834
return this.props.location.pathname !== nextProps.location.pathname
3935
}
@@ -73,4 +69,8 @@ class CarbonAd extends Component {
7369
}
7470
}
7571

72+
CarbonAd.propTypes = {
73+
location: PropTypes.object.isRequired,
74+
}
75+
7676
export default withRouter(CarbonAd)

docs/src/components/CarbonAd/CarbonAdNative.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ const debug = makeDebugger('carbon-ad-native')
99
const MAX_FAILED_ADS = 10
1010

1111
class CarbonAdNative extends PureComponent {
12-
static propTypes = {
13-
inverted: PropTypes.bool,
14-
}
15-
1612
state = {}
1713

1814
componentDidMount() {
@@ -23,7 +19,8 @@ class CarbonAdNative extends PureComponent {
2319
this.getAd()
2420
}
2521

26-
componentWillUpdate() {
22+
// eslint-disable-next-line camelcase
23+
UNSAFE_componentWillUpdate() {
2724
const shouldGetAd = Date.now() - this.timeOfLastAd > 10000
2825
debug('componentWillUpdate', { mounted: this.mounted, shouldGetAd })
2926
if (shouldGetAd) {
@@ -177,4 +174,8 @@ class CarbonAdNative extends PureComponent {
177174
}
178175
}
179176

177+
CarbonAdNative.propTypes = {
178+
inverted: PropTypes.bool,
179+
}
180+
180181
export default CarbonAdNative

0 commit comments

Comments
 (0)