-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8d1518e
Showing
166 changed files
with
43,931 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"presets": ["env", "stage-0", "react"], | ||
"plugins": [ | ||
"babel-plugin-macros", | ||
[ | ||
"transform-runtime", | ||
{ | ||
"polyfill": false, | ||
"regenerator": true | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dist | ||
build | ||
coverage | ||
node_modules | ||
docs/public | ||
scripts | ||
*.bundle.js | ||
*.js.map | ||
examples | ||
__mocks__ | ||
|
||
.remarkrc.js | ||
.eslintrc.js | ||
.eslintrc-markdown.js | ||
.jest.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
const error = 2; | ||
const warn = 1; | ||
const ignore = 0; | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'airbnb', | ||
'plugin:jest/recommended', | ||
'plugin:import/react-native', | ||
'prettier', | ||
'prettier/react', | ||
], | ||
plugins: ['prettier', 'jest', 'import', 'react', 'jsx-a11y', 'json'], | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
ecmaVersion: 8, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
env: { | ||
es6: true, | ||
node: true, | ||
'jest/globals': true, | ||
}, | ||
settings: { | ||
'import/core-modules': ['enzyme'], | ||
'import/ignore': ['node_modules\\/(?!@af-react-oidc)'], | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.ts'], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
'prettier/prettier': [ | ||
warn, | ||
{ | ||
printWidth: 100, | ||
tabWidth: 2, | ||
bracketSpacing: true, | ||
trailingComma: 'es5', | ||
singleQuote: true, | ||
}, | ||
], | ||
'no-debugger': process.env.NODE_ENV === 'production' ? error : ignore, | ||
'class-methods-use-this': ignore, | ||
'linebreak-style': 0, | ||
'import/extensions': [ignore], | ||
'import/no-unresolved': [ignore], | ||
'import/no-extraneous-dependencies': [ignore], | ||
'import/prefer-default-export': ignore, | ||
'import/default': error, | ||
'import/named': error, | ||
'import/namespace': error, | ||
'react/jsx-filename-extension': [ | ||
warn, | ||
{ | ||
extensions: ['.js', '.jsx'], | ||
}, | ||
], | ||
'react/no-unescaped-entities': ignore, | ||
'jsx-a11y/label-has-for': [ | ||
error, | ||
{ | ||
required: { | ||
some: ['nesting', 'id'], | ||
}, | ||
}, | ||
], | ||
'jsx-a11y/anchor-is-valid': [ | ||
error, | ||
{ | ||
components: ['RoutedLink', 'MenuLink', 'LinkTo', 'Link'], | ||
specialLink: ['overrideParams', 'kind', 'story', 'to'], | ||
}, | ||
], | ||
'no-underscore-dangle': [ | ||
error, | ||
{ | ||
allow: ['__STORYBOOK_CLIENT_API__', '__STORYBOOK_ADDONS_CHANNEL__'], | ||
}, | ||
], | ||
'react/forbid-prop-types': [ignore], | ||
'no-underscore-dangle': [ignore], | ||
'react/prop-types': [warn], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lib-cov | ||
coverage | ||
node_modules/ | ||
jspm_packages/ | ||
.npm | ||
.eslintcache | ||
.yarn-integrity | ||
/node_modules | ||
/coverage | ||
/**/LICENSE | ||
dist | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registry=https://registry.npmjs.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
branches: | ||
only: | ||
- master | ||
sudo: required | ||
dist: trusty | ||
language: node_js | ||
node_js: | ||
- '8' | ||
install: | ||
- npm install | ||
- npm run bootstrap | ||
script: | ||
- npm test -- --coverage | ||
- npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Contributing to @axa-fr/react-oidc | ||
|
||
First, ensure you have the [latest `npm`](https://docs.npmjs.com/). | ||
|
||
To get started with the repository: | ||
|
||
```sh | ||
git clone https://github.com/AxaGuilDEv/react-oidc.git | ||
cd react-oidc | ||
npm install | ||
npm run bootstrap | ||
``` | ||
|
||
## Commands | ||
|
||
## How to run examples | ||
|
||
Demo of how the component is used. | ||
|
||
```sh | ||
# Demo using redux as state management | ||
$ npm run example:redux | ||
|
||
# Demo using new react context as state management | ||
$ npm run example:context | ||
``` | ||
|
||
### 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/context | ||
``` | ||
|
||
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.js | ||
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## A picture tells a thousand words | ||
|
||
## Before this PR | ||
|
||
## After this PR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = 'test-file-stub'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Sample Application | ||
|
||
This is a @axa-fr/react-oidc-context sample application |
Oops, something went wrong.