-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from cgalvarez/dev
Improve CI, docs, coverage, publishing, quality
- Loading branch information
Showing
30 changed files
with
1,316 additions
and
433 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"ignore": [ | ||
"**/node_modules/**", | ||
".reports/**" | ||
"coverage/**" | ||
], | ||
"test": [ | ||
"test/**" | ||
|
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,46 @@ | ||
--- | ||
# CodeClimate config file configuration: https://docs.codeclimate.com/docs/advanced-configuration | ||
version: "2" | ||
plugins: | ||
duplication: | ||
enabled: true | ||
# ESLint: https://docs.codeclimate.com/docs/eslint | ||
eslint: | ||
enabled: true | ||
channel: "eslint-4" | ||
checks: | ||
complexity: | ||
enabled: true | ||
config: | ||
config: .eslintrc.cc.yaml | ||
extensions: | ||
- .es6 | ||
- .js | ||
fixme: | ||
enabled: true | ||
# How to configure: https://docs.codeclimate.com/docs/git-legal | ||
git-legal: | ||
enabled: false | ||
markdownlint: | ||
enabled: true | ||
exclude_fingerprints: | ||
# Unavoidable lengthy lines. | ||
- 184efb4b1212345dcbe0bf36064230f4 | ||
- c03f7976bb3e27eb1e08b08d0475a15b | ||
# Trailing question mark in heading. | ||
- 299b8b7c47d3644f029ad29866c9e5b0 | ||
# Requires a `shrinkwrap.json` at the project root to work! | ||
# So we'll rely on the cloud check by NodeSecurity.io. | ||
nodesecurity: | ||
enabled: false | ||
structure: | ||
enabled: true | ||
exclude_patterns: | ||
- ".git/**/*" | ||
- ".nyc_output/**/*" | ||
- ".reports/**/*" | ||
- "coverage/**/*" | ||
- "node_modules/**/*" | ||
# `eslint` when exec by CodeClimate doesn't use the specific config | ||
# file at `test/.eslintrc.yaml`, that's why we exclude it here. | ||
- "test/**/*" |
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 @@ | ||
# Unignore hidden files/folders (need to be explicitly passed as args). | ||
# See https://github.com/eslint/eslint/pull/6844#issuecomment-239597082 | ||
!.* | ||
|
||
# Skip these ones. | ||
.git/**/* | ||
.reports/**/* | ||
coverage/**/* | ||
node_modules/**/* | ||
test/fake/**/* |
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,55 @@ | ||
--- | ||
root: true | ||
plugins: | ||
- lodash | ||
- mocha | ||
- node | ||
- security | ||
extends: | ||
- airbnb-base | ||
- plugin:lodash/canonical | ||
env: | ||
node: true | ||
browser: true | ||
shared-node-browser: true | ||
rules: | ||
global-require: off | ||
# Rules of plugin `lodash` ~> disable most of lodash preference over native rules. | ||
lodash/prefer-constant: error | ||
lodash/prefer-get: off | ||
lodash/prefer-includes: off | ||
lodash/prefer-is-nil: error | ||
lodash/prefer-lodash-chain: off | ||
lodash/prefer-lodash-method: off | ||
lodash/prefer-lodash-typecheck: error | ||
lodash/prefer-matches: off | ||
lodash/prefer-noop: error | ||
lodash/prefer-over-quantifier: off | ||
lodash/prefer-some: off | ||
lodash/prefer-startswith: off | ||
lodash/prefer-times: off | ||
overrides: | ||
- files: | ||
- test/**/*.js | ||
rules: | ||
no-unused-expressions: off | ||
# Rules of plugin `node` ~> no test file is meant to be published! | ||
node/no-unpublished-require: off | ||
# Rules of plugin `mocha` | ||
mocha/handle-done-callback: error | ||
mocha/max-top-level-suites: error | ||
mocha/no-exclusive-tests: error | ||
mocha/no-global-tests: error | ||
mocha/no-hooks: off | ||
mocha/no-hooks-for-single-case: error | ||
mocha/no-identical-title: error | ||
mocha/no-mocha-arrows: off | ||
mocha/no-nested-tests: error | ||
mocha/no-pending-tests: error | ||
mocha/no-return-and-callback: error | ||
mocha/no-sibling-hooks: error | ||
mocha/no-skipped-tests: error | ||
mocha/no-synchronous-tests: off | ||
mocha/no-top-level-hooks: error | ||
mocha/valid-suite-description: error | ||
mocha/valid-test-description: error |
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 |
---|---|---|
@@ -1,8 +1,89 @@ | ||
--- | ||
extends: airbnb-base | ||
root: true | ||
plugins: | ||
- filenames | ||
- json | ||
- lodash | ||
- node | ||
- security | ||
- smells | ||
- you-dont-need-lodash-underscore | ||
extends: | ||
- airbnb-base | ||
- plugin:lodash/canonical | ||
- plugin:node/recommended | ||
- plugin:security/recommended | ||
- plugin:you-dont-need-lodash-underscore/compatible | ||
env: | ||
node: true | ||
browser: true | ||
shared-node-browser: true | ||
rules: | ||
global-require: off | ||
# Rules of plugin `filenames`. | ||
filenames/match-regex: error | ||
filenames/match-exported: | ||
- error | ||
- kebab | ||
filenames/no-index: off | ||
# Rules of plugin `lodash` ~> disable most of lodash preference over native rules. | ||
lodash/prefer-constant: error | ||
lodash/prefer-get: off | ||
lodash/prefer-includes: off | ||
lodash/prefer-is-nil: error | ||
lodash/prefer-lodash-chain: off | ||
lodash/prefer-lodash-method: off | ||
lodash/prefer-lodash-typecheck: error | ||
lodash/prefer-matches: off | ||
lodash/prefer-noop: error | ||
lodash/prefer-over-quantifier: off | ||
lodash/prefer-some: off | ||
lodash/prefer-startswith: off | ||
lodash/prefer-times: off | ||
# Rules of plugin `security`. | ||
# See https://github.com/nodesecurity/eslint-plugin-security for rules description. | ||
# Rules of plugin `smells`. | ||
smells/no-switch: off | ||
smells/no-complex-switch-case: error | ||
smells/no-setinterval: error | ||
smells/no-this-assign: error | ||
smells/no-complex-string-concat: error | ||
smells/no-complex-chaining: error | ||
# https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns | ||
overrides: | ||
- files: | ||
- lib/manager.js | ||
- test/helpers/fix.js | ||
rules: | ||
# Rules of plugin `smells` ~> Joi is meant to be chained! | ||
smells/no-complex-chaining: off | ||
- files: | ||
- test/**/*.spec.js | ||
rules: | ||
# Rules of plugin `smells` ~> mocha is meant to be chained! | ||
smells/no-complex-chaining: off | ||
- files: | ||
- test/**/*.js | ||
rules: | ||
# Rules of plugin `node` ~> no test file is meant to be published! | ||
node/no-unpublished-require: off | ||
# Rules of plugin `security` | ||
security/detect-unsafe-regex: off | ||
security/detect-buffer-noassert: off | ||
security/detect-child-process: off | ||
security/detect-disable-mustache-escape: off | ||
security/detect-eval-with-expression: off | ||
security/detect-no-csrf-before-method-override: off | ||
security/detect-non-literal-fs-filename: off | ||
security/detect-non-literal-regexp: off | ||
security/detect-non-literal-require: off | ||
security/detect-object-injection: off | ||
securiyt/detect-possible-timing-attacks: off | ||
security/detect-pseudoRandomBytes: off | ||
- files: | ||
- bin/*.js | ||
- test/**/*.spec.js | ||
rules: | ||
# Rules of plugin `filenames` ~> tests/binaries export nothing! | ||
filenames/match-regex: 0 | ||
filenames/match-exported: off |
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 |
---|---|---|
@@ -1,2 +1,14 @@ | ||
# Hidden folders. | ||
.nyc_output/ | ||
.reports/ | ||
|
||
# Folders. | ||
coverage/ | ||
node_modules/ | ||
|
||
# Hidden files. | ||
.inch.config.json | ||
|
||
# Files. | ||
docs.json | ||
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,4 @@ | ||
--- | ||
files: | ||
included: | ||
- lib/**/*.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,11 @@ | ||
# Tutorial: | ||
# - https://github.com/markdownlint/markdownlint/blob/master/docs/configuration.md | ||
# - https://updownpress.github.io/markdown-lint | ||
# Rules: https://github.com/markdownlint/markdownlint/blob/v0.4.0/docs/RULES.md | ||
# Examples: | ||
# - https://github.com/Chalarangelo/30-seconds-of-code/blob/master/.mdlrc | ||
# - https://github.com/coel-lang/coel/blob/master/.mdlrc | ||
# - https://github.com/elerch/vcsh_mdlrc/blob/master/.mdl.rb | ||
rules "~MD002", # First header should be a top level header ~> Using HTML | ||
"~MD041" # First line in file should be a top level header | ||
style ".mdlrc.style.rb" |
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 @@ | ||
all | ||
rule 'MD013', :line_length => "100" | ||
|
||
exclude_rule 'no-inline-html' # MD033 |
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,30 @@ | ||
# Hidden folders. | ||
.git | ||
.nyc_output | ||
.reports | ||
|
||
# Folders. | ||
coverage | ||
node_modules | ||
test | ||
|
||
# Hidden files. | ||
.bithoundrc | ||
.codeclimate.yml | ||
.commitlintrc.yaml | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.cc.yaml | ||
.eslintrc.yaml | ||
.gitignore | ||
.inch.config.json | ||
.inch.yml | ||
.mdlrc | ||
.mdlrc.style.rb | ||
.nycrc.json | ||
.travis.yml | ||
|
||
# Files. | ||
docs.json | ||
npm-debug.log | ||
yarn.lock |
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
Oops, something went wrong.