-
-
Notifications
You must be signed in to change notification settings - Fork 0
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 c2913c2
Showing
33 changed files
with
893 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,4 @@ | ||
.git | ||
coverage/ | ||
node_modules/ | ||
var/ |
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,109 @@ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
browser: false | ||
}, | ||
extends: [ | ||
'@passport-next/eslint-config-passport-next/sauron-node.js', | ||
// Override ash-nazg's current preference for ESM | ||
'plugin:node/recommended-script' | ||
], | ||
overrides: [ | ||
{ | ||
files: ['test/**'], | ||
env: { | ||
// jest: true, | ||
mocha: true | ||
}, | ||
globals: { | ||
expect: 'readonly' | ||
}, | ||
rules: { | ||
'jsdoc/require-jsdoc': 'off' | ||
// 'jest/no-disabled-tests': [2], | ||
// 'jest/no-focused-tests': [2], | ||
// 'jest/no-identical-title': [2], | ||
// 'jest/prefer-to-have-length': [2], | ||
// 'jest/valid-expect': [2], | ||
} | ||
}, | ||
{ | ||
files: ['**/*.md'], | ||
rules: { | ||
'eol-last': 'off', | ||
'no-console': 'off', | ||
'no-undef': 'off', | ||
'no-unused-vars': 'warn', | ||
'padded-blocks': 'off', | ||
'import/unambiguous': 'off', | ||
'import/no-unresolved': 'off', | ||
'node/no-missing-import': 'off', | ||
'node/no-missing-require': 'off', | ||
'func-names': 'off', | ||
'import/newline-after-import': 'off', | ||
strict: 'off', | ||
// Disable until eslint-plugin-jsdoc may fix: https://github.com/gajus/eslint-plugin-jsdoc/issues/211 | ||
indent: 'off' | ||
} | ||
} | ||
], | ||
globals: { | ||
// By some ESLint bug, config overrides not working with globals | ||
require: 'readonly', | ||
module: 'readonly', | ||
exports: 'writable' | ||
}, | ||
plugins: [ | ||
// 'jest' | ||
], | ||
rules: { | ||
'comma-dangle': 2, | ||
'no-underscore-dangle': 0, | ||
'no-param-reassign': 0, | ||
|
||
// Disable until implementing promises and Node version supporting | ||
'promise/prefer-await-to-callbacks': 0, | ||
'promise/prefer-await-to-then': 0, | ||
|
||
// Disable until ready to tackle | ||
'require-jsdoc': 0, | ||
|
||
// Disable current preferences of ash-nazg | ||
'import/no-commonjs': 0, | ||
'node/exports-style': 0, | ||
|
||
// add back different or stricter rules from airbnb | ||
'object-curly-spacing': ['error', 'always'], | ||
'func-names': 'warn', | ||
'max-len': ['error', 100, 2, { | ||
ignoreUrls: true, | ||
ignoreComments: false, | ||
ignoreRegExpLiterals: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true, | ||
}], | ||
'space-before-function-paren': ['error', { | ||
anonymous: 'always', | ||
named: 'never', | ||
asyncArrow: 'always' | ||
}], | ||
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }], | ||
'arrow-parens': ['error', 'as-needed', { | ||
requireForBlockBody: true, | ||
}], | ||
'no-empty-function': ['error', { | ||
allow: [ | ||
'arrowFunctions', | ||
'functions', | ||
'methods', | ||
] | ||
}], | ||
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }], | ||
'no-multi-assign': ['error'], | ||
'no-unused-expressions': ['error', { | ||
allowShortCircuit: false, | ||
allowTernary: false, | ||
allowTaggedTemplates: false, | ||
}] | ||
} | ||
}; |
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,42 @@ | ||
--- | ||
name: Bug Report | ||
about: Report a bug | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
--- | ||
|
||
# READ THIS FIRST! | ||
|
||
#### Is this a security issue? | ||
|
||
If you discover a security issue please create an issue stating you've discovered a security | ||
issue but don't divulge the issue, one of the maintainers will respond with an email address | ||
you can send the details to. Once the issue has been patched the details can be made public. | ||
|
||
<!-- Provide a brief summary of the issue in the title field above. --> | ||
|
||
<!-- Provide a detailed description of your use case, including as much --> | ||
<!-- detail as possible about what you are trying to accomplish and why. --> | ||
|
||
### Expected behavior | ||
<!-- Provide a detailed description of how you expected the software to --> | ||
<!-- behave. --> | ||
|
||
### Actual behavior | ||
<!-- Provide a detailed description of how the software actually behaved, --> | ||
<!-- including any rationale for why that behavior is incorrect. --> | ||
|
||
### Steps to reproduce | ||
<!-- Provide an unambiguous series of steps that can be used to reproduce --> | ||
<!-- this issue, including any code if applicable. --> | ||
|
||
```js | ||
// Format code using Markdown code blocks | ||
``` | ||
|
||
### Environment | ||
|
||
* Operating System: | ||
* Node version: <!-- $ node -v --> | ||
* passport version: <!-- $ npm list @passport-next/passport --> |
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,26 @@ | ||
--- | ||
name: Feature Request | ||
about: Report a new feature | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
--- | ||
|
||
# READ THIS FIRST! | ||
|
||
#### Is this a security issue? | ||
|
||
If you discover a security issue please create an issue stating you've discovered a security | ||
issue but don't divulge the issue, one of the maintainers will respond with an email address | ||
you can send the details to. Once the issue has been patched the details can be made public. | ||
|
||
<!-- Provide a brief summary of the feature in the title field above. --> | ||
|
||
<!-- Provide a detailed description of your use case, including as much --> | ||
<!-- detail as possible about what you are trying to accomplish and why. --> | ||
|
||
### Environment | ||
|
||
* Operating System: | ||
* Node version: <!-- $ node -v --> | ||
* passport version: <!-- $ npm list @passport-next/passport --> |
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,27 @@ | ||
# READ THIS FIRST! | ||
|
||
#### Is this a security patch? | ||
|
||
If you discover a security issue please create an issue stating you've discovered a security | ||
issue but don't divulge the issue, one of the maintainers will respond with an email address | ||
you can send the details to. Once the issue has been patched the details can be made public. | ||
|
||
<!-- Provide a brief summary of the request in the title field above. --> | ||
|
||
<!-- Provide a detailed description of your use case, including as much --> | ||
<!-- detail as possible about what you are trying to accomplish and why. --> | ||
<!-- If this patch closes an open issue, include a reference to the issue --> | ||
<!-- number. --> | ||
|
||
### Checklist | ||
|
||
<!-- Place an `x` in the boxes that apply. If you are unsure, please ask and --> | ||
<!-- we will help. --> | ||
|
||
- [ ] I have read the [CONTRIBUTING](https://github.com/passport-next/skel/blob/master/CONTRIBUTING.md) guidelines. | ||
- [ ] I have updated the UNRELEASED section of the [CHANGELOG](https://github.com/passport-next/skel/blob/master/CHANGELOG.md). | ||
- [ ] I have added myself to the contributors section of package.json if I wish to be listed | ||
- [ ] I have added test cases which verify the correct operation of this feature or patch. | ||
- [ ] I have added documentation pertaining to this feature or patch. | ||
- [ ] The automated test suite (`$ npm test`) executes successfully. | ||
- [ ] The automated code linting (`$ npm run-script lint`) executes successfully. |
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,12 @@ | ||
reports/ | ||
|
||
|
||
package-lock.json | ||
|
||
|
||
# Mac OS X | ||
.DS_Store | ||
|
||
# Node.js | ||
node_modules | ||
npm-debug.log |
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,31 @@ | ||
dependency_scanning: | ||
image: docker:stable | ||
variables: | ||
DOCKER_DRIVER: overlay2 | ||
services: | ||
- docker:stable-dind | ||
script: | ||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') | ||
- docker run | ||
--env DEP_SCAN_DISABLE_REMOTE_CHECKS="${DEP_SCAN_DISABLE_REMOTE_CHECKS:-false}" | ||
--volume "$PWD:/code" | ||
--volume /var/run/docker.sock:/var/run/docker.sock | ||
"registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$SP_VERSION" /code | ||
artifacts: | ||
paths: [gl-dependency-scanning-report.json] | ||
|
||
sast: | ||
image: docker:stable | ||
variables: | ||
DOCKER_DRIVER: overlay2 | ||
services: | ||
- docker:stable-dind | ||
script: | ||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') | ||
- docker run | ||
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" | ||
--volume "$PWD:/code" | ||
--volume /var/run/docker.sock:/var/run/docker.sock | ||
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code | ||
artifacts: | ||
paths: [gl-sast-report.json] |
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 @@ | ||
[submodule "eslint-config-passport-next"] | ||
path = eslint-config-passport-next | ||
url = ../eslint-config-passport-next/ |
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,10 @@ | ||
CONTRIBUTING.md | ||
Makefile | ||
examples/ | ||
reports/ | ||
test/ | ||
.github/ | ||
.travis.yml | ||
.gitlab-ci.yml | ||
.eslintrc.js | ||
.eslintignore |
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,18 @@ | ||
language: "node_js" | ||
node_js: | ||
- "8" | ||
- "10" | ||
- "12" | ||
|
||
before_install: | ||
- "npm install [email protected] -g" | ||
- "preinstall-compat" | ||
|
||
script: | ||
- "make test-cov" | ||
- "npm run-script lint" | ||
|
||
after_success: | ||
- "make report-cov" | ||
|
||
sudo: false |
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,7 @@ | ||
This changelog follows Semantic Versioning https://semver.org/ | ||
|
||
# 1.0.0 (2019-06-15) | ||
|
||
### Major | ||
|
||
Initial release @rwky |
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,54 @@ | ||
## Contributing | ||
|
||
Pull Requests are welcome for any issues, if you have any questions please | ||
[raise an issue](https://github.com/passport-next/skel/issues). | ||
|
||
If you discover a security issue please create an issue stating you've discovered a security | ||
issue but don't divulge the issue, one of the maintainers will respond with an email address | ||
you can send the details to. Once the issue has been patched the details can be made public. | ||
|
||
If you wish to join the team please raise an issue and one of the maintainers will assess your | ||
request. | ||
|
||
## Tests | ||
|
||
The test suite is located in the `test/` directory. All new features are | ||
expected to have corresponding test cases with complete code coverage. Patches | ||
that increase test coverage are happily accepted. | ||
|
||
Ensure that the test suite passes by executing: | ||
|
||
```bash | ||
$ npm test | ||
``` | ||
|
||
Ensure that lint passes | ||
```bash | ||
$ npm run-script lint | ||
``` | ||
|
||
Some lint errors can be fixed with | ||
|
||
```bash | ||
npm run-script lintfix | ||
``` | ||
|
||
Coverage reports can be generated and viewed by executing: | ||
|
||
```bash | ||
npm run-script test-cov | ||
npm run-script view-cov | ||
``` | ||
|
||
Templates such as README.md can be updated via | ||
|
||
```bash | ||
npm run-script templates | ||
``` | ||
|
||
If you are starting a new project run | ||
|
||
```bash | ||
npm run-script init-new-project | ||
``` | ||
**WARNING** This will overwrite files which are listed in the `ignoreExisting` array of `templates/variables.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,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019 Rowan Wookey <[email protected]> | ||
|
||
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. |
Oops, something went wrong.