diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 72dcb5e..d93fe3e 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -2,28 +2,10 @@ env: node: true es6: true mocha: true - es2020: true + es2022: true -plugins: - - haraka - -extends: - - eslint:recommended - - plugin:haraka/recommended - -root: true +extends: '@haraka' rules: - no-var: warn - space-before-function-paren: warn - no-shadow: warn - dot-notation: warn indent: warn - -globals: - OK: true - CONT: true - DENY: true - DENYSOFT: true - DENYDISCONNECT: true - DENYSOFTDISCONNECT: true + no-unused-vars: 0 \ No newline at end of file diff --git a/.npmignore b/.gitignore similarity index 100% rename from .npmignore rename to .gitignore diff --git a/index.js b/index.js index 6a4626f..dceb182 100644 --- a/index.js +++ b/index.js @@ -23,14 +23,14 @@ exports.handle_authn = function (next, connection, params) { if (!connection.notes.authenticating) return next(); switch (connection.notes.auth_method) { - case AUTH_METHOD_LOGIN: - this.auth_login(next, connection, params); - break; - case AUTH_METHOD_PLAIN: - this.auth_plain(next, connection, params); - break; - default: - next(); + case AUTH_METHOD_LOGIN: + this.auth_login(next, connection, params); + break; + case AUTH_METHOD_PLAIN: + this.auth_plain(next, connection, params); + break; + default: + next(); } }