Skip to content

Commit acf8e54

Browse files
authored
Merge pull request #21 from TaduJR/merge-upstream-master
fix(src): merge upstream master and fix onClose double-call bug
2 parents 735fc24 + d814b53 commit acf8e54

34 files changed

+4693
-2888
lines changed

.circleci/config.yml

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

.codeclimate.yml

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

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["./node_modules/cz-ls-commits/commitlint"]
3+
}

.eslintrc.js

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,41 @@
11
module.exports = {
2-
env: {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
},
6+
extends: ["plugin:react/recommended", "airbnb", "airbnb/hooks"],
7+
plugins: ["react", "react-native", "prettier"],
8+
overrides: [
9+
{
10+
env: {
311
node: true,
4-
jest: true,
5-
browser: true,
6-
es2021: true,
7-
},
8-
settings: {
9-
react: {
10-
version: 'detect',
11-
},
12-
},
13-
extends: ['plugin:react/recommended', 'airbnb', 'airbnb/hooks', 'prettier'],
14-
plugins: ['react', 'react-native'],
15-
overrides: [
16-
{
17-
env: {
18-
node: true,
19-
},
20-
files: ['.eslintrc.{js,cjs}'],
21-
parserOptions: {
22-
sourceType: 'script',
23-
},
24-
},
25-
],
26-
parserOptions: {
27-
ecmaVersion: 'latest',
28-
sourceType: 'module',
29-
},
30-
rules: {
31-
'import/no-extraneous-dependencies': 0,
32-
'lodash/import-scope': 0,
33-
'lodash/prefer-lodash-method': 0,
34-
'lodash/prefer-noop': 0,
35-
'import/prefer-default-export': 0,
36-
'react/prop-types': 0,
37-
'react/jsx-props-no-spreading': 0,
38-
'react/destructuring-assignment': 0,
39-
'react/static-property-placement': 0,
40-
'react/forbid-prop-types': 0,
41-
'react/no-arrow-function-lifecycle': 0,
42-
'react/no-unused-class-component-methods': 0,
43-
'react/jsx-filename-extension': 0,
44-
'arrow-body-style': 0,
45-
'default-param-last': 0,
12+
},
13+
files: [".eslintrc.{js,cjs}"],
14+
parserOptions: {
15+
sourceType: "script",
16+
},
4617
},
18+
],
19+
parserOptions: {
20+
ecmaVersion: "latest",
21+
sourceType: "module",
22+
},
23+
rules: {
24+
"arrow-body-style": 0,
25+
"comma-dangle": 0,
26+
"default-param-last": 0,
27+
"import/no-extraneous-dependencies": 0,
28+
"import/prefer-default-export": 0,
29+
"object-curly-newline": 0,
30+
"operator-linebreak": 0,
31+
"prettier/prettier": "error",
32+
"react/destructuring-assignment": 0,
33+
"react/forbid-prop-types": 0,
34+
"react/jsx-filename-extension": 0,
35+
"react/jsx-props-no-spreading": 0,
36+
"react/no-arrow-function-lifecycle": 0,
37+
"react/no-unused-class-component-methods": 0,
38+
"react/prop-types": 0,
39+
"react/static-property-placement": 0,
40+
},
4741
};

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: 'npm'
9+
directory: '/'
10+
schedule:
11+
interval: weekly
12+
time: '10:00'
13+
timezone: America/New_York
14+
commit-message:
15+
prefix: 'build'
16+
prefix-development: 'build'
17+
include: 'scope'
18+
groups:
19+
prettier:
20+
patterns:
21+
- prettier
22+
- eslint-plugin-prettier
23+
24+
- package-ecosystem: 'github-actions'
25+
directory: '/'
26+
schedule:
27+
interval: weekly
28+
time: '10:00'
29+
timezone: America/New_York

.github/mergify.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pull_request_rules:
2+
- name: automatic merge for Dependabot pull requests
3+
conditions:
4+
- author=dependabot[bot]
5+
- check-success=build
6+
- check-success=commitlint
7+
- 'title~=^build\(deps-dev\): bump '
8+
actions:
9+
merge:
10+
method: squash

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
11+
12+
- name: Use Node.js
13+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
14+
with:
15+
cache: yarn
16+
node-version-file: .nvmrc
17+
18+
- name: Install dependencies
19+
run: yarn
20+
21+
- name: Run ESLint
22+
run: yarn lint
23+
24+
- name: Run Tests
25+
run: yarn test:coverage

.github/workflows/commitlint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: commitlint
2+
on: [push, pull_request]
3+
4+
jobs:
5+
commitlint:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Use Node.js
15+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
16+
with:
17+
cache: yarn
18+
node-version-file: .nvmrc
19+
20+
- name: Install dependencies
21+
run: yarn
22+
23+
- name: Lint commit message
24+
run: |
25+
if [ "${{ github.event_name }}" = "pull_request" ]; then
26+
# Only lint first-parent non-merge commits to skip merged upstream history
27+
commits=$(git rev-list --no-merges --first-parent \
28+
${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
29+
if [ -n "$commits" ]; then
30+
for sha in $commits; do
31+
echo "Linting commit $sha..."
32+
yarn commitlint --from="$sha~1" --to="$sha"
33+
done
34+
else
35+
echo "No non-merge commits to lint"
36+
fi
37+
else
38+
yarn commitlint --from=HEAD~1
39+
fi

.github/workflows/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: dependabot
2+
on: pull_request_target
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: github.actor == 'dependabot[bot]' && contains(github.event.pull_request.title, 'deps-dev')
12+
steps:
13+
- name: Approve Dependabot PR
14+
run: gh pr review --approve ${{ github.event.pull_request.html_url }}
15+
env:
16+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ jobs:
44
autoclose:
55
runs-on: ubuntu-latest
66
steps:
7-
- name: Autoclose issues that did not follow issue template
8-
uses: roots/issue-closer@95665902c8ad8808e378371ef57fbedbf99ba744 # v1.1
9-
with:
10-
repo-token: ${{ secrets.GH_TOKEN }}
11-
issue-close-message: "@${issue.user.login} this issue was automatically closed because it did not follow one of the available issue templates. See [here](https://github.com/lawnstarter/react-native-picker-select/issues/new/choose) for available options."
12-
issue-pattern: ".*Additional detail*"
7+
- name: Autoclose issues that did not follow issue template
8+
uses: roots/issue-closer@fec85f2a845cd6cf33eda6e6a4c93026e71f86d1 # v1.2
9+
with:
10+
repo-token: ${{ secrets.GH_TOKEN }}
11+
issue-close-message: "@${issue.user.login} this issue was automatically closed because it did not follow one of the available issue templates. See [here](https://github.com/lawnstarter/react-native-picker-select/issues/new/choose) for available options."
12+
issue-pattern: ".*Additional detail*"

0 commit comments

Comments
 (0)