Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumechervetaxa committed Nov 12, 2018
0 parents commit 041a3de
Show file tree
Hide file tree
Showing 1,244 changed files with 195,319 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": ["env", "stage-0", "react"],
"plugins": [
"babel-plugin-macros",
[
"transform-runtime",
{
"polyfill": false,
"regenerator": true
}
]
],
"env": {
"test": {
"plugins": ["require-context-hook"]
}
}
}
4 changes: 4 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exclude_paths:
- "examples/"
- "**/*.spec.js"
- "**/*.test.js"
4 changes: 4 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exclude_patterns:
- "examples/"
- "**/*.spec.js"
- "**/*.test.js"
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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
translate_tabs_to_spaces = true

[*.md]
trim_trailing_whitespace = false
15 changes: 15 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dist
build
coverage
node_modules
scripts
*.bundle.js
*.js.map
*.json
__mocks__

.remarkrc.js
.eslintrc.js
.eslintrc-markdown.js
.jest.config.js

36 changes: 36 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"extends": ["airbnb", "prettier", "prettier/react", "react-app"],
"plugins": ["react", "prettier"],
"rules": {
"linebreak-style": 0,
"import/no-extraneous-dependencies": "warn",
"import/no-unresolved": "warn",
"import/named": "warn",
"import/prefer-default-export": "off",
"jsx-a11y/aria-role": 1,
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/label-has-for": 1,
"jsx-a11y/no-autofocus": 1,
"jsx-a11y/no-noninteractive-element-interactions": 1,
"jsx-a11y/anchor-is-valid": 1,
"react/jsx-filename-extension": [
2,
{
"extensions": [".js", ".jsx"]
}
],
"react/forbid-prop-types": 0,
"react/jsx-closing-bracket-location": 0,
"react/no-multi-comp": 0,
"react/no-unused-prop-types": 1,
"react/prop-types": 0,
"react/no-unescaped-entities": 1,
"react/jsx-closing-tag-location": 0
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

.cache
.settings/
.vscode/
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/**/storybook-static/
/**/axa-static/
/**/dist/
/**/.toolkit/
jest-test-results.json
/packages/**/LICENSE
/storybook/**/LICENSE
/coverage
node_modules/
storybook/storybook/src/components
storybook/storybook/storybook-static/
storybook/toolkit/public

### OSX ###
*.DS_Store
.AppleDouble
.LSOverride
13 changes: 13 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
rules:
default:
protection:
required_pull_request_reviews:
required_approving_review_count: 1
required_status_checks:
contexts:
- Codacy/PR Quality Review
- codeclimate/diff-coverage
- continuous-integration/travis-ci
- codeclimate/total-coverage
- codeclimate
- WIP
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
1 change: 1 addition & 0 deletions .npmrc.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "es5",
"jsxBracketSameLine": true
}
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
branches:
only:
- master
sudo: required
dist: trusty
language: node_js
env:
- NPM_PUBLISH_VERSION=none
before_script:
- git config --global user.email "build-ci@axa.fr"
- git config --global user.name "Build-CI"
node_js:
- "8"
install:
- npm install
- npm run bootstrap
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- npm test -- --coverage
- npm run lint
- npm run storybook:build
deploy:
on:
all_branches: true
condition: $NPM_PUBLISH_VERSION =~ ^major|minor|patch|prerelease$
provider: script
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"
skip_cleanup: true
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

28 changes: 28 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all
people who contribute through reporting issues, posting feature requests,
updating documentation, submitting pull requests or patches, and other
activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual
language or imagery, derogatory comments or personal attacks, trolling, public
or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct. Project maintainers who do not
follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by opening an issue or contacting one or more of the project
maintainers.

This Code of Conduct is adapted from the
[Contributor Covenant](http://contributor-covenant.org), version 1.0.0,
available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
92 changes: 92 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Contributing to @axa-fr/react-toolkit

First, ensure you have the [latest `npm`](https://docs.npmjs.com/).

To get started with the repository:

```sh
git clone https://github.com/AxaGuilDEv/af-toolkit.git
cd af-toolkit
npm install
npm run bootstrap
```

## Commands

## How to run

Demo of how the component is used.

```sh
# [react] Develop with storybook
$ npm run storybook
# [react] Build the storybook website
$ npm run storybook:build

# [react] To edit component in live inside storybook, you have run js compilation in another bash process
$ npm run dev

# [css] Develop html/css
$ npm run css
# [css] Build the html/css website
$ npm run css:build
```

### Run Unit Tests

```sh
$ npm test

# watch for changes
$ npm test -- --watch

# For a specific file (e.g., in packages/context/__tests__/command.test.js)
$ npm test -- --watch packages/action
```

By default, `npm test` also runs the linter.
You can skip this by calling `jest` directly:

```sh
$ npx jest
$ npx jest --watch
$ npx jest --config jest.config.json
# etc
```

### Linting

```sh
$ npm run lint
```

It's also a good idea to hook up your editor to an eslint plugin.

To fix lint errors from the command line:

```sh
$ npm run lint -- --fix
```

### Coverage

If you would like to check test coverage, run the coverage script, then open
`coverage/lcov-report/index.html` in your favorite browser.

```sh
$ npm test -- --coverage

# OS X
$ open coverage/lcov-report/index.html

# Linux
$ xdg-open coverage/lcov-report/index.html
```

## Pull Request

Please respect the following [PULL_REQUEST_TEMPLATE.md](./PULL_REQUEST_TEMPLATE.md)

## Issue

Please respect the following [ISSUE_TEMPLATE.md](./ISSUE_TEMPLATE.md)
15 changes: 15 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Issue and Steps to Reproduce

<!-- Describe your issue and tell us how to reproduce it (include any useful information). -->

### Versions

### Screenshots

#### Expected

#### Actual

### Additional Details

- Installed packages:
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 AXA France Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

0 comments on commit 041a3de

Please sign in to comment.