diff --git a/.codeclimate.yml b/.codeclimate.yml index c889eb8..563da6b 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,9 +1,9 @@ engines: eslint: enabled: true - channel: 'eslint-8' + channel: 'eslint-9' config: - config: '.eslintrc.yaml' + config: 'eslint.config.mjs' ratings: paths: diff --git a/.eslintrc.yaml b/.eslintrc.yaml deleted file mode 100644 index 035a400..0000000 --- a/.eslintrc.yaml +++ /dev/null @@ -1,7 +0,0 @@ -env: - node: true - es6: true - mocha: true - es2022: true - -extends: ['@haraka'] diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 1d2127c..0000000 --- a/.prettierrc +++ /dev/null @@ -1,2 +0,0 @@ -semi: false -singleQuote: true diff --git a/.release b/.release index afb1db8..0493593 160000 --- a/.release +++ b/.release @@ -1 +1 @@ -Subproject commit afb1db801607dda5e859f39b600f0dd0111e4651 +Subproject commit 0493593b975a438b3214ad30c49062af5bd57f55 diff --git a/CHANGELOG.md b/CHANGELOG.md index a0018ab..8301151 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). ### Unreleased +### [1.0.9] - 2025-01-26 + +- dep(eslint): upgrade to eslint 9 + ### [1.0.8] - 2024-10-01 - dep(nopt): 8.0.0 @@ -44,3 +48,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). [1.0.6]: https://github.com/haraka/haraka-plugin-dkim/releases/tag/v1.0.6 [1.0.7]: https://github.com/haraka/haraka-plugin-dkim/releases/tag/v1.0.7 [1.0.8]: https://github.com/haraka/haraka-plugin-dkim/releases/tag/v1.0.8 +[1.0.9]: https://github.com/haraka/haraka-plugin-dkim/releases/tag/v1.0.9 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 2ba43d5..412c3ff 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -2,7 +2,8 @@ This handcrafted artisinal software is brought to you by: -|
msimerson (8) |
offroadlabs (1) | +|
msimerson (9) |
offroadlabs (1) | | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -this file is maintained by [.release](https://github.com/msimerson/.release) +this file is generated by [.release](https://github.com/msimerson/.release). +Contribute to this project to get your GitHub profile included here. diff --git a/README.md b/README.md index 4533ad8..86c2d90 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ [![CI Test Status][ci-img]][ci-url] [![Code Climate][clim-img]][clim-url] -[![NPM][npm-img]][npm-url] - # haraka-plugin-dkim ## INSTALL @@ -149,5 +147,3 @@ This plugin and underlying library do not currently support DKIM body length lim [ci-url]: https://github.com/haraka/haraka-plugin-dkim/actions/workflows/ci.yml [clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-dkim/badges/gpa.svg [clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-dkim -[npm-img]: https://nodei.co/npm/haraka-plugin-dkim.png -[npm-url]: https://www.npmjs.com/package/haraka-plugin-dkim diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..52a5848 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,28 @@ +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 compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}) + +export default [ + ...compat.extends('@haraka'), + { + languageOptions: { + globals: { + ...globals.node, + ...globals.mocha, + }, + }, + rules: { + 'no-unused-vars': ['warn', { caughtErrorsIgnorePattern: '^ignore' }], + }, + }, +] diff --git a/index.js b/index.js index 170e8ba..4e89704 100644 --- a/index.js +++ b/index.js @@ -276,7 +276,7 @@ exports.get_sender_domain = function (connection) { let addrs try { addrs = addrparser.parse(from_hdr) - } catch (e) { + } catch (ignore) { connection.logerror( this, `address-rfc2822 failed to parse From header: ${from_hdr}`, diff --git a/package.json b/package.json index fa87075..1a73b7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "haraka-plugin-dkim", - "version": "1.0.8", + "version": "1.0.9", "description": "Haraka DKIM plugin", "bin": [ "dkim_key_gen.sh", @@ -17,8 +17,8 @@ ], "scripts": { "format": "npm run prettier:fix && npm run lint:fix", - "lint": "npx eslint@^8 *.js test", - "lint:fix": "npx eslint@^8 *.js test --fix", + "lint": "npx eslint@^9 *.js test", + "lint:fix": "npx eslint@^9 *.js test --fix", "prettier": "npx prettier . --check", "prettier:fix": "npx prettier . --write --log-level=warn", "test": "node --test", @@ -41,7 +41,7 @@ }, "homepage": "https://github.com/haraka/haraka-plugin-dkim#readme", "devDependencies": { - "@haraka/eslint-config": "1.1.5", + "@haraka/eslint-config": "^2.0.2", "haraka-test-fixtures": "1.3.7" }, "dependencies": { @@ -51,5 +51,9 @@ "haraka-email-message": "^1.2.3", "haraka-utils": "^1.1.3", "nopt": "^7.2.1" + }, + "prettier": { + "singleQuote": true, + "semi": false } }