Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Jan 27, 2025
1 parent 6823322 commit 64da383
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 24 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This handcrafted artisinal software is brought to you by:

| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=msimerson">58</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/918201?v=4"><br><a href="https://github.com/DoobleD">DoobleD</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=DoobleD">2</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/7803873?v=4"><br><a href="https://github.com/zazapeta">zazapeta</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=zazapeta">1</a>)|
| :---: | :---: | :---: |
| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=msimerson">58</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/918201?v=4"><br><a href="https://github.com/DoobleD">DoobleD</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=DoobleD">2</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/7803873?v=4"><br><a href="https://github.com/zazapeta">zazapeta</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=zazapeta">1</a>) |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

<sub>this file is generated by [.release](https://github.com/msimerson/.release).
Contribute to this project to get your GitHub profile included here.</sub>
37 changes: 20 additions & 17 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import globals from 'globals'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default [...compat.extends("@haraka"), {
export default [
...compat.extends('@haraka'),
{
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},
globals: {
...globals.node,
...globals.mocha,
},
},
}];
},
]
21 changes: 16 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,16 @@ exports.load_redis_ini = function () {
delete plugin.redisCfg.db
}

plugin.redisCfg.server =
{ ...defaultOpts, ...plugin.redisCfg.opts, ...plugin.redisCfg.server };
plugin.redisCfg.pubsub =
{ ...defaultOpts, ...plugin.redisCfg.opts, ...plugin.redisCfg.pubsub };
plugin.redisCfg.server = {
...defaultOpts,
...plugin.redisCfg.opts,
...plugin.redisCfg.server,
}
plugin.redisCfg.pubsub = {
...defaultOpts,
...plugin.redisCfg.opts,
...plugin.redisCfg.pubsub,
}

// socket options. In redis < 4, the options like host and port were
// top level, now they're in socket.*. Permit legacy configs to still work
Expand Down Expand Up @@ -149,7 +155,12 @@ exports.init_redis_plugin = function (next, server) {
exports.shutdown = function () {
if (this.db) this.db.quit()

if (server && server.notes && server.notes.redis && server.notes.redis.isOpen) {
if (
server &&
server.notes &&
server.notes.redis &&
server.notes.redis.isOpen
) {
server.notes.redis.quit()
}
}
Expand Down

0 comments on commit 64da383

Please sign in to comment.