Skip to content

Commit 041a3de

Browse files
first commit
0 parents  commit 041a3de

File tree

1,244 files changed

+195319
-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.

1,244 files changed

+195319
-0
lines changed

.babelrc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"presets": ["env", "stage-0", "react"],
3+
"plugins": [
4+
"babel-plugin-macros",
5+
[
6+
"transform-runtime",
7+
{
8+
"polyfill": false,
9+
"regenerator": true
10+
}
11+
]
12+
],
13+
"env": {
14+
"test": {
15+
"plugins": ["require-context-hook"]
16+
}
17+
}
18+
}

.codacy.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
exclude_paths:
2+
- "examples/"
3+
- "**/*.spec.js"
4+
- "**/*.test.js"

.codeclimate.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
exclude_patterns:
2+
- "examples/"
3+
- "**/*.spec.js"
4+
- "**/*.test.js"

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
indent_style = space
9+
indent_size = 2
10+
end_of_line = lf
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
translate_tabs_to_spaces = true
15+
16+
[*.md]
17+
trim_trailing_whitespace = false

.eslintignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
dist
2+
build
3+
coverage
4+
node_modules
5+
scripts
6+
*.bundle.js
7+
*.js.map
8+
*.json
9+
__mocks__
10+
11+
.remarkrc.js
12+
.eslintrc.js
13+
.eslintrc-markdown.js
14+
.jest.config.js
15+

.eslintrc

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"node": true,
5+
"es6": true,
6+
"jest": true
7+
},
8+
"extends": ["airbnb", "prettier", "prettier/react", "react-app"],
9+
"plugins": ["react", "prettier"],
10+
"rules": {
11+
"linebreak-style": 0,
12+
"import/no-extraneous-dependencies": "warn",
13+
"import/no-unresolved": "warn",
14+
"import/named": "warn",
15+
"import/prefer-default-export": "off",
16+
"jsx-a11y/aria-role": 1,
17+
"jsx-a11y/href-no-hash": "off",
18+
"jsx-a11y/label-has-for": 1,
19+
"jsx-a11y/no-autofocus": 1,
20+
"jsx-a11y/no-noninteractive-element-interactions": 1,
21+
"jsx-a11y/anchor-is-valid": 1,
22+
"react/jsx-filename-extension": [
23+
2,
24+
{
25+
"extensions": [".js", ".jsx"]
26+
}
27+
],
28+
"react/forbid-prop-types": 0,
29+
"react/jsx-closing-bracket-location": 0,
30+
"react/no-multi-comp": 0,
31+
"react/no-unused-prop-types": 1,
32+
"react/prop-types": 0,
33+
"react/no-unescaped-entities": 1,
34+
"react/jsx-closing-tag-location": 0
35+
}
36+
}

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
.cache
3+
.settings/
4+
.vscode/
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
/**/storybook-static/
11+
/**/axa-static/
12+
/**/dist/
13+
/**/.toolkit/
14+
jest-test-results.json
15+
/packages/**/LICENSE
16+
/storybook/**/LICENSE
17+
/coverage
18+
node_modules/
19+
storybook/storybook/src/components
20+
storybook/storybook/storybook-static/
21+
storybook/toolkit/public
22+
23+
### OSX ###
24+
*.DS_Store
25+
.AppleDouble
26+
.LSOverride

.mergify.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
rules:
2+
default:
3+
protection:
4+
required_pull_request_reviews:
5+
required_approving_review_count: 1
6+
required_status_checks:
7+
contexts:
8+
- Codacy/PR Quality Review
9+
- codeclimate/diff-coverage
10+
- continuous-integration/travis-ci
11+
- codeclimate/total-coverage
12+
- codeclimate
13+
- WIP

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org

.npmrc.template

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package.json

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5",
4+
"jsxBracketSameLine": true
5+
}

.travis.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
branches:
2+
only:
3+
- master
4+
sudo: required
5+
dist: trusty
6+
language: node_js
7+
env:
8+
- NPM_PUBLISH_VERSION=none
9+
before_script:
10+
- git config --global user.email "[email protected]"
11+
- git config --global user.name "Build-CI"
12+
node_js:
13+
- "8"
14+
install:
15+
- npm install
16+
- npm run bootstrap
17+
before_script:
18+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
19+
- chmod +x ./cc-test-reporter
20+
- ./cc-test-reporter before-build
21+
script:
22+
- npm test -- --coverage
23+
- npm run lint
24+
- npm run storybook:build
25+
deploy:
26+
on:
27+
all_branches: true
28+
condition: $NPM_PUBLISH_VERSION =~ ^major|minor|patch|prerelease$
29+
provider: script
30+
script: "git reset --hard && git remote set-url origin https://${GH_TOKEN}@github.com/AxaGuilDEv/react-toolkit.git && git checkout ${TRAVIS_BRANCH} && cp .npmrc.template $HOME/.npmrc && npm run publish -- ${NPM_PUBLISH_VERSION} --yes --concurrency 1 --force-publish"
31+
skip_cleanup: true
32+
after_script:
33+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
34+

