diff --git a/README.md b/README.md index 26e75a3..0329768 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![CI](https://github.com/fastify/fastify-zipkin/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/fastify-zipkin/actions/workflows/ci.yml) [![NPM version](https://img.shields.io/npm/v/@fastify/zipkin.svg?style=flat)](https://www.npmjs.com/package/@fastify/zipkin) -[![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) Fastify plugin for [Zipkin](https://zipkin.io/) distributed tracing system. diff --git a/package.json b/package.json index 4025081..5aa3ec0 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,12 @@ "type": "commonjs", "types": "types/index.d.ts", "scripts": { - "zipkin": "docker run -p 9411:9411 openzipkin/zipkin", - "lint": "standard", + "lint": "eslint", + "lint:fix": "eslint --fix", "test": "npm run test:unit && npm run test:typescript", "test:unit": "c8 --100 node --test", - "test:typescript": "tsd" + "test:typescript": "tsd", + "zipkin": "docker run -p 9411:9411 openzipkin/zipkin" }, "repository": { "type": "git", @@ -30,9 +31,9 @@ "@fastify/pre-commit": "2.2.0", "c8": "^10.1.2", "fastify": "^5.0.0", + "neostandard": "^0.11.9", "node-fetch": "^2.6.7", "sinon": "^19.0.2", - "standard": "^17.0.0", "tsd": "^0.31.0" }, "dependencies": { diff --git a/types/index.d.ts b/types/index.d.ts index 6109ffd..014ffd8 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,7 +1,7 @@ -import { FastifyPluginCallback } from 'fastify'; -import { Recorder, Tracer } from 'zipkin'; +import { FastifyPluginCallback } from 'fastify' +import { Recorder, Tracer } from 'zipkin' -type FastifyZipkin = FastifyPluginCallback; +type FastifyZipkin = FastifyPluginCallback declare namespace fastifyZipkin { export interface FastifyZipkinOptions { @@ -17,5 +17,5 @@ declare namespace fastifyZipkin { } -declare function fastifyZipkin(...params: Parameters): ReturnType +declare function fastifyZipkin (...params: Parameters): ReturnType export = fastifyZipkin diff --git a/types/index.test-d.ts b/types/index.test-d.ts index 4f88916..3cfb375 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -13,7 +13,9 @@ fastify.register(zipkinPlugin, { serviceName: 'test', httpReporterUrl: 'http://' fastify.register(zipkinPlugin, { serviceName: 'test', httpReporterUrl: 'http://', servicePort: 0 }) fastify.register(zipkinPlugin, { serviceName: 'test', httpReporterUrl: 'http://', recorder: new ConsoleRecorder() }) fastify.register(zipkinPlugin, { - serviceName: 'test', httpReporterUrl: 'http://', tracer: new Tracer({ + serviceName: 'test', + httpReporterUrl: 'http://', + tracer: new Tracer({ ctxImpl: new ExplicitContext(), recorder: new ConsoleRecorder() })