-
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.
- Loading branch information
Nataniel López
committed
Jan 28, 2020
1 parent
3147861
commit 4ecef97
Showing
13 changed files
with
3,539 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,122 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
extends: 'airbnb-base', | ||
|
||
env: { | ||
node: true, | ||
es6: true, | ||
mocha: true | ||
}, | ||
|
||
globals: { | ||
__rootpath: true, | ||
coreRequire: true, | ||
mainRequire: true, | ||
JANIS_CORE: true, | ||
JANIS_ENV: true, | ||
JANIS_ENV_ALIAS: true | ||
}, | ||
|
||
parserOptions: { | ||
sourceType: 'script' | ||
}, | ||
|
||
settings: { | ||
'import/core-modules': ['aws-sdk', 'lodash', 'yamljs', 'openapi-schema-validator'] | ||
}, | ||
|
||
rules: { | ||
'operator-linebreak': 0, | ||
'no-continue': 0, | ||
'no-plusplus': 0, | ||
'prefer-spread': 0, | ||
'prefer-rest-params': 0, | ||
'class-methods-use-this': 0, | ||
'consistent-return': 0, | ||
'prefer-template': 0, | ||
'import/no-unresolved': 0, | ||
'import/no-extraneous-dependencies': ['error', { devDependencies: ['**/tests/**/*.js'] }], | ||
|
||
'no-bitwise': 0, | ||
|
||
curly: ['error', 'multi-or-nest'], | ||
|
||
'no-underscore-dangle': ['warn', { | ||
allowAfterThis: true, | ||
allowAfterSuper: true, | ||
allow: ['_call', '__rootpath', '_where'] | ||
}], | ||
|
||
'no-tabs': 0, | ||
|
||
'no-new': 0, | ||
|
||
'func-names': 0, | ||
|
||
'space-before-function-paren': ['error', { | ||
'anonymous': 'never', | ||
'named': 'never', | ||
'asyncArrow': 'always' | ||
}], | ||
|
||
'arrow-parens': ['error', 'as-needed'], | ||
'arrow-body-style': 0, | ||
|
||
indent: ['error', 'tab', { | ||
SwitchCase: 1 | ||
}], | ||
|
||
'comma-dangle': ['error', 'never'], | ||
|
||
'padded-blocks': 0, | ||
|
||
'max-len': ['error', { | ||
code: 150, | ||
tabWidth: 1, | ||
comments: 200 | ||
}], | ||
|
||
'spaced-comment': ['error', 'always', { | ||
exceptions: ['*'] | ||
}], | ||
|
||
'newline-per-chained-call': ['error', { | ||
ignoreChainWithDepth: 2 | ||
}], | ||
|
||
'no-param-reassign': 0, | ||
|
||
'no-prototype-builtins': 0, | ||
|
||
'keyword-spacing': ['error', { | ||
overrides: { | ||
if: { | ||
after: false | ||
}, | ||
for: { | ||
after: false | ||
}, | ||
while: { | ||
after: false | ||
}, | ||
switch: { | ||
after: false | ||
}, | ||
catch: { | ||
after: false | ||
} | ||
} | ||
}], | ||
|
||
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], | ||
'function-paren-newline': 0, | ||
'no-await-in-loop': 0, | ||
|
||
'object-curly-newline': ['error', { | ||
ObjectExpression: { minProperties: 5, multiline: true, consistent: true }, | ||
ObjectPattern: { minProperties: 5, multiline: true, consistent: true } | ||
}], | ||
'nonblock-statement-body-position': ['error', 'below', { overrides: { else: 'any' } }] | ||
} | ||
}; |
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,61 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.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,5 @@ | ||
{ | ||
"hooks": { | ||
"pre-commit": "npm run lint && npm t" | ||
} | ||
} |
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 @@ | ||
{ | ||
"exclude": [ | ||
"coverages/", | ||
"tests/", | ||
"mocks/", | ||
".eslintrc.js", | ||
".travis.yml" | ||
], | ||
"extension": [ | ||
".js" | ||
], | ||
"cache": true, | ||
"all": true, | ||
"default-excludes": true, | ||
"check-coverage": true, | ||
"statements": 95, | ||
"branches": 95, | ||
"functions": 95, | ||
"lines": 95 | ||
} |
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 @@ | ||
language: node_js | ||
node_js: | ||
- "lts/*" | ||
cache: npm | ||
script: | ||
- | | ||
# Run test script | ||
npm run test-ci | ||
after_script: | ||
- | | ||
# Upload coverage to coveralls | ||
if [[ -d .nyc_output ]]; then | ||
npm install --save-dev coveralls@2 | ||
nyc report --reporter=text-lcov | coveralls | ||
fi |
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,8 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] |
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 @@ | ||
'use strict'; | ||
|
||
const { Solr } = require('./lib'); | ||
|
||
module.exports = Solr; |
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,9 @@ | ||
'use strict'; | ||
|
||
const Solr = require('./solr'); | ||
const SolrError = require('./solr-error'); | ||
|
||
module.exports = { | ||
Solr, | ||
SolrError | ||
}; |
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,21 @@ | ||
'use strict'; | ||
|
||
class SolrError extends Error { | ||
|
||
static get codes() { | ||
|
||
return { | ||
// your errors here... | ||
}; | ||
|
||
} | ||
|
||
constructor(err, code) { | ||
super(err); | ||
this.message = err.message || err; | ||
this.code = code; | ||
this.name = 'SolrError'; | ||
} | ||
} | ||
|
||
module.exports = SolrError; |
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 @@ | ||
'use strict'; | ||
|
||
const SolrError = require('./solr-error'); | ||
|
||
class Solr { | ||
|
||
// package code... | ||
|
||
} | ||
|
||
module.exports = Solr; |
Oops, something went wrong.