From 4a98e54b9135b341777596cdb15b74adb0886aba Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sun, 8 Dec 2024 10:45:48 +0000 Subject: [PATCH 1/2] build(deps-dev): replace standard with neostandard --- README.md | 2 +- package.json | 6 +++--- types/index.d.ts | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4d2b8da..bde885a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![CI](https://github.com/fastify/process-warning/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/process-warning/actions/workflows/ci.yml) [![NPM version](https://img.shields.io/npm/v/process-warning.svg?style=flat)](https://www.npmjs.com/package/process-warning) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) +[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard) A small utility for generating consistent warning objects across your codebase. It also exposes a utility for emitting those warnings, guaranteeing that they are issued only once (unless configured otherwise). diff --git a/package.json b/package.json index 998d808..d562f88 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "type": "commonjs", "types": "types/index.d.ts", "scripts": { - "lint": "standard", - "lint:fix": "standard --fix", + "lint": "eslint", + "lint:fix": "eslint --fix", "test": "npm run test:unit && npm run test:jest && npm run test:typescript", "test:jest": "jest jest.test.js", "test:unit": "tap", @@ -36,7 +36,7 @@ "@fastify/pre-commit": "^2.1.0", "benchmark": "^2.1.4", "jest": "^29.7.0", - "standard": "^17.1.0", + "neostandard": "^0.11.9", "tap": "^18.7.2", "tsd": "^0.31.0" } diff --git a/types/index.d.ts b/types/index.d.ts index a11bab0..0728405 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -27,11 +27,11 @@ declare namespace processWarning { createDeprecation(params: DeprecationOptions): WarningItem; } - export function createWarning(params: WarningOptions): WarningItem; - export function createDeprecation(params: DeprecationOptions): WarningItem; + export function createWarning (params: WarningOptions): WarningItem + export function createDeprecation (params: DeprecationOptions): WarningItem - const processWarning: ProcessWarning; - export { processWarning as default }; + const processWarning: ProcessWarning + export { processWarning as default } } -export = processWarning; +export = processWarning From 214a418f61dd8e24ad429f490b6c352faa7e2e96 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sun, 8 Dec 2024 10:54:41 +0000 Subject: [PATCH 2/2] chore: add eslint.config.js --- eslint.config.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..89fd678 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + ts: true +})