CODE_OF_CONDUCT.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, we pledge to respect all
4+
people who contribute through reporting issues, posting feature requests,
5+
updating documentation, submitting pull requests or patches, and other
6+
activities.
7+
8+
We are committed to making participation in this project a harassment-free
9+
experience for everyone, regardless of level of experience, gender, gender
10+
identity and expression, sexual orientation, disability, personal appearance,
11+
body size, race, age, or religion.
12+
13+
Examples of unacceptable behavior by participants include the use of sexual
14+
language or imagery, derogatory comments or personal attacks, trolling, public
15+
or private harassment, insults, or other unprofessional conduct.
16+
17+
Project maintainers have the right and responsibility to remove, edit, or
18+
reject comments, commits, code, wiki edits, issues, and other contributions
19+
that are not aligned to this Code of Conduct. Project maintainers who do not
20+
follow the Code of Conduct may be removed from the project team.
21+
22+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
23+
reported by opening an issue or contacting one or more of the project
24+
maintainers.
25+
26+
This Code of Conduct is adapted from the
27+
[Contributor Covenant](http://contributor-covenant.org), version 1.0.0,
28+
available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)

CONTRIBUTING.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Contributing to @axa-fr/react-toolkit
2+
3+
First, ensure you have the [latest `npm`](https://docs.npmjs.com/).
4+
5+
To get started with the repository:
6+
7+
```sh
8+
git clone https://github.com/AxaGuilDEv/af-toolkit.git
9+
cd af-toolkit
10+
npm install
11+
npm run bootstrap
12+
```
13+
14+
## Commands
15+
16+
## How to run
17+
18+
Demo of how the component is used.
19+
20+
```sh
21+
# [react] Develop with storybook
22+
$ npm run storybook
23+
# [react] Build the storybook website
24+
$ npm run storybook:build
25+
26+
# [react] To edit component in live inside storybook, you have run js compilation in another bash process
27+
$ npm run dev
28+
29+
# [css] Develop html/css
30+
$ npm run css
31+
# [css] Build the html/css website
32+
$ npm run css:build
33+
```
34+
35+
### Run Unit Tests
36+
37+
```sh
38+
$ npm test
39+
40+
# watch for changes
41+
$ npm test -- --watch
42+
43+
# For a specific file (e.g., in packages/context/__tests__/command.test.js)
44+
$ npm test -- --watch packages/action
45+
```
46+
47+
By default, `npm test` also runs the linter.
48+
You can skip this by calling `jest` directly:
49+
50+
```sh
51+
$ npx jest
52+
$ npx jest --watch
53+
$ npx jest --config jest.config.json
54+
# etc
55+
```
56+
57+
### Linting
58+
59+
```sh
60+
$ npm run lint
61+
```
62+
63+
It's also a good idea to hook up your editor to an eslint plugin.
64+
65+
To fix lint errors from the command line:
66+
67+
```sh
68+
$ npm run lint -- --fix
69+
```
70+
71+
### Coverage
72+
73+
If you would like to check test coverage, run the coverage script, then open
74+
`coverage/lcov-report/index.html` in your favorite browser.
75+
76+
```sh
77+
$ npm test -- --coverage
78+
79+
# OS X
80+
$ open coverage/lcov-report/index.html
81+
82+
# Linux
83+
$ xdg-open coverage/lcov-report/index.html
84+
```
85+
86+
## Pull Request
87+
88+
Please respect the following [PULL_REQUEST_TEMPLATE.md](./PULL_REQUEST_TEMPLATE.md)
89+
90+
## Issue
91+
92+
Please respect the following [ISSUE_TEMPLATE.md](./ISSUE_TEMPLATE.md)

ISSUE_TEMPLATE.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Issue and Steps to Reproduce
2+
3+
<!-- Describe your issue and tell us how to reproduce it (include any useful information). -->
4+
5+
### Versions
6+
7+
### Screenshots
8+
9+
#### Expected
10+
11+
#### Actual
12+
13+
### Additional Details
14+
15+
- Installed packages:

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 AXA France Inc.
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
13+
all 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
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)