From bc076db8896811a0b479a1a95cb21dc7ed25e1e3 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 8 May 2019 18:57:59 +0800 Subject: [PATCH] - Linting (eslint-config-ash-nazg) (including overcoming an issue in the `authenticate.js` middleware when switching to strict mode with errors upon setting a property on a boolean ) - npm: No need for full path within package.json scripts --- .eslintrc.js | 83 +- CONTRIBUTING.md | 2 +- README.md | 18 +- lib/authenticator.js | 110 ++- lib/errors/authenticationerror.js | 9 +- lib/framework/connect.js | 4 +- lib/http/request.js | 38 +- lib/index.js | 3 +- lib/middleware/authenticate.js | 43 +- lib/middleware/initialize.js | 8 +- lib/sessionmanager.js | 5 +- lib/strategies/session.js | 14 +- package-lock.json | 907 +++++++++++++++++- package.json | 18 +- test/authenticator.framework.test.js | 1 + test/authenticator.middleware.test.js | 2 + test/authenticator.test.js | 17 +- test/bootstrap/node.js | 2 + test/http/request.test.js | 36 +- .../authenticate.error.callback.test.js | 2 + test/middleware/authenticate.error.test.js | 2 + .../authenticate.fail.callback.test.js | 2 + .../authenticate.fail.flash.test.js | 2 + .../authenticate.fail.message.test.js | 2 + .../authenticate.fail.multi.test.js | 2 + test/middleware/authenticate.fail.test.js | 2 + test/middleware/authenticate.pass.test.js | 2 + test/middleware/authenticate.redirect.test.js | 2 + .../authenticate.success.callback.test.js | 2 + .../authenticate.success.flash.test.js | 1 + .../authenticate.success.info.test.js | 1 + .../authenticate.success.message.test.js | 1 + .../authenticate.success.multi.test.js | 1 + test/middleware/authenticate.success.test.js | 1 + test/middleware/authenticate.test.js | 1 + test/middleware/initialize.test.js | 2 + test/package.test.js | 2 + test/strategies/session.test.js | 24 +- 38 files changed, 1186 insertions(+), 188 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b743aac9..4802dcd9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,10 +1,20 @@ module.exports = { env: { node: true, + browser: false }, extends: [ - 'airbnb-base', + 'ash-nazg/sauron-node', + // Override ash-nazg's current preference for ESM + 'plugin:node/recommended-script' ], + settings: { + jsdoc: { + // For `jsdoc/check-examples` in `ash-nazg` + matchingFileName: 'dummy.md', + rejectExampleCodeRegex: '^`', + } + }, overrides: [ { files: ['test/**'], @@ -22,8 +32,33 @@ module.exports = { // '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' ], @@ -31,6 +66,50 @@ module.exports = { 'comma-dangle': 0, 'no-underscore-dangle': 0, 'no-param-reassign': 0, - 'prefer-destructuring': 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, + }] } }; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4e251e8c..74d066dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ ## Contributing -Pull Requests are welcome for any issues, if you have any questions please +Pull Requests are welcome for any issues, if you have any questions please [raise an issue](https://github.com/passport-next/passport/issues). If you discover a security issue please create an issue stating you've discovered a security diff --git a/README.md b/README.md index 6fe2d5fa..841817f5 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ application must be configured. ```javascript passport.use(new LocalStrategy( - function(username, password, done) { + function (username, password, done) { User.findOne({ username }, function (err, user) { if (err) { return done(err); } if (!user) { return done(null, false); } @@ -88,11 +88,11 @@ as simple as serializing the user ID, and finding the user by ID when deserializing. ```javascript -passport.serializeUser(function(user, done) { +passport.serializeUser(function (user, done) { done(null, user.id); }); -passport.deserializeUser(function(id, done) { +passport.deserializeUser(function (id, done) { User.findById(id, function (err, user) { done(err, user); }); @@ -109,7 +109,7 @@ middleware must also be used. ```javascript const app = express(); -app.use(require('serve-static')(__dirname + '/../../public')); +app.use(require('serve-static')(path.join(__dirname, '/../../public'))); app.use(require('cookie-parser')()); app.use(require('body-parser').urlencoded({ extended: true })); app.use(require('express-session')({ secret: 'keyboard cat', resave: true, saveUninitialized: true })); @@ -125,7 +125,7 @@ middleware to authenticate requests. ```javascript app.post('/login', passport.authenticate('local', { failureRedirect: '/login' }), - function(req, res) { + function (req, res) { res.redirect('/'); }); ``` @@ -138,12 +138,12 @@ session. ```javascript app.post('/some/protected/route', - function(req, res, next) { - if(req.isAuthenticated()){ + function (req, res, next) { + if (req.isAuthenticated()) { next(); - } else { - next(new Error('Unauthorized')); + return; } + next(new Error('Unauthorized')); }); ``` diff --git a/lib/authenticator.js b/lib/authenticator.js index 96c70118..2d7e4bce 100644 --- a/lib/authenticator.js +++ b/lib/authenticator.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Module dependencies. */ @@ -8,9 +10,9 @@ const connect = require('./framework/connect'); /** - * `Authenticator` constructor. + * The `Authenticator` constructor. * - * @api public + * @public */ class Authenticator { constructor() { @@ -27,8 +29,8 @@ class Authenticator { /** * Initialize authenticator. - * - * @api protected + * @returns {void} + * @protected */ init() { this.framework(connect()); @@ -40,21 +42,21 @@ class Authenticator { * Utilize the given `strategy` with optional `name`, overridding the strategy's * default name. * - * Examples: + * @example * - * passport.use(new TwitterStrategy(...)); + * passport.use(new TwitterStrategy(...args)); * - * passport.use('api', new http.BasicStrategy(...)); + * passport.use('api', new http.BasicStrategy(...args)); * - * @param {String|Strategy} name + * @param {string|Strategy} name * @param {Strategy} strategy - * @return {Authenticator} for chaining - * @api public + * @returns {Authenticator} for chaining + * @public */ use(name, strategy) { if (!strategy) { strategy = name; - name = strategy.name; + ({ name } = strategy); } if (!name) { throw new Error('Authentication strategies must have a name'); } @@ -73,13 +75,13 @@ class Authenticator { * and de-configure authentication strategies. The `use()`/`unuse()` * combination satisfies these scenarios. * - * Examples: + * @example * * passport.unuse('legacy-api'); * - * @param {String} name - * @return {Authenticator} for chaining - * @api public + * @param {string} name + * @returns {Authenticator} for chaining + * @public */ unuse(name) { delete this._strategies[name]; @@ -97,37 +99,39 @@ class Authenticator { * If you are using a Connect-compatible framework, including Express, there is * no need to invoke this function. * - * Examples: + * @example * * passport.framework(require('hapi-passport')()); * - * @param {Object} name - * @return {Authenticator} for chaining - * @api public + * @param {Object} fw + * @returns {Authenticator} for chaining + * @public */ framework(fw) { this._framework = fw; return this; } + /** + * @typedef {Object} AuthenticatorInitializeOptions + * @property {string} [userProperty="user"] Property to set on `req` upon login + */ + /** * Passport's primary initialization middleware. * * This middleware must be in use by the Connect/Express application for * Passport to operate. * - * Options: - * - `userProperty` Property to set on `req` upon login, defaults to _user_ - * - * Examples: + * @example * * app.use(passport.initialize()); * * app.use(passport.initialize({ userProperty: 'currentUser' })); * - * @param {Object} options - * @return {Function} middleware - * @api public + * @param {AuthenticatorInitializeOptions} options + * @returns {Function} middleware + * @public */ initialize(options) { options = options || {}; @@ -140,32 +144,33 @@ class Authenticator { * Middleware that will authenticate a request using the given `strategy` name, * with optional `options` and `callback`. * - * Examples: + * @example * * passport.authenticate('local', { * successRedirect: '/', * failureRedirect: '/login' * })(req, res); * - * passport.authenticate('local', function(err, user) { - * if (!user) { return res.redirect('/login'); } + * passport.authenticate('local', (err, user) => { + * if (err) { next(err); return; } + * if (!user) { res.redirect('/login'); return; } * res.end('Authenticated!'); * })(req, res); * * passport.authenticate('basic', { session: false })(req, res); * - * app.get('/auth/twitter', passport.authenticate('twitter'), function(req, res) { + * app.get('/auth/twitter', passport.authenticate('twitter'), (req, res) => { * // request will be redirected to Twitter * }); - * app.get('/auth/twitter/callback', passport.authenticate('twitter'), function(req, res) { + * app.get('/auth/twitter/callback', passport.authenticate('twitter'), (req, res) => { * res.json(req.user); * }); * - * @param {String} strategy + * @param {string} strategy * @param {Object} options * @param {Function} callback - * @return {Function} middleware - * @api public + * @returns {Function} middleware + * @public */ authenticate(strategy, options, callback) { return this._framework.authenticate(this, strategy, options, callback); @@ -182,14 +187,15 @@ class Authenticator { * This function is particularly useful when connecting third-party accounts * to the local account of a user that is currently authenticated. * - * Examples: + * @example * * passport.authorize('twitter-authz', { failureRedirect: '/account' }); * - * @param {String} strategy + * @param {string} strategy * @param {Object} options - * @return {Function} middleware - * @api public + * @param {Function} callback + * @returns {Function} middleware + * @public */ authorize(strategy, options, callback) { options = options || {}; @@ -217,7 +223,7 @@ class Authenticator { * An exception to this rule would be an API server, which expects each HTTP * request to provide credentials in an Authorization header. * - * Examples: + * @example * * app.use(connect.cookieParser()); * app.use(connect.session({ secret: 'keyboard cat' })); @@ -225,8 +231,8 @@ class Authenticator { * app.use(passport.session()); * * @param {Object} options - * @return {Function} middleware - * @api public + * @returns {Function} middleware + * @public */ session(options) { return this.authenticate('session', options); @@ -235,11 +241,11 @@ class Authenticator { /** * Sets a custom SessionManager * - * Examples: + * @example * * passport.sessionManager = new CustomSessionManager(); * - * @api public + * @public */ sessionManager(mgr) { @@ -250,13 +256,13 @@ class Authenticator { /** * Registers a function used to serialize user objects into the session. * - * Examples: + * @example * * passport.serializeUser(function(user, done) { * done(null, user.id); * }); * - * @api public + * @public */ // eslint-disable-next-line consistent-return @@ -311,7 +317,7 @@ class Authenticator { /** * Registers a function used to deserialize user objects out of the session. * - * Examples: + * @example * * passport.deserializeUser(function(id, done) { * User.findById(id, function (err, user) { @@ -319,7 +325,7 @@ class Authenticator { * }); * }); * - * @api public + * @public */ // eslint-disable-next-line consistent-return @@ -401,7 +407,7 @@ class Authenticator { * If no transforms are registered, `info` supplied by the strategy will be left * unmodified. * - * Examples: + * @example * * passport.transformAuthInfo(function(info, done) { * Client.findById(info.clientID, function (err, client) { @@ -410,7 +416,7 @@ class Authenticator { * }); * }); * - * @api public + * @public */ // eslint-disable-next-line consistent-return @@ -471,9 +477,9 @@ class Authenticator { /** * Return strategy with given `name`. * - * @param {String} name - * @return {Strategy} - * @api private + * @param {string} name + * @returns {Strategy} + * @private */ _strategy(name) { return this._strategies[name]; diff --git a/lib/errors/authenticationerror.js b/lib/errors/authenticationerror.js index cba0b8c1..e8daf169 100644 --- a/lib/errors/authenticationerror.js +++ b/lib/errors/authenticationerror.js @@ -1,14 +1,15 @@ +'use strict'; + /** - * `AuthenticationError` error. + * The `AuthenticationError` error. * - * @api private + * @private */ class AuthenticationError extends Error { constructor(message, status) { - super(); + super(message); Error.captureStackTrace(this, AuthenticationError); this.name = 'AuthenticationError'; - this.message = message; this.status = status || 401; } } diff --git a/lib/framework/connect.js b/lib/framework/connect.js index c8485461..5b6a229d 100644 --- a/lib/framework/connect.js +++ b/lib/framework/connect.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Module dependencies. */ @@ -12,7 +14,7 @@ const authenticate = require('../middleware/authenticate'); * middleware that conform to the `fn(req, res, next)` signature. * * @return {Object} - * @api protected + * @protected */ // eslint-disable-next-line no-multi-assign, func-names diff --git a/lib/http/request.js b/lib/http/request.js index 6d3a0e70..ab2d25d9 100644 --- a/lib/http/request.js +++ b/lib/http/request.js @@ -1,33 +1,38 @@ /** * Module dependencies. */ +'use strict'; // const http = require('http') // , req = http.IncomingMessage.prototype; /* eslint-disable no-multi-assign */ - const req = exports = module.exports = {}; +/* eslint-enable no-multi-assign */ + +/** +* @typedef {Object} LogInOptions +* @property {boolean} [session] Save login state in session, defaults to _true_ +*/ /** * Initiate a login session for `user`. * - * Options: - * - `session` Save login state in session, defaults to _true_ * - * Examples: + * @example * * req.logIn(user, { session: false }); * - * req.logIn(user, function(err) { + * req.logIn(user, (err) => { * if (err) { throw err; } * // session saved * }); * * @param {User} user - * @param {Object} options + * @param {LogInOptions} options * @param {Function} done - * @api public + * @returns {void} + * @public */ req.logIn = function logIn(user, options, done) { if (typeof options === 'function') { @@ -45,12 +50,11 @@ req.logIn = function logIn(user, options, done) { this[property] = user; if (session) { if (!this._passport) { throw new Error('passport.initialize() middleware not in use'); } - if (typeof done !== 'function') { throw new Error('req#login requires a callback function'); } + if (typeof done !== 'function') { throw new TypeError('req#login requires a callback function'); } - const self = this; // eslint-disable-next-line consistent-return this._passport.instance._sm.logIn(this, user, (err) => { - if (err) { self[property] = null; return done(err); } + if (err) { this[property] = null; return done(err); } done(); }); } else { @@ -63,8 +67,8 @@ req.login = req.logIn; /** * Terminate an existing login session. - * - * @api public + * @returns {void} + * @public */ req.logOut = function logOut() { let property = 'user'; @@ -83,8 +87,8 @@ req.logout = req.logOut; /** * Test if request is authenticated. * - * @return {Boolean} - * @api public + * @returns {boolean} + * @public */ req.isAuthenticated = function isAuthenticated() { let property = 'user'; @@ -92,14 +96,14 @@ req.isAuthenticated = function isAuthenticated() { property = this._passport.instance._userProperty || 'user'; } - return !!(this[property]); + return Boolean(this[property]); }; /** * Test if request is unauthenticated. * - * @return {Boolean} - * @api public + * @returns {boolean} + * @public */ req.isUnauthenticated = function isUnauthenticated() { return !this.isAuthenticated(); diff --git a/lib/index.js b/lib/index.js index a4a11e39..14415cc2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,6 +3,7 @@ */ /* eslint-disable no-multi-assign */ +'use strict'; const Passport = require('./authenticator'); const SessionStrategy = require('./strategies/session'); @@ -11,7 +12,7 @@ const SessionStrategy = require('./strategies/session'); /** * Export default singleton. * - * @api public + * @public */ exports = module.exports = new Passport(); diff --git a/lib/middleware/authenticate.js b/lib/middleware/authenticate.js index 33f43fba..b3a07912 100644 --- a/lib/middleware/authenticate.js +++ b/lib/middleware/authenticate.js @@ -1,9 +1,10 @@ +/* eslint-disable no-shadow */ +'use strict'; + /** * Module dependencies. */ -/* eslint-disable no-shadow */ - const http = require('http'); const AuthenticationError = require('../errors/authenticationerror'); @@ -54,7 +55,7 @@ const AuthenticationError = require('../errors/authenticationerror'); * responsibility to log-in the user, establish a session, and otherwise perform * the desired operations. * - * Examples: + * @example * * passport.authenticate('local', { successRedirect: '/', failureRedirect: '/login' }); * @@ -62,11 +63,12 @@ const AuthenticationError = require('../errors/authenticationerror'); * * passport.authenticate('twitter'); * - * @param {String|Array} name + * @param {Authenticator} passport + * @param {string|Array} name * @param {Object} options * @param {Function} callback - * @return {Function} - * @api public + * @returns {Function} + * @public */ module.exports = function authenticate(passport, name, options, callback) { if (typeof options === 'function') { @@ -124,7 +126,9 @@ module.exports = function authenticate(passport, name, options, callback) { if (typeof flash === 'string') { flash = { type: 'error', message: flash }; } - flash.type = flash.type || 'error'; + if (typeof flash !== 'boolean') { + flash.type = flash.type || 'error'; + } const type = flash.type || challenge.type || 'error'; const msg = flash.message || challenge.message || challenge; @@ -204,7 +208,7 @@ module.exports = function authenticate(passport, name, options, callback) { * * @param {Object} user * @param {Object} info - * @api public + * @public */ // eslint-disable-next-line consistent-return @@ -221,7 +225,9 @@ module.exports = function authenticate(passport, name, options, callback) { if (typeof flash === 'string') { flash = { type: 'success', message: flash }; } - flash.type = flash.type || 'success'; + if (typeof flash !== 'boolean') { + flash.type = flash.type || 'success'; + } const type = flash.type || info.type || 'success'; msg = flash.message || info.message || info; @@ -283,9 +289,10 @@ module.exports = function authenticate(passport, name, options, callback) { * * Strategies should call this function to fail an authentication attempt. * - * @param {String} challenge - * @param {Number} status - * @api public + * @param {string} challenge + * @param {number} status + * @returns {void} + * @public */ strategy.fail = function fail(challenge, status) { if (typeof challenge === 'number') { @@ -305,9 +312,10 @@ module.exports = function authenticate(passport, name, options, callback) { * Strategies should call this function to redirect the user (via their * user agent) to a third-party website for authentication. * - * @param {String} url - * @param {Number} status - * @api public + * @param {string} url + * @param {number} status + * @returns {void} + * @public */ strategy.redirect = function redirect(url, status) { // NOTE: Do not use `res.redirect` from Express, because it can't decide @@ -334,7 +342,8 @@ module.exports = function authenticate(passport, name, options, callback) { * function. It exists primarily to allow previous authentication state * to be restored, for example from an HTTP session. * - * @api public + * @returns {void} + * @public */ strategy.pass = function pass() { next(); @@ -348,7 +357,7 @@ module.exports = function authenticate(passport, name, options, callback) { * user directory is not available. * * @param {Error} err - * @api public + * @public */ // eslint-disable-next-line consistent-return diff --git a/lib/middleware/initialize.js b/lib/middleware/initialize.js index dd87f893..1d288846 100644 --- a/lib/middleware/initialize.js +++ b/lib/middleware/initialize.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Passport initialization. * @@ -19,7 +21,7 @@ * entirely stateless (not using sessions), this middleware is not necessary, * but its use will not have any adverse impact. * - * Examples: + * @example * * app.use(connect.cookieParser()); * app.use(connect.session({ secret: 'keyboard cat' })); @@ -37,13 +39,13 @@ * }); * * @return {Function} - * @api public + * @public */ const IncomingMessageExt = require('../http/request'); -/* eslint-disable no-shadow */ module.exports = function initialize(passport) { + /* eslint-disable-next-line no-shadow */ return function initialize(req, res, next) { req._passport = {}; req._passport.instance = passport; diff --git a/lib/sessionmanager.js b/lib/sessionmanager.js index 2b560e5a..acf588ae 100644 --- a/lib/sessionmanager.js +++ b/lib/sessionmanager.js @@ -1,3 +1,5 @@ +'use strict'; + class SessionManager { constructor(options, serializeUser) { if (typeof options === 'function') { @@ -11,7 +13,6 @@ class SessionManager { } logIn(req, user, cb) { - const self = this; // eslint-disable-next-line consistent-return this._serializeUser(user, req, (err, obj) => { if (err) { @@ -24,7 +25,7 @@ class SessionManager { if (!req.session) { req.session = {}; } - req.session[self._key] = req._passport.session; + req.session[this._key] = req._passport.session; cb(); }); } diff --git a/lib/strategies/session.js b/lib/strategies/session.js index bf5922b7..51b612fc 100644 --- a/lib/strategies/session.js +++ b/lib/strategies/session.js @@ -1,3 +1,4 @@ +'use strict'; /** * Module dependencies. */ @@ -5,9 +6,9 @@ const Strategy = require('@passport-next/passport-strategy'); /** - * `SessionStrategy` constructor. + * The `SessionStrategy` constructor. * - * @api public + * @public */ class SessionStrategy extends Strategy { constructor(options, deserializeUser) { @@ -33,7 +34,7 @@ class SessionStrategy extends Strategy { * * @param {Object} req * @param {Object} options - * @api protected + * @protected */ // eslint-disable-next-line consistent-return, no-unused-vars @@ -41,7 +42,6 @@ class SessionStrategy extends Strategy { if (!req._passport) { return this.error(new Error('passport.initialize() middleware not in use')); } options = options || {}; - const self = this; let su; if (req._passport.session) { @@ -51,7 +51,7 @@ class SessionStrategy extends Strategy { if (su || su === 0) { // eslint-disable-next-line consistent-return this._deserializeUser(su, req, (err, user) => { - if (err) { return self.error(err); } + if (err) { return this.error(err); } if (!user) { delete req._passport.session.user; } else { @@ -59,10 +59,10 @@ class SessionStrategy extends Strategy { const property = req._passport.instance._userProperty || 'user'; req[property] = user; } - self.pass(); + this.pass(); }); } else { - self.pass(); + this.pass(); } } } diff --git a/package-lock.json b/package-lock.json index 1924ad9e..6b132837 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,48 @@ "js-tokens": "^4.0.0" } }, + "@babel/runtime": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.4.tgz", + "integrity": "sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, + "@mysticatea/eslint-plugin": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@mysticatea/eslint-plugin/-/eslint-plugin-10.0.3.tgz", + "integrity": "sha512-lsZeSINcepg5SSbA+FX/n/A7M/Qz+wwRWKBsg2IPk52Xi+R1X02lqd4sAzZGG2HvsPiGyoKJ/Ejx9rQPzLoh4A==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "~1.7.0", + "@typescript-eslint/parser": "~1.7.0", + "eslint-plugin-eslint-comments": "~3.1.1", + "eslint-plugin-eslint-plugin": "~2.0.1", + "eslint-plugin-node": "~8.0.1", + "eslint-plugin-prettier": "~3.0.1", + "eslint-plugin-vue": "~5.2.2", + "prettier": "~1.14.3", + "vue-eslint-parser": "^5.0.0" + }, + "dependencies": { + "eslint-plugin-node": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-8.0.1.tgz", + "integrity": "sha512-ZjOjbjEi6jd82rIpFSgagv4CHWzG9xsQAVp1ZPlhRnnYxcTgENUVBvhYmkQ7GvT1QFijUSo69RaiOJKhMu6i8w==", + "dev": true, + "requires": { + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^5.0.2", + "minimatch": "^3.0.4", + "resolve": "^1.8.1", + "semver": "^5.5.0" + } + } + } + }, "@passport-next/chai-passport-strategy": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@passport-next/chai-passport-strategy/-/chai-passport-strategy-1.1.0.tgz", @@ -35,6 +77,49 @@ "resolved": "https://registry.npmjs.org/@passport-next/passport-strategy/-/passport-strategy-1.1.0.tgz", "integrity": "sha512-2KhFjtPueJG6xVj2HnqXt9BlANOfYCVLyu+pXYjPGBDT8yk+vQwc/6tsceIj+mayKcoxMau2JimggXRPHgoc8w==" }, + "@typescript-eslint/eslint-plugin": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.7.0.tgz", + "integrity": "sha512-NUSz1aTlIzzTjFFVFyzrbo8oFjHg3K/M9MzYByqbMCxeFdErhLAcGITVfXzSz+Yvp5OOpMu3HkIttB0NyKl54Q==", + "dev": true, + "requires": { + "@typescript-eslint/parser": "1.7.0", + "@typescript-eslint/typescript-estree": "1.7.0", + "eslint-utils": "^1.3.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.7.0.tgz", + "integrity": "sha512-1QFKxs2V940372srm12ovSE683afqc1jB6zF/f8iKhgLz1yoSjYeGHipasao33VXKI+0a/ob9okeogGdKGvvlg==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.7.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.7.0.tgz", + "integrity": "sha512-K5uedUxVmlYrVkFbyV3htDipvLqTE3QMOUQEHYJaKtgzxj6r7c5Ca/DG1tGgFxX+fsbi9nDIrf4arq7Ib7H/Yw==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "acorn": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", @@ -111,12 +196,24 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, + "ast-metadata-inferer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ast-metadata-inferer/-/ast-metadata-inferer-0.1.1.tgz", + "integrity": "sha512-hc9w8Qrgg9Lf9iFcZVhNjUnhrd2BBpTlyCnegPVvCe6O0yMrF57a6Cmh7k+xUsfUOMh9wajOL5AsGOBNEyTCcw==", + "dev": true + }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "bail": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.4.tgz", + "integrity": "sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -139,6 +236,17 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "browserslist": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.6.tgz", + "integrity": "sha512-o/hPOtbU9oX507lIqon+UvPYqpx3mHc8cV3QemSBTXwkG8gSQSK6UKvXcE/DcleU3+A59XTUHyCvZ5qGy8xVAg==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000963", + "electron-to-chromium": "^1.3.127", + "node-releases": "^1.1.17" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -151,6 +259,18 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "caniuse-db": { + "version": "1.0.30000967", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000967.tgz", + "integrity": "sha512-70gk6cLSD5rItxnZ7WUxyCpM9LAjEb1tVzlENQfXQXZS/IiGnfAC6u32G5cZFlDBKjNPBIta/QSx5CZLZepxRA==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30000967", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000967.tgz", + "integrity": "sha512-rUBIbap+VJfxTzrM4akJ00lkvVb5/n5v3EGXfWzSH5zT8aJmGzjA8HWhJ4U6kCpzxozUSnB+yvAYDRPY6mRpgQ==", + "dev": true + }, "chai": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", @@ -182,6 +302,24 @@ "supports-color": "^5.3.0" } }, + "character-entities": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.3.tgz", + "integrity": "sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w==", + "dev": true + }, + "character-entities-legacy": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.3.tgz", + "integrity": "sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww==", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.3.tgz", + "integrity": "sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg==", + "dev": true + }, "chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -194,6 +332,15 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, + "clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha1-jffHquUf02h06PjQW5GAvBGj/tc=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -226,6 +373,12 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, + "collapse-white-space": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.5.tgz", + "integrity": "sha512-703bOOmytCYAX9cXYqoikYIx6twmFCXsnzRQheBcTG3nzKYBR4P/+wkYeH+Mvj7qUz8zZDtdyzbxfnEi/kYzRQ==", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -241,6 +394,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "comment-parser": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.5.4.tgz", + "integrity": "sha512-0h7W6Y1Kb6zKQMJqdX41C5qf9ITCVIsD2qP2RaqDF3GFkXFrmuAuv5zUOuo19YzyC9scjBNpqzuaRQ2Sy5pxMQ==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -328,6 +487,12 @@ "esutils": "^2.0.2" } }, + "electron-to-chromium": { + "version": "1.3.133", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.133.tgz", + "integrity": "sha512-lyoC8aoqbbDqsprb6aPdt9n3DpOZZzdz/T4IZKsR0/dkZIxnJVUjjcpOSwA66jPRIOyDAamCTAUqweU05kKNSg==", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -435,14 +600,35 @@ "ms": "^2.1.1" } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true } } }, + "eslint-ast-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz", + "integrity": "sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA==", + "dev": true, + "requires": { + "lodash.get": "^4.4.2", + "lodash.zip": "^4.2.0" + } + }, "eslint-config-airbnb-base": { "version": "13.1.0", "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz", @@ -454,6 +640,18 @@ "object.entries": "^1.0.4" } }, + "eslint-config-ash-nazg": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-4.0.0.tgz", + "integrity": "sha512-LUroSU/VqempjeWSIgMDu3byW8iWKfwj4aqEGm0W8oqHe4HCP87Ny0MVChOXjSoz9lDEC2PjXmnxL2Zt03Mfog==", + "dev": true + }, + "eslint-config-standard": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", + "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", + "dev": true + }, "eslint-import-resolver-node": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", @@ -472,6 +670,12 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -493,9 +697,55 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, + "eslint-plugin-compat": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-compat/-/eslint-plugin-compat-3.1.1.tgz", + "integrity": "sha512-pqy5LBy4ZPhSVwb2p0+jUozdnoGX+qc1NRIcK+Yfg99149ncqZVc8gP5u637vwVC/nLQP6X6zTpnHwsZCdvluQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.2", + "ast-metadata-inferer": "^0.1.1", + "browserslist": "^4.5.2", + "caniuse-db": "^1.0.30000951", + "mdn-browser-compat-data": "^0.0.72", + "semver": "^5.6.0" + } + }, + "eslint-plugin-es": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz", + "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", + "dev": true, + "requires": { + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.1" + } + }, + "eslint-plugin-eslint-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.1.1.tgz", + "integrity": "sha512-GZDKhOFqJLKlaABX+kdoLskcTINMrVOWxGca54KcFb1QCPd0CLmqgAMRxkkUfGSmN+5NJUMGh7NGccIMcWPSfQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.0.1.tgz", + "integrity": "sha512-kJ5TZsRJH/xYstG07v3YeOy/W5SDAEzV+bvvoL0aiG1HtqDmg4mJvNPnn/JngANMmsx8oXlJrIcBTCpJzm+9kg==", + "dev": true + }, "eslint-plugin-import": { "version": "2.17.2", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.17.2.tgz", @@ -533,9 +783,120 @@ "esutils": "^2.0.2", "isarray": "^1.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-plugin-jsdoc": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-4.8.3.tgz", + "integrity": "sha512-lKOaphUUzv0qKJrAdEwQGEWcNN2Foae5W111u1ASKQeliyJkKXCVxia0dakATuI/s2ojr6Q3FVzWwT6uE1icBg==", + "dev": true, + "requires": { + "comment-parser": "^0.5.4", + "jsdoctypeparser": "3.1.0", + "lodash": "^4.17.11" + } + }, + "eslint-plugin-markdown": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-1.0.0.tgz", + "integrity": "sha512-YIrClt3yLgyGov+rInjIoC/05zMxb/c6YXQZkyI9UKuBRFLgCrL37cxthj0JYWiTYtiHq0p8O0Nt0/HrvO48iQ==", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "remark-parse": "^5.0.0", + "unified": "^6.1.2" + } + }, + "eslint-plugin-no-use-extend-native": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.4.0.tgz", + "integrity": "sha512-9W2747CwC7aTJknLKY6ftdzj3AZz8DSaa64zONOMIemxH7YRr0+hqrvsNtHK/v9DusPuMxM9y9hBnfHwzKFmww==", + "dev": true, + "requires": { + "is-get-set-prop": "^1.0.0", + "is-js-type": "^2.0.0", + "is-obj-prop": "^1.0.0", + "is-proto-prop": "^2.0.0" + } + }, + "eslint-plugin-node": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-9.0.1.tgz", + "integrity": "sha512-fljT5Uyy3lkJzuqhxrYanLSsvaILs9I7CmQ31atTtZ0DoIzRbbvInBh4cQ1CrthFHInHYBQxfPmPt6KLHXNXdw==", + "dev": true, + "requires": { + "eslint-plugin-es": "^1.4.0", + "eslint-utils": "^1.3.1", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "dev": true } } }, + "eslint-plugin-prettier": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.1.tgz", + "integrity": "sha512-/PMttrarPAY78PLvV3xfWibMOdMDl57hmlQ2XqFeA37wd+CJ7WSxV7txqjVPHi/AAFKd2lX0ZqfsOc/i5yFCSQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-promise": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.1.1.tgz", + "integrity": "sha512-faAHw7uzlNPy7b45J1guyjazw28M+7gJokKUjC5JSFoYfUEyy6Gw/i7YQvmv2Yk00sUjWcmzXQLpU1Ki/C2IZQ==", + "dev": true + }, + "eslint-plugin-standard": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", + "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", + "dev": true + }, + "eslint-plugin-unicorn": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-8.0.2.tgz", + "integrity": "sha512-Ik2/Bt/PvPnf1lZgUnNFK2310XoRn/4LYiP5gkEPVDa4w9HCoii7I6SeKh2X5Rdp2WLy4eUiLcYtiBUp+q2IRw==", + "dev": true, + "requires": { + "clean-regexp": "^1.0.0", + "eslint-ast-utils": "^1.0.0", + "import-modules": "^1.1.0", + "lodash.camelcase": "^4.1.1", + "lodash.defaultsdeep": "^4.6.0", + "lodash.kebabcase": "^4.0.1", + "lodash.snakecase": "^4.0.1", + "lodash.topairs": "^4.3.0", + "lodash.upperfirst": "^4.2.0", + "reserved-words": "^0.1.2", + "safe-regex": "^2.0.1" + } + }, + "eslint-plugin-vue": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-5.2.2.tgz", + "integrity": "sha512-CtGWH7IB0DA6BZOwcV9w9q3Ri6Yuo8qMjx05SmOGJ6X6E0Yo3y9E/gQ5tuNxg2dEt30tRnBoFTbvtmW9iEoyHA==", + "dev": true, + "requires": { + "vue-eslint-parser": "^5.0.0" + } + }, "eslint-restricted-globals": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz", @@ -565,12 +926,12 @@ "dev": true }, "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", "dev": true, "requires": { - "acorn": "^6.0.7", + "acorn": "^6.0.2", "acorn-jsx": "^5.0.0", "eslint-visitor-keys": "^1.0.0" } @@ -626,6 +987,12 @@ "strip-eof": "^1.0.0" } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "external-editor": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", @@ -643,6 +1010,12 @@ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", @@ -738,6 +1111,12 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, + "get-set-props": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-set-props/-/get-set-props-0.1.0.tgz", + "integrity": "sha1-mYR1wXhEVobQsyJG2l3428++jqM=", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -748,9 +1127,9 @@ } }, "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -822,9 +1201,9 @@ } }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.1.tgz", + "integrity": "sha512-DWjnQIFLenVrwyRCKZT+7a7/U4Cqgar4WG8V++K3hw+lrW1hc/SIwdiGmtxKCVACmHULTuGeBbHJmbwW7/sAvA==", "dev": true }, "import-fresh": { @@ -837,6 +1216,12 @@ "resolve-from": "^4.0.0" } }, + "import-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-1.1.0.tgz", + "integrity": "sha1-dI23nFzEK7lwHvq0JPiU5yYA6dw=", + "dev": true + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -903,6 +1288,22 @@ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, + "is-alphabetical": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.2.tgz", + "integrity": "sha512-V0xN4BYezDHcBSKb1QHUFMlR4as/XEuCZBzMJUU4n7+Cbt33SmUnSol+pnXFvLxSHNq2CemUXNdaXV6Flg7+xg==", + "dev": true + }, + "is-alphanumerical": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.2.tgz", + "integrity": "sha512-pyfU/0kHdISIgslFfZN9nfY1Gk3MquQgUm1mJTjdkEPpkAKNWuBTSqFwewOpR7N351VkErCiyV71zX7mlQQqsg==", + "dev": true, + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -927,18 +1328,75 @@ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "dev": true }, + "is-decimal": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.2.tgz", + "integrity": "sha512-TRzl7mOCchnhchN+f3ICUCzYvL9ul7R+TYOsZ8xia++knyZAJfv/uA1FvQXsAnYIl1T3B2X5E/J7Wb1QXiIBXg==", + "dev": true + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "is-get-set-prop": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-get-set-prop/-/is-get-set-prop-1.0.0.tgz", + "integrity": "sha1-JzGHfk14pqae3M5rudaLB3nnYxI=", + "dev": true, + "requires": { + "get-set-props": "^0.1.0", + "lowercase-keys": "^1.0.0" + } + }, + "is-hexadecimal": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.2.tgz", + "integrity": "sha512-but/G3sapV3MNyqiDBLrOi4x8uCIw0RY3o/Vb5GT0sMFHrVV7731wFSVy41T5FO1og7G0gXLJh0MkgPRouko/A==", + "dev": true + }, + "is-js-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-js-type/-/is-js-type-2.0.0.tgz", + "integrity": "sha1-c2FwBtZZtOtHKbunR9KHgt8PfiI=", + "dev": true, + "requires": { + "js-types": "^1.0.0" + } + }, + "is-obj-prop": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-obj-prop/-/is-obj-prop-1.0.0.tgz", + "integrity": "sha1-s03nnEULjXxzqyzfZ9yHWtuF+A4=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0", + "obj-props": "^1.0.0" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, + "is-proto-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-proto-prop/-/is-proto-prop-2.0.0.tgz", + "integrity": "sha512-jl3NbQ/fGLv5Jhan4uX+Ge9ohnemqyblWVVCpAvtTQzNFvV2xhJq+esnkIbYQ9F1nITXoLfDDQLp7LBw/zzncg==", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0", + "proto-props": "^2.0.0" + } + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -963,6 +1421,18 @@ "has-symbols": "^1.0.0" } }, + "is-whitespace-character": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.2.tgz", + "integrity": "sha512-SzM+T5GKUCtLhlHFKt2SDAX2RFzfS6joT91F2/WSi9LxgFdsnhfPK/UIA+JhRR2xuyLdrCys2PiFDrtn1fU5hQ==", + "dev": true + }, + "is-word-character": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.2.tgz", + "integrity": "sha512-T3FlsX8rCHAH8e7RE7PfOPZVFQlcV3XRF9eOOBQ1uf70OxO7CjjSOjeImMPCADBdYWcStAbVbYvJ1m2D3tb+EA==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -981,6 +1451,12 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "js-types": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz", + "integrity": "sha1-0kLmSU7Vcq08koCfyL7X92h8vwM=", + "dev": true + }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -991,6 +1467,12 @@ "esprima": "^4.0.0" } }, + "jsdoctypeparser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-3.1.0.tgz", + "integrity": "sha512-JNbkKpDFqbYjg+IU3FNo7qjX7Opy7CwjHywT32zgAcz/d4lX6Umn5jOHVETUdnNNgGrMk0nEx1gvP0F4M0hzlQ==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -1050,6 +1532,60 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.defaultsdeep": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz", + "integrity": "sha1-vsECT4WxvZbL6kBbI8FK1kQ6b4E=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", + "dev": true + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "lodash.topairs": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.topairs/-/lodash.topairs-4.3.0.tgz", + "integrity": "sha1-O23qo31g+xFnE8RsXxfqGQ7EjWQ=", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, + "lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", + "dev": true + }, + "lodash.zip": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", + "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", + "dev": true + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -1059,6 +1595,12 @@ "chalk": "^2.0.1" } }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "make-node": { "version": "0.4.6", "resolved": "https://registry.npmjs.org/make-node/-/make-node-0.4.6.tgz", @@ -1074,6 +1616,21 @@ "p-defer": "^1.0.0" } }, + "markdown-escapes": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.3.tgz", + "integrity": "sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw==", + "dev": true + }, + "mdn-browser-compat-data": { + "version": "0.0.72", + "resolved": "https://registry.npmjs.org/mdn-browser-compat-data/-/mdn-browser-compat-data-0.0.72.tgz", + "integrity": "sha512-vt3BxJRpV638ncYLigX91k0qP1VcpKxgExqPtX+QKFvV4/ZruZ31Sl35LsDDq5q+D7Lt7mfGWnCEuZ0d6bJW1g==", + "dev": true, + "requires": { + "extend": "3.0.2" + } + }, "mem": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", @@ -1229,9 +1786,9 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, "mute-stream": { @@ -1262,6 +1819,15 @@ "semver": "^5.7.0" } }, + "node-releases": { + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.18.tgz", + "integrity": "sha512-/mnVgm6u/8OwlIsoyRXtTI0RfQcxZoAZbdwyXap0EeWwcOpDDymyCHM2/aR9XKmHXrvizHoPAOs0pcbiJ6RUaA==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -1289,6 +1855,18 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, + "obj-props": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/obj-props/-/obj-props-1.1.0.tgz", + "integrity": "sha1-YmMT+qRCvv1KROmgLDy2vek3tRE=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, "object-keys": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", @@ -1429,6 +2007,20 @@ "callsites": "^3.0.0" } }, + "parse-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.1.tgz", + "integrity": "sha512-NBWYLQm1KSoDKk7GAHyioLTvCZ5QjdH/ASBBQTD3iLiAWJXS5bg1jEWI8nIJ+vgVvsceBVBcDGRWSo0KVQBvvg==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -1504,12 +2096,33 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "prettier": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.3.tgz", + "integrity": "sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "proto-props": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proto-props/-/proto-props-2.0.0.tgz", + "integrity": "sha512-2yma2tog9VaRZY2mn3Wq51uiSW4NcPYT1cQdBagwyrznrilKSZwIZ0UG3ZPL/mx+axEns0hE35T5ufOYZXEnBQ==", + "dev": true + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -1547,12 +2160,59 @@ "read-pkg": "^2.0.0" } }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==", + "dev": true + }, + "regexp-tree": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.6.tgz", + "integrity": "sha512-LFrA98Dw/heXqDojz7qKFdygZmFoiVlvE1Zp7Cq2cvF+ZA+03Gmhy0k0PQlsC1jvHPiTUSs+pDHEuSWv6+6D7w==", + "dev": true + }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, + "remark-parse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-5.0.0.tgz", + "integrity": "sha512-b3iXszZLH1TLoyUzrATcTQUZrwNl1rE70rVdSruJFlDaJ9z5aMkhrG43Pp68OgfHndL/ADz6V69Zow8cTQu+JA==", + "dev": true, + "requires": { + "collapse-white-space": "^1.0.2", + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "is-word-character": "^1.0.0", + "markdown-escapes": "^1.0.0", + "parse-entities": "^1.1.0", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "^1.0.0", + "unherit": "^1.0.4", + "unist-util-remove-position": "^1.0.0", + "vfile-location": "^2.0.0", + "xtend": "^4.0.1" + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1565,6 +2225,18 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "reserved-words": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/reserved-words/-/reserved-words-0.1.2.tgz", + "integrity": "sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=", + "dev": true + }, "resolve": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", @@ -1597,22 +2269,6 @@ "dev": true, "requires": { "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } } }, "run-async": { @@ -1633,6 +2289,15 @@ "tslib": "^1.9.0" } }, + "safe-regex": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.0.2.tgz", + "integrity": "sha512-rRALJT0mh4qVFIJ9HvfjKDN77F9vp7kltOpFFI/8e6oKyHFmmxz4aSkY/YVauRDe7U0RrHdw9Lsxdel3E19s0A==", + "dev": true, + "requires": { + "regexp-tree": "~0.1.1" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1721,6 +2386,12 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "state-toggle": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.1.tgz", + "integrity": "sha512-Qe8QntFrrpWTnHwvwj2FZTgv+PKIsp0B9VxLzLLbSpPXWOgRgc5LVj/aTiSfK1RqIeF9jeC1UeOH8Q8y60A7og==", + "dev": true + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -1815,7 +2486,7 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, @@ -1828,12 +2499,39 @@ "os-tmpdir": "~1.0.2" } }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", + "dev": true + }, + "trim-trailing-lines": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.1.tgz", + "integrity": "sha512-bWLv9BbWbbd7mlqqs2oQYnLD/U/ZqeJeJwbO0FG2zA1aTq+HTvxfHNKFa/HGCVyJpDiioUYaBhfiT6rgk+l4mg==", + "dev": true + }, + "trough": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.3.tgz", + "integrity": "sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==", + "dev": true + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, + "tsutils": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.10.0.tgz", + "integrity": "sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -1849,6 +2547,75 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "typescript": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", + "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", + "dev": true + }, + "unherit": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.1.tgz", + "integrity": "sha512-+XZuV691Cn4zHsK0vkKYwBEwB74T3IZIcxrgn2E4rKwTfFyI1zCh7X7grwh9Re08fdPlarIdyWgI8aVB3F5A5g==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "xtend": "^4.0.1" + } + }, + "unified": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-6.2.0.tgz", + "integrity": "sha512-1k+KPhlVtqmG99RaTbAv/usu85fcSRu3wY8X+vnsEhIxNP5VbVIDiXnLqyKIG+UMdyTg0ZX9EI6k2AfjJkHPtA==", + "dev": true, + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^1.1.0", + "trough": "^1.0.0", + "vfile": "^2.0.0", + "x-is-string": "^0.1.0" + } + }, + "unist-util-is": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-2.1.2.tgz", + "integrity": "sha512-YkXBK/H9raAmG7KXck+UUpnKiNmUdB+aBGrknfQ4EreE1banuzrKABx3jP6Z5Z3fMSPMQQmeXBlKpCbMwBkxVw==", + "dev": true + }, + "unist-util-remove-position": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.2.tgz", + "integrity": "sha512-XxoNOBvq1WXRKXxgnSYbtCF76TJrRoe5++pD4cCBsssSiWSnPEktyFrFLE8LTk3JW5mt9hB0Sk5zn4x/JeWY7Q==", + "dev": true, + "requires": { + "unist-util-visit": "^1.1.0" + } + }, + "unist-util-stringify-position": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", + "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==", + "dev": true + }, + "unist-util-visit": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.0.tgz", + "integrity": "sha512-FiGu34ziNsZA3ZUteZxSFaczIjGmksfSgdKqBfOejrrfzyUy5b7YrlzT1Bcvi+djkYDituJDy2XB7tGTeBieKw==", + "dev": true, + "requires": { + "unist-util-visit-parents": "^2.0.0" + } + }, + "unist-util-visit-parents": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.0.1.tgz", + "integrity": "sha512-6B0UTiMfdWql4cQ03gDTCSns+64Zkfo2OCbK31Ov0uMizEz+CJeAp0cgZVb5Fhmcd7Bct2iRNywejT0orpbqUA==", + "dev": true, + "requires": { + "unist-util-is": "^2.1.2" + } + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -1868,6 +2635,66 @@ "spdx-expression-parse": "^3.0.0" } }, + "vfile": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.3.0.tgz", + "integrity": "sha512-ASt4mBUHcTpMKD/l5Q+WJXNtshlWxOogYyGYYrg4lt/vuRjC1EFQtlAofL5VmtVNIZJzWYFJjzGWZ0Gw8pzW1w==", + "dev": true, + "requires": { + "is-buffer": "^1.1.4", + "replace-ext": "1.0.0", + "unist-util-stringify-position": "^1.0.0", + "vfile-message": "^1.0.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + } + } + }, + "vfile-location": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.4.tgz", + "integrity": "sha512-KRL5uXQPoUKu+NGvQVL4XLORw45W62v4U4gxJ3vRlDfI9QsT4ZN1PNXn/zQpKUulqGDpYuT0XDfp5q9O87/y/w==", + "dev": true + }, + "vfile-message": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", + "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", + "dev": true, + "requires": { + "unist-util-stringify-position": "^1.1.1" + } + }, + "vue-eslint-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz", + "integrity": "sha512-JlHVZwBBTNVvzmifwjpZYn0oPWH2SgWv5dojlZBsrhablDu95VFD+hriB1rQGwbD+bms6g+rAFhQHk6+NyiS6g==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.1.0", + "esquery": "^1.0.1", + "lodash": "^4.17.11" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -1960,6 +2787,18 @@ "mkdirp": "^0.5.1" } }, + "x-is-string": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", + "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/package.json b/package.json index 9ed827f8..159e45cc 100644 --- a/package.json +++ b/package.json @@ -32,24 +32,38 @@ } ], "main": "./lib", + "browserslist": ["node >= 6.0.0"], "dependencies": { "@passport-next/passport-strategy": "1.x.x" }, "devDependencies": { + "@mysticatea/eslint-plugin": "^10.0.3", "@passport-next/chai-passport-strategy": "1.x.x", "chai": "4.x.x", "chai-connect-middleware": "0.x.x", "eslint": "^5.16.0", "eslint-config-airbnb-base": "13.x.x", + "eslint-config-ash-nazg": "^4.0.0", + "eslint-config-standard": "^12.0.0", + "eslint-plugin-compat": "^3.1.1", + "eslint-plugin-eslint-comments": "^3.1.1", "eslint-plugin-import": "^2.17.2", + "eslint-plugin-jsdoc": "^4.8.3", + "eslint-plugin-markdown": "^1.0.0", + "eslint-plugin-no-use-extend-native": "^0.4.0", + "eslint-plugin-node": "^9.0.1", + "eslint-plugin-promise": "^4.1.1", + "eslint-plugin-standard": "^4.0.0", + "eslint-plugin-unicorn": "^8.0.2", "make-node": "^0.4.6", - "mocha": "6.x.x" + "mocha": "6.x.x", + "typescript": "^3.4.5" }, "engines": { "node": ">=6.0.0" }, "scripts": { - "spec": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js", + "spec": "mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js", "lint": "eslint --ext .js . --max-warnings 0", "lintfix": "eslint --ext .js . --fix", "test": "npm run lint && npm run spec" diff --git a/test/authenticator.framework.test.js b/test/authenticator.framework.test.js index fde410a5..6d966341 100644 --- a/test/authenticator.framework.test.js +++ b/test/authenticator.framework.test.js @@ -1,4 +1,5 @@ /* eslint-disable no-shadow */ +'use strict'; const Authenticator = require('../lib/authenticator'); diff --git a/test/authenticator.middleware.test.js b/test/authenticator.middleware.test.js index c741c99a..519ca5db 100644 --- a/test/authenticator.middleware.test.js +++ b/test/authenticator.middleware.test.js @@ -1,5 +1,7 @@ /* eslint-disable no-shadow */ +'use strict'; + const chai = require('chai'); const Authenticator = require('../lib/authenticator'); diff --git a/test/authenticator.test.js b/test/authenticator.test.js index d813651c..15a27bfc 100644 --- a/test/authenticator.test.js +++ b/test/authenticator.test.js @@ -1,3 +1,5 @@ +'use strict'; + const Authenticator = require('../lib/authenticator'); @@ -32,9 +34,10 @@ describe('Authenticator', () => { }); describe('with registered name', () => { - function Strategy() { + class Strategy { + // eslint-disable-next-line class-methods-use-this + authenticate() {} } - Strategy.prototype.authenticate = function authenticate() {}; const authenticator = new Authenticator(); authenticator.use('foo', new Strategy()); @@ -65,9 +68,10 @@ describe('Authenticator', () => { }); it('should throw if lacking a name', () => { - function Strategy() { + class Strategy { + // eslint-disable-next-line class-methods-use-this + authenticate() {} } - Strategy.prototype.authenticate = function authenticate() {}; expect(() => { const authenticator = new Authenticator(); @@ -78,9 +82,10 @@ describe('Authenticator', () => { describe('#unuse', () => { - function Strategy() { + class Strategy { + // eslint-disable-next-line class-methods-use-this + authenticate() {} } - Strategy.prototype.authenticate = function authenticate() {}; const authenticator = new Authenticator(); authenticator.use('one', new Strategy()); diff --git a/test/bootstrap/node.js b/test/bootstrap/node.js index 7ea8dd1c..3d78739f 100644 --- a/test/bootstrap/node.js +++ b/test/bootstrap/node.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); chai.use(require('chai-connect-middleware')); diff --git a/test/http/request.test.js b/test/http/request.test.js index c8bf0d2e..c243ad5b 100644 --- a/test/http/request.test.js +++ b/test/http/request.test.js @@ -1,8 +1,10 @@ +'use strict'; + const http = require('http'); const { Passport } = require('../..'); const initialize = require('../../lib/middleware/initialize'); -function setup() { +function setupPassport() { const passport = new Passport(); const req = new http.IncomingMessage(); const middleware = initialize(passport); @@ -12,7 +14,7 @@ function setup() { describe('http.ServerRequest', () => { describe('prototoype', () => { - const { req } = setup(); + const { req } = setupPassport(); it('should be extended with login', () => { expect(req.login).to.be.an('function'); expect(req.login).to.equal(req.logIn); @@ -34,7 +36,7 @@ describe('http.ServerRequest', () => { describe('#login', () => { describe('not establishing a session', () => { - const { req } = setup(); + const { req } = setupPassport(); req._passport.session = {}; let error; @@ -72,7 +74,7 @@ describe('http.ServerRequest', () => { }); describe('not establishing a session and setting custom user property', () => { - const { req, passport } = setup(); + const { req, passport } = setupPassport(); req._passport.session = {}; passport._userProperty = 'currentUser'; let error; @@ -116,7 +118,7 @@ describe('http.ServerRequest', () => { }); describe('not establishing a session and invoked without a callback', () => { - const { req } = setup(); + const { req } = setupPassport(); req._passport.session = {}; const user = { id: '1', username: 'root' }; @@ -142,7 +144,7 @@ describe('http.ServerRequest', () => { }); describe('not establishing a session, without passport.initialize() middleware', () => { - const { req } = setup(); + const { req } = setupPassport(); let error; before((done) => { @@ -174,7 +176,7 @@ describe('http.ServerRequest', () => { }); describe('establishing a session', () => { - const { req, passport } = setup(); + const { req, passport } = setupPassport(); passport.serializeUser((user, done) => { done(null, user.id); }); @@ -213,7 +215,7 @@ describe('http.ServerRequest', () => { }); describe('establishing a session and setting custom user property', () => { - const { req, passport } = setup(); + const { req, passport } = setupPassport(); passport.serializeUser((user, done) => { done(null, user.id); }); @@ -259,7 +261,7 @@ describe('http.ServerRequest', () => { }); describe('encountering an error when serializing to session', () => { - const { req, passport } = setup(); + const { req, passport } = setupPassport(); req._passport.session = {}; passport.serializeUser((user, done) => { done(new Error('something went wrong')); @@ -300,7 +302,7 @@ describe('http.ServerRequest', () => { }); describe('establishing a session, but not passing a callback argument', () => { - const { req, passport } = setup(); + const { req, passport } = setupPassport(); passport.serializeUser((user, done) => { done(null, user.id); }); @@ -318,7 +320,7 @@ describe('http.ServerRequest', () => { describe('#logout', () => { describe('existing session', () => { - const { req } = setup(); + const { req } = setupPassport(); req.user = { id: '1', username: 'root' }; req._passport.session = {}; req._passport.session.user = '1'; @@ -344,7 +346,7 @@ describe('http.ServerRequest', () => { }); describe('existing session and clearing custom user property', () => { - const { req } = setup(); + const { req } = setupPassport(); req.currentUser = { id: '1', username: 'root' }; req._passport.instance._userProperty = 'currentUser'; req._passport.session = {}; @@ -371,7 +373,7 @@ describe('http.ServerRequest', () => { }); describe('existing session, without passport.initialize() middleware', () => { - const { req } = setup(); + const { req } = setupPassport(); req.user = { id: '1', username: 'root' }; req.logout(); @@ -393,7 +395,7 @@ describe('http.ServerRequest', () => { describe('#isAuthenticated', () => { describe('with a user', () => { - const { req } = setup(); + const { req } = setupPassport(); req.user = { id: '1', username: 'root' }; it('should be authenticated', () => { @@ -405,7 +407,7 @@ describe('http.ServerRequest', () => { }); describe('with a user set on custom property', () => { - const { req } = setup(); + const { req } = setupPassport(); req.currentUser = { id: '1', username: 'root' }; req._passport.instance._userProperty = 'currentUser'; @@ -418,7 +420,7 @@ describe('http.ServerRequest', () => { }); describe('without a user', () => { - const { req } = setup(); + const { req } = setupPassport(); it('should not be authenticated', () => { // eslint-disable-next-line no-unused-expressions @@ -429,7 +431,7 @@ describe('http.ServerRequest', () => { }); describe('with a null user', () => { - const { req } = setup(); + const { req } = setupPassport(); req.user = null; it('should not be authenticated', () => { diff --git a/test/middleware/authenticate.error.callback.test.js b/test/middleware/authenticate.error.callback.test.js index 7ccbb0a2..e52df8ed 100644 --- a/test/middleware/authenticate.error.callback.test.js +++ b/test/middleware/authenticate.error.callback.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const { Passport } = require('../..'); const authenticate = require('../../lib/middleware/authenticate'); diff --git a/test/middleware/authenticate.error.test.js b/test/middleware/authenticate.error.test.js index cf7dc644..3982b1cd 100644 --- a/test/middleware/authenticate.error.test.js +++ b/test/middleware/authenticate.error.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.fail.callback.test.js b/test/middleware/authenticate.fail.callback.test.js index ff2f2a49..8d36465d 100644 --- a/test/middleware/authenticate.fail.callback.test.js +++ b/test/middleware/authenticate.fail.callback.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.fail.flash.test.js b/test/middleware/authenticate.fail.flash.test.js index d47c2fee..62da8859 100644 --- a/test/middleware/authenticate.fail.flash.test.js +++ b/test/middleware/authenticate.fail.flash.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.fail.message.test.js b/test/middleware/authenticate.fail.message.test.js index 07230746..4653303e 100644 --- a/test/middleware/authenticate.fail.message.test.js +++ b/test/middleware/authenticate.fail.message.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.fail.multi.test.js b/test/middleware/authenticate.fail.multi.test.js index 63d81223..b0a2cca5 100644 --- a/test/middleware/authenticate.fail.multi.test.js +++ b/test/middleware/authenticate.fail.multi.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.fail.test.js b/test/middleware/authenticate.fail.test.js index f467e436..04b5d1d2 100644 --- a/test/middleware/authenticate.fail.test.js +++ b/test/middleware/authenticate.fail.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.pass.test.js b/test/middleware/authenticate.pass.test.js index 54cab400..81875c90 100644 --- a/test/middleware/authenticate.pass.test.js +++ b/test/middleware/authenticate.pass.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.redirect.test.js b/test/middleware/authenticate.redirect.test.js index 5da2e079..98555629 100644 --- a/test/middleware/authenticate.redirect.test.js +++ b/test/middleware/authenticate.redirect.test.js @@ -1,5 +1,7 @@ /* eslint-disable no-shadow */ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.success.callback.test.js b/test/middleware/authenticate.success.callback.test.js index 08373eb7..67f44ed5 100644 --- a/test/middleware/authenticate.success.callback.test.js +++ b/test/middleware/authenticate.success.callback.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); const { Passport } = require('../..'); diff --git a/test/middleware/authenticate.success.flash.test.js b/test/middleware/authenticate.success.flash.test.js index 165d5f56..47afd5c8 100644 --- a/test/middleware/authenticate.success.flash.test.js +++ b/test/middleware/authenticate.success.flash.test.js @@ -1,4 +1,5 @@ /* eslint-disable no-shadow */ +'use strict'; const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); diff --git a/test/middleware/authenticate.success.info.test.js b/test/middleware/authenticate.success.info.test.js index fa5143aa..f4e00da8 100644 --- a/test/middleware/authenticate.success.info.test.js +++ b/test/middleware/authenticate.success.info.test.js @@ -1,4 +1,5 @@ /* eslint-disable no-shadow */ +'use strict'; const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); diff --git a/test/middleware/authenticate.success.message.test.js b/test/middleware/authenticate.success.message.test.js index 420117d1..8dd7c9a1 100644 --- a/test/middleware/authenticate.success.message.test.js +++ b/test/middleware/authenticate.success.message.test.js @@ -1,4 +1,5 @@ /* eslint-disable no-shadow */ +'use strict'; const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); diff --git a/test/middleware/authenticate.success.multi.test.js b/test/middleware/authenticate.success.multi.test.js index 03215550..7f8f1484 100644 --- a/test/middleware/authenticate.success.multi.test.js +++ b/test/middleware/authenticate.success.multi.test.js @@ -1,4 +1,5 @@ /* eslint-disable no-shadow */ +'use strict'; const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); diff --git a/test/middleware/authenticate.success.test.js b/test/middleware/authenticate.success.test.js index d8d367da..becfb4b7 100644 --- a/test/middleware/authenticate.success.test.js +++ b/test/middleware/authenticate.success.test.js @@ -1,4 +1,5 @@ /* eslint-disable no-shadow */ +'use strict'; const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); diff --git a/test/middleware/authenticate.test.js b/test/middleware/authenticate.test.js index 7e0d6740..fcf82039 100644 --- a/test/middleware/authenticate.test.js +++ b/test/middleware/authenticate.test.js @@ -1,4 +1,5 @@ /* eslint-disable no-shadow */ +'use strict'; const chai = require('chai'); const authenticate = require('../../lib/middleware/authenticate'); diff --git a/test/middleware/initialize.test.js b/test/middleware/initialize.test.js index 4bba1377..9abde8a4 100644 --- a/test/middleware/initialize.test.js +++ b/test/middleware/initialize.test.js @@ -1,3 +1,5 @@ +'use strict'; + const chai = require('chai'); const { Passport } = require('../..'); const initialize = require('../../lib/middleware/initialize'); diff --git a/test/package.test.js b/test/package.test.js index 2eb8bf81..380b96c3 100644 --- a/test/package.test.js +++ b/test/package.test.js @@ -1,3 +1,5 @@ +'use strict'; + const passport = require('..'); describe('passport', () => { diff --git a/test/strategies/session.test.js b/test/strategies/session.test.js index ec2eabf3..81ecdf3e 100644 --- a/test/strategies/session.test.js +++ b/test/strategies/session.test.js @@ -1,4 +1,5 @@ /* eslint-disable no-shadow */ +'use strict'; const chai = require('chai'); const SessionStrategy = require('../../lib/strategies/session'); @@ -41,9 +42,9 @@ describe('SessionStrategy', () => { }); describe('handling a request with a login session', () => { - const strategy = new SessionStrategy(((user, req, done) => { + const strategy = new SessionStrategy((user, req, done) => { done(null, { id: user }); - })); + }); let request; let pass = false; @@ -76,17 +77,15 @@ describe('SessionStrategy', () => { }); it('should maintain session', () => { - // eslint-disable-next-line no-underscore-dangle expect(request._passport.session).to.be.an('object'); - // eslint-disable-next-line no-underscore-dangle expect(request._passport.session.user).to.equal('123456'); }); }); describe('handling a request with a login session serialized to 0', () => { - const strategy = new SessionStrategy(((user, req, done) => { + const strategy = new SessionStrategy((user, req, done) => { done(null, { id: user }); - })); + }); let request; let pass = false; @@ -125,9 +124,9 @@ describe('SessionStrategy', () => { }); describe('handling a request with a login session that has been invalidated', () => { - const strategy = new SessionStrategy(((user, req, done) => { + const strategy = new SessionStrategy((user, req, done) => { done(null, false); - })); + }); let request; let pass = false; @@ -167,9 +166,9 @@ describe('SessionStrategy', () => { }); describe('handling a request with a login session and setting custom user property', () => { - const strategy = new SessionStrategy(((user, req, done) => { + const strategy = new SessionStrategy((user, req, done) => { done(null, { id: user }); - })); + }); let request; let pass = false; @@ -183,7 +182,6 @@ describe('SessionStrategy', () => { .req((req) => { request = req; - // eslint-disable-next-line no-underscore-dangle req._passport = {}; req._passport.instance = {}; req._passport.instance._userProperty = 'currentUser'; @@ -210,9 +208,9 @@ describe('SessionStrategy', () => { }); describe('handling a request with a login session that encounters an error when deserializing', () => { - const strategy = new SessionStrategy(((user, req, done) => { + const strategy = new SessionStrategy((user, req, done) => { done(new Error('something went wrong')); - })); + }); let request; let error;