Skip to content

Commit 61980b5

Browse files
author
Sofia da Cruz Teixeira
committed
feat: Create package react-carousel
0 parents  commit 61980b5

File tree

86 files changed

+17051
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+17051
-0
lines changed

Diff for: .editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[package.json]
15+
indent_size = 2

Diff for: .eslintrc

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es6": true,
6+
"jest": true,
7+
"node": true
8+
},
9+
"extends": [
10+
"eslint:recommended",
11+
"plugin:prettier/recommended",
12+
"plugin:react/recommended",
13+
"plugin:react-hooks/recommended",
14+
"prettier/react"
15+
],
16+
"parser": "babel-eslint",
17+
"parserOptions": { "sourceType": "module" },
18+
"plugins": ["babel", "sort-imports-es6-autofix", "prettier"],
19+
"settings": {
20+
"react": { "version": "detect" }
21+
},
22+
"rules": {
23+
"prettier/prettier": [
24+
"error",
25+
{ "singleQuote": true, "trailingComma": "es5", "tabWidth": 4, "endOfLine":"auto" },
26+
{ "usePrettierrc": false }
27+
],
28+
"sort-imports-es6-autofix/sort-imports-es6": [
29+
2,
30+
{
31+
"ignoreCase": false,
32+
"ignoreMemberSort": false,
33+
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
34+
}
35+
],
36+
"no-unused-vars": [2, { "ignoreRestSiblings": true }],
37+
"no-console": 1,
38+
"react/sort-comp": [
39+
1,
40+
{
41+
"order": [
42+
"static-methods",
43+
"lifecycle",
44+
"render",
45+
"/^render.+$/",
46+
"everything-else",
47+
"/^on.+$/",
48+
"/^_.+$/"
49+
]
50+
}
51+
],
52+
"react/forbid-prop-types": [
53+
1,
54+
{
55+
"forbid": ["any", "array", "object"]
56+
}
57+
],
58+
"no-duplicate-imports": 1
59+
}
60+
}

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# PR Details
2+
3+
<!--- Provide a general summary of your changes in the Title above -->
4+
5+
## Description
6+
7+
<!--- Describe your changes in detail -->
8+
9+
## Related Issue
10+
11+
<!--- This project only accepts pull requests related to open issues -->
12+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
13+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
14+
<!--- Please link to the issue here: -->
15+
16+
## Motivation and Context
17+
18+
<!--- Why is this change required? What problem does it solve? -->
19+
20+
## How Has This Been Tested
21+
22+
<!--- Please describe in detail how you tested your changes. -->
23+
<!--- Include details of your testing environment, and the tests you ran to -->
24+
<!--- see how your change affects other areas of the code, etc. -->
25+
26+
## Types of changes
27+
28+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
29+
30+
- [ ] Docs change / refactoring / dependency upgrade
31+
- [ ] Chore (workflows / linting / tooling)
32+
- [ ] Bug fix (non-breaking change which fixes an issue)
33+
- [ ] New feature (non-breaking change which adds functionality)
34+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
35+
36+
## Checklist
37+
38+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
39+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
40+
41+
- [ ] My code follows the code style of this project.
42+
- [ ] My change requires a change to the documentation.
43+
- [ ] I have updated the documentation accordingly.
44+
- [ ] I have read the [CONTRIBUTING](../docs/CONTRIBUTING.md) document.
45+
- [ ] I have added tests to cover my changes.
46+
- [ ] All new and existing tests passed.
47+
48+
### Disclaimer
49+
50+
By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our [Contributor Ownership Statement](https://github.com/Farfetch/.github/blob/master/COS.md)

Diff for: .github/workflows/pull-request.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
load-modules:
10+
name: Load and Cache Dependencies
11+
runs-on: ubuntu-18.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Load Modules
16+
uses: actions/cache@v2
17+
with:
18+
path: "**/node_modules"
19+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
20+
- name: Verify Dependencies
21+
run: yarn
22+
if: steps.cache.outputs.cache-hit != 'true'
23+
24+
lint:
25+
name: Lint Branch
26+
needs: [load-modules]
27+
runs-on: ubuntu-18.04
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v2
31+
- name: Unshallow
32+
run: git fetch --unshallow
33+
- name: Restore Modules
34+
id: cache
35+
uses: actions/cache@v2
36+
with:
37+
path: "**/node_modules"
38+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
39+
- name: Lint Code
40+
run: yarn lint
41+
- name: Lint Commit
42+
run: npx commitlint --from=${{github.event.pull_request.base.sha}}
43+
44+
test:
45+
name: Test Branch
46+
needs: [load-modules]
47+
runs-on: ubuntu-18.04
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v2
51+
- name: Restore Modules
52+
uses: actions/cache@v2
53+
with:
54+
path: "**/node_modules"
55+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
56+
- name: Test
57+
run: yarn test
58+
59+
build:
60+
name: Build Branch
61+
needs: [load-modules]
62+
runs-on: ubuntu-18.04
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v2
66+
- name: Restore Modules
67+
id: cache
68+
uses: actions/cache@v2
69+
with:
70+
path: "**/node_modules"
71+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
72+
- name: Build
73+
run: yarn build

Diff for: .github/workflows/release.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish react-carousel
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v1
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
- name: Install dependencies
19+
run: yarn install
20+
- name: Build
21+
run: yarn build
22+
- name: Release
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GB_WRITE_TOKEN_MANUAL }}
25+
run: npx semantic-release

Diff for: .gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
node_modules/
2+
*.log
3+
coverage/
4+
5+
packages/*/es/
6+
packages/*/lib/
7+
packages/*/coverage/
8+
9+
.DS_Store
10+
.idea
11+
.vscode/
12+
package-lock.json
13+
.vs/
14+
/es/
15+
/lib/

Diff for: .releaserc

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"branches": ["master"],
3+
"plugins": [
4+
["@semantic-release/commit-analyzer", {
5+
"preset": "conventionalcommits",
6+
"releaseRules": [
7+
{"type": "chore", "release": "patch"}
8+
]
9+
}],
10+
["@semantic-release/release-notes-generator", {
11+
"preset": "conventionalcommits",
12+
}],
13+
["@semantic-release/changelog", {
14+
"changelogFile": "docs/CHANGELOG.md",
15+
}],
16+
"@semantic-release/npm",
17+
["@semantic-release/git", {
18+
"assets": ["docs", "yarn.lock", "package.json"],
19+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
20+
}],
21+
"@semantic-release/github"
22+
]
23+
}

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 FARFETCH
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)