Skip to content

Commit

Permalink
Merge pull request #1089 from dotintent/chore/Update-package-dependen…
Browse files Browse the repository at this point in the history
…cies

chore: update package dependencies, add example project, update testing process
  • Loading branch information
dominik-czupryna-withintent authored Sep 28, 2023
2 parents c8af4db + 653c0c9 commit 3e25b12
Show file tree
Hide file tree
Showing 187 changed files with 25,389 additions and 1,420 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**/node_modules/*
node_modules/
docs/**
116 changes: 91 additions & 25 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,94 @@
{
"root": true,
"parser": "babel-eslint",
"extends": [
"@react-native-community",
"eslint:recommended",
"plugin:react/recommended",
"plugin:flowtype/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended",
"prettier/flowtype",
"prettier/react"
],
"plugins": [
"react",
"react-native",
"flowtype",
"jest",
"prettier"
],
"rules": {
"no-console": "error",
"react/display-name": 0
},
"parser": "@typescript-eslint/parser",
"extends": ["@react-native-community", "prettier"],
"env": {
"react-native/react-native": true
}
}
"react-native/react-native": true,
"es2020": true
},
"overrides": [
{
"files": ["src/**", "integration-tests/**"],
"parser": "hermes-eslint",
"extends": [
"plugin:react/recommended",
"plugin:flowtype/recommended",
"plugin:prettier/recommended",
"@react-native-community",
"eslint:recommended",
"plugin:jest/recommended",
"plugin:ft-flow/recommended"
],
"plugins": ["ft-flow", "react", "react-native", "flowtype", "jest", "prettier"],
"rules": {
"ft-flow/define-flow-type": "off",
"ft-flow/use-flow-type": "off",
"flowtype/define-flow-type": "off",
"flowtype/no-types-missing-file-annotation": 0,
"semi": ["error", "never"],
"comma-dangle": ["error", "never"],
"react/display-name": 0,
"ft-flow/no-types-missing-file-annotation": 0,
"jest/no-export": 0
},
"globals": {
"$Keys": true,
"$Values": true
}
},
{
"files": ["*.tsx", "*.ts", "*.d.ts"],
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"airbnb",
"airbnb-typescript",
"prettier"
],
"parserOptions": {
"project": ["./tsconfig.json"]
},
"plugins": ["react-refresh", "@typescript-eslint"],
"rules": {
"import/prefer-default-export": "off",
"import/no-default-export": 2,
"@typescript-eslint/no-use-before-define": "off",
"no-promise-executor-return": "off",
"no-bitwise": "off",
"no-param-reassign": "off",
"react/require-default-props": "off",
"no-continue": "off",
"no-constant-condition": "off",
"no-await-in-loop": "off",
"react-native/no-inline-styles": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-interface": "off",
"react/jsx-props-no-spreading": "off",
"class-methods-use-this": "off",
"eslint-comments/no-unused-disable": "off",
"no-console": ["error", { "allow": ["info", "warn", "error"] }],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
},
"env": {
"es2020": true
}
},
{
"files": ["*.d.ts"],
"rules": {
"max-classes-per-file": "off",
"prettier/prettier": "off"
}
}
]
}
24 changes: 13 additions & 11 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,34 @@ node_modules/warning/.*
; Integration tests
.*/integration-tests/.*

; Example app
<PROJECT_ROOT>/example/.*

; Node modules errors
<PROJECT_ROOT>/node_modules/.*
!<PROJECT_ROOT>/node_modules/react-native/
<PROJECT_ROOT>/node_modules/react-native/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
node_modules/react-native/interface.js
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
flow/

[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.file_ext=.js
module.file_ext=.ts
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true
exact_by_default=true

module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
Expand All @@ -47,10 +55,6 @@ suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
Expand All @@ -60,8 +64,6 @@ nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error

[strict]
deprecated-type
Expand All @@ -73,4 +75,4 @@ untyped-import
untyped-type-import

[version]
^0.122.0
^0.203.1
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
47 changes: 0 additions & 47 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

90 changes: 90 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: 🐛 Bug report
description: Report a reproducible bug or regression in this library.
title: "🐛 "
labels: [bug]
body:
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
options:
- label: I checked the documentation and FAQ without finding a solution
required: true
- label: I checked to make sure that this issue has not already been filed
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: Please describe the behavior you are expecting
validations:
required: true
- type: textarea
id: current-behavior
attributes:
label: Current Behavior
description: What is the current behavior?
validations:
required: true

- type: input
id: library-version
attributes:
label: Library version
description: What version of the library are you using?
placeholder: "x.x.x"
validations:
required: true

- type: input
attributes:
label: Device
description: Which device are you seeing this Problem on? Mention the full name of the phone, as well as the operating system and version. If you have tested this on multiple devices (ex. Android and iOS) then mention all of those devices (comma separated)
placeholder: ex. iPhone 14 (iOS 16.6)
validations:
required: true

- type: textarea
id: react-native-info
attributes:
label: Environment info
description: Run `react-native info` in your terminal and paste the results here.
render: shell
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Please provide detailed steps for reproducing the issue keeping the code reproducing the bug as simple as possible, with the minimum amount of code required to reproduce the issue. See https://stackoverflow.com/help/mcve.
value: |
1. …
2. …
validations:
required: true

- type: textarea
id: reproducible-sample-code
attributes:
label: Formatted code sample or link to a repository
description: Please add minimal runnable repro as explained above so that the bug can be tested in isolation.
render: js
validations:
required: true

- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please provide any relevant log output from Xcode or Android Studio. This is important in case the issue is not reproducible except for under certain conditions. Both JS and platform logs can be enabled via [setLogLevel](https://dotintent.github.io/react-native-ble-plx/#blemanagersetloglevel) function call.
render: shell
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional information
description: Provide any additional information you think might be relevant to the issue.
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

Loading

0 comments on commit 3e25b12

Please sign in to comment.