Skip to content

Commit d09bd0f

Browse files
committed
chore: upgrade dependencies
1 parent 21df972 commit d09bd0f

File tree

8 files changed

+3193
-2679
lines changed

8 files changed

+3193
-2679
lines changed

.eslintrc.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module.exports = {
2+
root: true,
23
extends: [
4+
'plugin:react/recommended',
35
'plugin:@typescript-eslint/eslint-recommended',
46
// TS specific recommended
57
'plugin:@typescript-eslint/recommended',
68
//
79
'plugin:@typescript-eslint/recommended-requiring-type-checking',
8-
// React Native
9-
'@react-native-community',
1010
// Disable rules conflicting with prettier
1111
require.resolve('eslint-config-prettier'),
1212
],
@@ -27,8 +27,12 @@ module.exports = {
2727
},
2828
parser: '@typescript-eslint/parser',
2929
parserOptions: {
30-
ecmaVersion: 2018,
3130
sourceType: 'module',
3231
project: './tsconfig.json',
3332
},
33+
settings: {
34+
"react": {
35+
"version": "detect"
36+
}
37+
}
3438
};

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Automated Tests
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
12+
jobs:
13+
# ==============================================================================
14+
# JOB: BUILD
15+
# ==============================================================================
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
node-version: [16.x]
21+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
22+
steps:
23+
- uses: actions/checkout@v2
24+
# According to: https://github.com/actions/cache/blob/main/examples.md#node---yarn
25+
- name: Get yarn cache directory path
26+
id: yarn-cache-dir-path
27+
run: echo "::set-output name=dir::$(yarn cache dir)"
28+
- uses: actions/cache@v2
29+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
30+
with:
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
33+
restore-keys: |
34+
${{ runner.os }}-yarn-
35+
- name: Use Node.js ${{ matrix.node-version }}
36+
uses: actions/setup-node@v2
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
- run: yarn install --immutable
40+
- run: yarn run test:ci

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
},
2323
"[typescriptreact]": {
2424
"editor.formatOnSave": false
25-
}
26-
}
25+
},
26+
}

package.json

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"scripts": {
88
"clean": "watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn",
99
"jest": "jest ./src/",
10-
"eslint:ci": "eslint index.js ./src/ --ext .js,.jsx,.tsx,.ts -f table",
11-
"eslint:fix": "eslint index.js ./src/ --fix --ext .js,.jsx,.tsx,.ts -f table",
12-
"test": "yarn run eslint:ci && yarn run jest && yarn tsc --noEmit",
10+
"eslint:ci": "eslint index.js ./src/ --ext .js,.jsx,.tsx,.ts",
11+
"eslint:fix": "eslint index.js ./src/ --fix --ext .js,.jsx,.tsx,.ts",
12+
"test:ci": "yarn run eslint:ci && yarn run jest && yarn tsc --noEmit",
1313
"tsc": "tsc --skipLibCheck",
1414
"build:module": "yarn tsc --outDir ./lib/module --sourceMap",
1515
"build:commonjs": "yarn tsc --module commonjs --outDir ./lib/commonjs --sourceMap",
@@ -49,7 +49,7 @@
4949
],
5050
"peerDependencies": {
5151
"react": "*",
52-
"react-native": "^0.64"
52+
"react-native": ">=0.64"
5353
},
5454
"bugs": {
5555
"url": "https://github.com/Purii/react-native-tableview-simple/issues"
@@ -59,27 +59,29 @@
5959
"url": "[email protected]:Purii/react-native-tableview-simple.git"
6060
},
6161
"devDependencies": {
62-
"@commitlint/cli": "^12.0.1",
63-
"@commitlint/config-conventional": "^12.0.1",
64-
"@react-native-community/eslint-config": "^2.0.0",
65-
"@types/jest": "^26.0.22",
66-
"@types/react": "^17.0.3",
67-
"@types/react-native": "^0.64.1",
68-
"@types/react-test-renderer": "^17.0.1",
69-
"@typescript-eslint/eslint-plugin": "^4.19.0",
70-
"@typescript-eslint/parser": "^4.19.0",
71-
"babel-jest": "26.6.3",
62+
"@commitlint/cli": "15.0.0",
63+
"@commitlint/config-conventional": "15.0.0",
64+
"@types/jest": "27.0.3",
65+
"@types/react": "17.0.37",
66+
"@types/react-native": "0.66.8",
67+
"@types/react-test-renderer": "17.0.1",
68+
"@typescript-eslint/eslint-plugin": "5.6.0",
69+
"@typescript-eslint/parser": "5.6.0",
70+
"babel-jest": "27.4.4",
7271
"babel-preset-react-native": "4.0.1",
73-
"eslint": "^7.22.0",
74-
"eslint-config-prettier": "^8.1.0",
75-
"husky": "^5.2.0",
76-
"jest": "26.6.3",
77-
"lint-staged": "^10.5.4",
72+
"eslint": "8.4.1",
73+
"eslint-config-prettier": "8.3.0",
74+
"eslint-plugin-prettier": "4.0.0",
75+
"eslint-plugin-react": "7.27.1",
76+
"husky": "7.0.4",
77+
"jest": "27.4.4",
78+
"lint-staged": "12.1.2",
79+
"prettier": "2.5.1",
7880
"react": "17.0.2",
79-
"react-native": "^0.64.0",
81+
"react-native": "0.66.4",
8082
"react-test-renderer": "17.0.2",
81-
"rimraf": "^3.0.2",
82-
"standard-version": "^9.1.1",
83-
"typescript": "^4.2.3"
83+
"rimraf": "3.0.2",
84+
"standard-version": "9.3.2",
85+
"typescript": "4.5.3"
8486
}
85-
}
87+
}

src/components/Cell.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,7 @@ const Cell: React.FC<CellInterface> = ({
106106
* Merge styles with props
107107
* Type is a Hotfix
108108
*/
109-
const localStyles: {
110-
[key: string]: {
111-
[key: string]: any;
112-
};
113-
} = {
109+
const localStyles = {
114110
...styles,
115111
cellBackgroundColor: {
116112
backgroundColor: backgroundColor || theme.colors.background,

src/components/Section.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ const Section: React.FC<SectionInterface> = ({
7575
/**
7676
* Merge styles with props
7777
*/
78-
const localStyles: {
79-
[key: string]: {
80-
[key: string]: any;
81-
};
82-
} = {
78+
const localStyles = {
8379
...styles,
8480
section: [
8581
styles.section,

src/components/Separator.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ const Separator: React.FC<SeparatorInterface> = ({
3030
: true,
3131
}) => {
3232
const theme = useContext(ThemeContext);
33-
const localStyles: {
34-
[key: string]: {
35-
[key: string]: any;
36-
};
37-
} = {
33+
const localStyles = {
3834
separator: [
3935
styles.separator,
4036
{ backgroundColor: backgroundColor || theme.colors.background },

0 commit comments

Comments
 (0)