Skip to content

Commit 07299fd

Browse files
authored
Implement haptic-feedback package (#1)
* Initial commit * Implement `HapticFeedback` package * Remove test target * Update `README.md` * Update `CHANGELOG.md` * Add `Gemfile.lock` * Update `ci.yml` * Add a build phase to `ci.yml`
1 parent 305a02a commit 07299fd

File tree

19 files changed

+611
-1
lines changed

19 files changed

+611
-1
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: "🐛 Bug Report"
3+
about: Report a reproducible bug or regression.
4+
title: 'Bug: '
5+
labels: 'bug'
6+
7+
---
8+
9+
<!--
10+
Please provide a clear and concise description of what the bug is. Include
11+
screenshots if needed. Please test using the latest version of the relevant
12+
React packages to make sure your issue has not already been fixed.
13+
-->
14+
15+
Application version:
16+
17+
## Steps To Reproduce
18+
19+
1.
20+
2.
21+
22+
<!--
23+
Your bug will get fixed much faster if we can run your code and it doesn't
24+
have dependencies other than React. Issues without reproduction steps or
25+
code examples may be immediately closed as not actionable.
26+
-->
27+
28+
Link to code example:
29+
30+
<!--
31+
Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a
32+
repository on GitHub, or provide a minimal code example that reproduces the
33+
problem. You may provide a screenshot of the application if you think it is
34+
relevant to your bug report. Here are some tips for providing a minimal
35+
example: https://stackoverflow.com/help/mcve.
36+
-->
37+
38+
## The current behavior
39+
40+
41+
## The expected behavior
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: 🛠 Feature request
3+
about: If you have a feature request for the haptic-feedback, file it here.
4+
labels: 'type: enhancement'
5+
---
6+
7+
**Feature description**
8+
Clearly and concisely describe the feature.
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Bug description
2+
Clearly and concisely describe the problem.
3+
4+
## Solution description
5+
Describe your code changes in detail for reviewers. Explain the technical solution you have provided and how it fixes the issue case.
6+
7+
## Covered unit test cases
8+
- [x] yes
9+
- [x] no
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Feature description
2+
Clearly and concisely describe the feature.
3+
4+
## Solution description
5+
Describe your code changes in detail for reviewers.
6+
7+
## Areas affected and ensured
8+
List out the areas affected by your code changes.
9+
10+
## Covered unit test cases
11+
- [x] yes
12+
- [x] no

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "haptic-feedback"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
paths:
10+
- '.swiftlint.yml'
11+
- ".github/workflows/**"
12+
- "Package.swift"
13+
- "Source/**"
14+
- "Tests/**"
15+
16+
jobs:
17+
SwiftLint:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: GitHub Action for SwiftLint
22+
uses: norio-nomura/action-swiftlint@3.2.1
23+
with:
24+
args: --strict
25+
env:
26+
DIFF_BASE: ${{ github.base_ref }}
27+
Latest:
28+
name: Test Latest (iOS)
29+
runs-on: macOS-12
30+
env:
31+
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
32+
timeout-minutes: 10
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
include:
37+
- destination: "OS=16.1,name=iPhone 14 Pro"
38+
name: "iOS"
39+
scheme: "HapticFeedback"
40+
steps:
41+
- uses: actions/checkout@v3
42+
- name: ${{ matrix.name }}
43+
run: xcodebuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean
44+

.github/workflows/danger.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Danger
2+
3+
on:
4+
pull_request:
5+
types: [synchronize, opened, reopened, labeled, unlabeled, edited]
6+
7+
env:
8+
LC_CTYPE: en_US.UTF-8
9+
LANG: en_US.UTF-8
10+
11+
jobs:
12+
run-danger:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: ruby setup
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: 2.7
19+
bundler-cache: true
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
- name: Setup gems
23+
run: |
24+
gem install bundler
25+
bundle install --clean --path vendor/bundle
26+
- name: danger
27+
env:
28+
29+
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
30+
31+
run: bundle exec danger --verbose

.swiftformat

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Stream rules
2+
3+
--swiftversion 5.3
4+
5+
# Use 'swiftformat --options' to list all of the possible options
6+
7+
--header "\nhaptic-feedback\nCopyright © {created.year} Space Code. All rights reserved.\n//"
8+
9+
--enable blankLinesBetweenScopes
10+
--enable blankLinesAtStartOfScope
11+
--enable blankLinesAtEndOfScope
12+
--enable blankLinesAroundMark
13+
--enable anyObjectProtocol
14+
--enable consecutiveBlankLines
15+
--enable consecutiveSpaces
16+
--enable duplicateImports
17+
--enable elseOnSameLine
18+
--enable emptyBraces
19+
--enable initCoderUnavailable
20+
--enable leadingDelimiters
21+
--enable numberFormatting
22+
--enable preferKeyPath
23+
--enable redundantBreak
24+
--enable redundantExtensionACL
25+
--enable redundantFileprivate
26+
--enable redundantGet
27+
--enable redundantInit
28+
--enable redundantLet
29+
--enable redundantLetError
30+
--enable redundantNilInit
31+
--enable redundantObjc
32+
--enable redundantParens
33+
--enable redundantPattern
34+
--enable redundantRawValues
35+
--enable redundantReturn
36+
--enable redundantSelf
37+
--enable redundantVoidReturnType
38+
--enable semicolons
39+
--enable sortImports
40+
--enable sortSwitchCases
41+
--enable spaceAroundBraces
42+
--enable spaceAroundBrackets
43+
--enable spaceAroundComments
44+
--enable spaceAroundGenerics
45+
--enable spaceAroundOperators
46+
--enable spaceInsideBraces
47+
--enable spaceInsideBrackets
48+
--enable spaceInsideComments
49+
--enable spaceInsideGenerics
50+
--enable spaceInsideParens
51+
--enable strongOutlets
52+
--enable strongifiedSelf
53+
--enable todos
54+
--enable trailingClosures
55+
--enable unusedArguments
56+
--enable void
57+
--enable markTypes
58+
--enable isEmpty
59+
60+
# format options
61+
62+
--wraparguments before-first
63+
--wrapcollections before-first
64+
--maxwidth 140

.swiftlint.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
excluded:
2+
- Tests
3+
- Package.swift
4+
- .build
5+
6+
# Rules
7+
8+
disabled_rules:
9+
- trailing_comma
10+
- todo
11+
- opening_brace
12+
13+
opt_in_rules: # some rules are only opt-in
14+
- anyobject_protocol
15+
- array_init
16+
- attributes
17+
- closure_body_length
18+
- closure_end_indentation
19+
- closure_spacing
20+
- collection_alignment
21+
- conditional_returns_on_newline
22+
- contains_over_filter_count
23+
- contains_over_filter_is_empty
24+
- contains_over_first_not_nil
25+
- contains_over_range_nil_comparison
26+
- convenience_type
27+
- discouraged_object_literal
28+
- discouraged_optional_boolean
29+
- empty_collection_literal
30+
- empty_count
31+
- empty_string
32+
- empty_xctest_method
33+
- enum_case_associated_values_count
34+
- explicit_init
35+
- fallthrough
36+
- fatal_error_message
37+
- file_name
38+
- file_types_order
39+
- first_where
40+
- flatmap_over_map_reduce
41+
- force_unwrapping
42+
- ibinspectable_in_extension
43+
- identical_operands
44+
- implicit_return
45+
- inert_defer
46+
- joined_default_parameter
47+
- last_where
48+
- legacy_multiple
49+
- legacy_random
50+
- literal_expression_end_indentation
51+
- lower_acl_than_parent
52+
- multiline_arguments
53+
- multiline_function_chains
54+
- multiline_literal_brackets
55+
- multiline_parameters
56+
- multiline_parameters_brackets
57+
- no_space_in_method_call
58+
- operator_usage_whitespace
59+
- optional_enum_case_matching
60+
- orphaned_doc_comment
61+
- overridden_super_call
62+
- override_in_extension
63+
- pattern_matching_keywords
64+
- prefer_self_type_over_type_of_self
65+
- prefer_zero_over_explicit_init
66+
- prefixed_toplevel_constant
67+
- private_action
68+
- prohibited_super_call
69+
- quick_discouraged_call
70+
- quick_discouraged_focused_test
71+
- quick_discouraged_pending_test
72+
- reduce_into
73+
- redundant_nil_coalescing
74+
- redundant_objc_attribute
75+
- redundant_type_annotation
76+
- required_enum_case
77+
- single_test_class
78+
- sorted_first_last
79+
- sorted_imports
80+
- static_operator
81+
- strict_fileprivate
82+
- switch_case_on_newline
83+
- toggle_bool
84+
- unavailable_function
85+
- unneeded_parentheses_in_closure_argument
86+
- unowned_variable_capture
87+
- untyped_error_in_catch
88+
- vertical_parameter_alignment_on_call
89+
- vertical_whitespace_closing_braces
90+
- vertical_whitespace_opening_braces
91+
- xct_specific_matcher
92+
- yoda_condition
93+
94+
force_cast: warning
95+
force_try: warning
96+
97+
identifier_name:
98+
excluded:
99+
- id
100+
- URL
101+
102+
analyzer_rules:
103+
- unused_import
104+
- unused_declaration
105+
106+
line_length:
107+
warning: 130
108+
error: 200
109+
110+
type_body_length:
111+
warning: 300
112+
error: 400
113+
114+
file_length:
115+
warning: 500
116+
error: 1200
117+
118+
function_body_length:
119+
warning: 30
120+
error: 50
121+
122+
large_tuple:
123+
error: 3
124+
125+
nesting:
126+
type_level:
127+
warning: 2
128+
statement_level:
129+
warning: 10
130+
131+
132+
type_name:
133+
max_length:
134+
warning: 40
135+
error: 50

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
#### 1.x Releases
5+
- `1.0.x` Releases - [1.0.0](#100)
6+
7+
## [1.0.0](https://github.com/space-code/haptic-feedback/releases/tag/1.0.0)
8+
Released on 2023-11-26.
9+
10+
#### Added
11+
- Initial release of `haptic-feedback`.
12+
- Added by [Nikita Vasilev](https://github.com/nik3212).

Dangerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
danger.import_dangerfile(github: 'space-code/dangerfile')

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://rubygems.org"
2+
3+
gem 'danger'

0 commit comments

Comments
 (0)