Skip to content

Commit 1cafce3

Browse files
authored
chore: bump deps (#232)
1 parent 3b8f6f1 commit 1cafce3

File tree

9 files changed

+2118
-1502
lines changed

9 files changed

+2118
-1502
lines changed

.flowconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
.*/test/.*\.example\.js
55

66
[options]
7-
suppress_comment=.*\\$FlowIgnore
87
esproposal.class_static_fields=enable
98
esproposal.class_instance_fields=enable
109
esproposal.export_star_as=enable

.github/FUNDING.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github: amilajack
1+
github: [amilajack]
22
patreon: amilajack
3-
paypal: https://paypal.me/amilajack
3+
custom: ['https://paypal.me/amilajack', 'https://venmo.com/amilajack']

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test
2+
3+
on: push
4+
5+
jobs:
6+
release:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [macos-10.14, ubuntu-18.04, windows-2019]
12+
13+
steps:
14+
- name: Check out Git repository
15+
uses: actions/checkout@v2
16+
17+
- name: Install Node.js, NPM and Yarn
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: 14
21+
22+
- name: Get yarn cache directory path
23+
id: yarn-cache-dir-path
24+
run: echo "::set-output name=dir::$(yarn cache dir)"
25+
26+
- uses: actions/cache@v2
27+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
28+
with:
29+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-yarn-
33+
34+
- name: yarn install
35+
run: yarn --frozen-lockfile
36+
37+
- name: yarn test
38+
env:
39+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
40+
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
41+
run: yarn test

azure-pipelines.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

package.json

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"flow": "flow",
1111
"build": "cross-env NODE_ENV=production babel src --out-dir dist",
12-
"lint": "eslint --cache --format=node_modules/eslint-formatter-pretty .",
12+
"lint": "eslint --cache .",
1313
"prettier": "prettier --single-quote --write \"./src/*.js\"",
1414
"preversion": "yarn build",
1515
"spec": "yarn build && jest",
@@ -30,38 +30,41 @@
3030
"dist"
3131
],
3232
"dependencies": {
33-
"@babel/runtime": "^7.9.6",
34-
"core-js": "3.6.5",
35-
"find-up": "^4.1.0",
33+
"@babel/runtime": "^7.12.5",
34+
"core-js": "3.8.1",
35+
"find-up": "^5.0.0",
3636
"slash": "^3.0.0"
3737
},
3838
"devDependencies": {
39-
"@babel/cli": "^7.8.4",
40-
"@babel/core": "^7.9.6",
41-
"@babel/plugin-proposal-class-properties": "^7.8.3",
42-
"@babel/preset-env": "^7.9.6",
43-
"@babel/preset-flow": "^7.9.0",
44-
"@babel/register": "^7.9.0",
39+
"@babel/cli": "^7.12.8",
40+
"@babel/core": "^7.12.9",
41+
"@babel/plugin-proposal-class-properties": "^7.12.1",
42+
"@babel/preset-env": "^7.12.7",
43+
"@babel/preset-flow": "^7.12.1",
44+
"@babel/register": "^7.12.1",
4545
"babel-core": "^7.0.0-bridge.0",
4646
"babel-eslint": "^10.1.0",
47-
"babel-jest": "^26.0.1",
47+
"babel-jest": "^26.6.3",
4848
"chai": "^4.2.0",
49-
"cross-env": "^7.0.2",
50-
"cross-spawn": "^7.0.2",
51-
"eslint": "7.0.0",
52-
"eslint-config-airbnb-base": "^14.1.0",
53-
"eslint-config-prettier": "^6.11.0",
54-
"eslint-formatter-pretty": "^3.0.1",
55-
"eslint-plugin-flowtype": "^5.0.3",
56-
"eslint-plugin-html": "^6.0.2",
57-
"eslint-plugin-import": "^2.20.2",
58-
"eslint-plugin-prettier": "^3.1.3",
59-
"eslint-plugin-vue": "^6.2.2",
60-
"execa": "^4.0.1",
61-
"flow-bin": "0.125.1",
62-
"husky": "^4.2.5",
63-
"jest-cli": "^26.0.1",
64-
"prettier": "^2.0.5"
49+
"cross-env": "^7.0.3",
50+
"cross-spawn": "^7.0.3",
51+
"eslint": "7.15.0",
52+
"eslint-config-airbnb-base": "^14.2.1",
53+
"eslint-config-prettier": "^7.0.0",
54+
"eslint-plugin-flowtype": "^5.2.0",
55+
"eslint-plugin-html": "^6.1.1",
56+
"eslint-plugin-import": "^2.22.1",
57+
"eslint-plugin-prettier": "^3.2.0",
58+
"eslint-plugin-vue": "^7.2.0",
59+
"execa": "^5.0.0",
60+
"flow-bin": "0.139.0",
61+
"husky": "^4.3.5",
62+
"jest-cli": "^26.6.3",
63+
"lint-staged": "^10.5.3",
64+
"prettier": "^2.2.1"
65+
},
66+
"lint-staged": {
67+
"*.js": ["eslint", "prettier --write"]
6568
},
6669
"peerDependencies": {
6770
"eslint": ">=5.16.0",

src/index.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ type EslintContext = {
2626
options: any[],
2727
};
2828

29+
type ReturnRule = { Program: (node: Object) => void }
30+
2931
type Info = {
3032
flowDir: string,
3133
program: Program,
@@ -103,8 +105,8 @@ function errorFlowCouldNotRun(loc) {
103105
};
104106
}
105107

106-
function createFilteredErrorRule(filter: (CollectOutputElement) => any) {
107-
return function showErrors(context: EslintContext) {
108+
function createFilteredErrorRule(filter: (CollectOutputElement) => any): (context: EslintContext) => ReturnRule {
109+
return function showErrors(context: EslintContext): ReturnRule {
108110
return {
109111
Program(node: Object) {
110112
const source = context.getSourceCode();
@@ -187,7 +189,7 @@ export default {
187189
recommended,
188190
},
189191
rules: {
190-
uncovered: function showCoverage(context: EslintContext) {
192+
uncovered: function showCoverage(context: EslintContext): ReturnRule {
191193
return {
192194
Program(node: Object) {
193195
const res = getCoverage(context, node);
@@ -213,7 +215,7 @@ export default {
213215
},
214216
'enforce-min-coverage': function enforceMinCoverage(
215217
context: EslintContext
216-
) {
218+
): ReturnRule {
217219
return {
218220
Program(node: Object) {
219221
const res = getCoverage(context, node);
@@ -240,11 +242,11 @@ export default {
240242
},
241243
};
242244
},
243-
'show-errors': createFilteredErrorRule(
245+
'show-errors': (createFilteredErrorRule(
244246
({ level }) => level !== FlowSeverity.Warning
245-
),
246-
'show-warnings': createFilteredErrorRule(
247+
) : (context: EslintContext) => ReturnRule),
248+
'show-warnings': (createFilteredErrorRule(
247249
({ level }) => level === FlowSeverity.Warning
248-
),
250+
) : (context: EslintContext) => ReturnRule),
249251
},
250252
};

test/9.example.import.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/**
33
* @flow
44
*/
5-
import React from 'react';
5+
import * as React from 'react'
66

7-
export default function Hello({ name = 'World' }: { name: string }) {
7+
export default function Hello({ name = 'World' }: { name: string }): React.Node {
88
return <p>Hello, {name}!</p>;
99
}

0 commit comments

Comments
 (0)