Skip to content

Commit

Permalink
chore: added ci lints and script to update dependencies and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
taeh98 committed Oct 4, 2023
1 parent 747fda0 commit 64454f1
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 155 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ rules:
- error
- 300
max-lines-per-function:
- error
- warn
- max: 20
no-console: error
no-duplicate-imports: error
Expand All @@ -100,7 +100,7 @@ rules:
- .js
- .jsx
react/prop-types: error
sort-imports: error
sort-imports: warn
sort-keys:
- error
- asc
Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ on: [push, pull_request]

jobs:
# TODO: check project builds/compiles correctly, maybe with tsc TypeScript compiler?

# TODO: add tests including coverage

lint_files:
lint_src_files:
name: Lint source files
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
Expand All @@ -41,7 +40,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
Expand All @@ -65,7 +64,7 @@ jobs:
name: Search for TODOs etc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Search for TODO, FIXME, and BUG statements in source files
run: >
if grep
Expand All @@ -84,9 +83,8 @@ jobs:
typos_spell_check:
name: Check spelling with typos
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Check spelling with typos
uses: crate-ci/typos@master
with:
Expand All @@ -95,22 +93,35 @@ jobs:
lint_markdown_files:
name: Lint Markdown files
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: articulate/actions-markdownlint@v1
with:
files: '*.md'
ignore: '**/node_modules'

lint_yaml_files:
name: Lint YAML files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ibiqlik/action-yamllint@v3

lint_shell_script_files:
name: Lint shell scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: azohra/shell-linter@latest

commitlint:
name: Enforce Conventional Commits
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check the commits conform to the Conventional Commits specification with commitlint
uses: wagoid/commitlint-github-action@v5

# TODO: check commits squashed into one (i.e. all changes in a PR are in one commit after last one in primary branch)
# TODO: use release-please to increment version number, update changelog, and publish releases automatically if CI passes
# TODO: use semver to increase version numbers and update changelog automatically
# TODO: publish new release automatically if version increased and CI passes (use release-please?)
1 change: 1 addition & 0 deletions examples/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const EXAMPLE_COMPONENT_ITEMS: Array<ItemType<ExampleComponent>> = [
];

type Props = Record<string, never>;

interface State {
currentExample: ExampleComponent;
examplePickerOpen: boolean;
Expand Down
1 change: 1 addition & 0 deletions examples/example-src-files/typescript-class-example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import DropDownPicker, { ItemType } from 'react-native-dropdown-picker';
interface Props {
multiple: boolean;
}

interface State {
open: boolean;
singleValue: string | null;
Expand Down
89 changes: 43 additions & 46 deletions examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
},
"dependencies": {
"expo": "^49.0.13",
"expo-status-bar": "~1.7.1",
"expo-status-bar": "~1.6.0",
"react": "18.2.0",
"react-native": "0.72.5",
"react-native-dropdown-picker": "^5.4.6"
},
"devDependencies": {
"@babel/core": "^7.23.0",
"@types/react": "~18.2.24",
"@types/react": "~18.2.25",
"typescript": "^5.2.2"
}
}
Loading

0 comments on commit 64454f1

Please sign in to comment.