Skip to content

Commit 228d035

Browse files
authored
chore: added ci lints and script to update dependencies and format code (#715)
1 parent 747fda0 commit 228d035

File tree

9 files changed

+228
-155
lines changed

9 files changed

+228
-155
lines changed

.eslintrc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ rules:
8181
- error
8282
- 300
8383
max-lines-per-function:
84-
- error
84+
- warn
8585
- max: 20
8686
no-console: error
8787
no-duplicate-imports: error
@@ -100,7 +100,7 @@ rules:
100100
- .js
101101
- .jsx
102102
react/prop-types: error
103-
sort-imports: error
103+
sort-imports: warn
104104
sort-keys:
105105
- error
106106
- asc

.github/workflows/ci.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ on: [push, pull_request]
66

77
jobs:
88
# TODO: check project builds/compiles correctly, maybe with tsc TypeScript compiler?
9-
109
# TODO: add tests including coverage
1110

12-
lint_files:
11+
lint_src_files:
1312
name: Lint source files
1413
runs-on: ubuntu-latest
1514

1615
steps:
17-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1817
- uses: actions/setup-node@v3
1918
with:
2019
node-version: 18
@@ -41,7 +40,7 @@ jobs:
4140
runs-on: ubuntu-latest
4241

4342
steps:
44-
- uses: actions/checkout@v3
43+
- uses: actions/checkout@v4
4544
- uses: actions/setup-node@v3
4645
with:
4746
node-version: 18
@@ -65,7 +64,7 @@ jobs:
6564
name: Search for TODOs etc
6665
runs-on: ubuntu-latest
6766
steps:
68-
- uses: actions/checkout@v3
67+
- uses: actions/checkout@v4
6968
- name: Search for TODO, FIXME, and BUG statements in source files
7069
run: >
7170
if grep
@@ -84,9 +83,8 @@ jobs:
8483
typos_spell_check:
8584
name: Check spelling with typos
8685
runs-on: ubuntu-latest
87-
8886
steps:
89-
- uses: actions/checkout@v2
87+
- uses: actions/checkout@v4
9088
- name: Check spelling with typos
9189
uses: crate-ci/typos@master
9290
with:
@@ -95,22 +93,35 @@ jobs:
9593
lint_markdown_files:
9694
name: Lint Markdown files
9795
runs-on: ubuntu-latest
98-
9996
steps:
100-
- uses: actions/checkout@v3
97+
- uses: actions/checkout@v4
10198
- uses: articulate/actions-markdownlint@v1
10299
with:
103100
files: '*.md'
104101
ignore: '**/node_modules'
105102

103+
lint_yaml_files:
104+
name: Lint YAML files
105+
runs-on: ubuntu-latest
106+
steps:
107+
- uses: actions/checkout@v4
108+
- uses: ibiqlik/action-yamllint@v3
109+
110+
lint_shell_script_files:
111+
name: Lint shell scripts
112+
runs-on: ubuntu-latest
113+
steps:
114+
- uses: actions/checkout@v4
115+
- uses: azohra/shell-linter@latest
116+
106117
commitlint:
107118
name: Enforce Conventional Commits
108119
runs-on: ubuntu-latest
109-
110120
steps:
111-
- uses: actions/checkout@v3
121+
- uses: actions/checkout@v4
112122
- name: Check the commits conform to the Conventional Commits specification with commitlint
113123
uses: wagoid/commitlint-github-action@v5
114124

115125
# TODO: check commits squashed into one (i.e. all changes in a PR are in one commit after last one in primary branch)
116-
# TODO: use release-please to increment version number, update changelog, and publish releases automatically if CI passes
126+
# TODO: use semver to increase version numbers and update changelog automatically
127+
# TODO: publish new release automatically if version increased and CI passes (use release-please?)

examples/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const EXAMPLE_COMPONENT_ITEMS: Array<ItemType<ExampleComponent>> = [
6666
];
6767

6868
type Props = Record<string, never>;
69+
6970
interface State {
7071
currentExample: ExampleComponent;
7172
examplePickerOpen: boolean;

examples/example-src-files/typescript-class-example.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import DropDownPicker, { ItemType } from 'react-native-dropdown-picker';
55
interface Props {
66
multiple: boolean;
77
}
8+
89
interface State {
910
open: boolean;
1011
singleValue: string | null;

examples/package-lock.json

Lines changed: 43 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
},
1212
"dependencies": {
1313
"expo": "^49.0.13",
14-
"expo-status-bar": "~1.7.1",
14+
"expo-status-bar": "~1.6.0",
1515
"react": "18.2.0",
1616
"react-native": "0.72.5",
1717
"react-native-dropdown-picker": "^5.4.6"
1818
},
1919
"devDependencies": {
2020
"@babel/core": "^7.23.0",
21-
"@types/react": "~18.2.24",
21+
"@types/react": "~18.2.25",
2222
"typescript": "^5.2.2"
2323
}
2424
}

0 commit comments

Comments
 (0)