Skip to content

Commit 43ac5c2

Browse files
authored
build(deps-dev): replace standard with neostandard (#254)
* build(deps-dev): replace standard with neostandard * chore: add eslint.config.js
1 parent 5d1479d commit 43ac5c2

File tree

7 files changed

+24
-17
lines changed

7 files changed

+24
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![CI](https://github.com/fastify/fastify-plugin/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/fastify-plugin/actions/workflows/ci.yml)
44
[![NPM version](https://img.shields.io/npm/v/fastify-plugin.svg?style=flat)](https://www.npmjs.com/package/fastify-plugin)
5-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)
5+
[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)
66

77
`fastify-plugin` is a plugin helper for [Fastify](https://github.com/fastify/fastify).
88

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
'use strict'
2+
3+
module.exports = require('neostandard')({
4+
ignores: require('neostandard').resolveIgnoresFromGitignore(),
5+
ts: true
6+
})

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"type": "commonjs",
77
"types": "types/plugin.d.ts",
88
"scripts": {
9-
"lint": "standard",
9+
"lint": "eslint",
10+
"lint:fix": "eslint --fix",
1011
"test": "npm run test:unit && npm run test:typescript",
1112
"test:unit": "c8 --100 node --test",
1213
"test:coverage": "c8 node --test && c8 report --reporter=html",
@@ -33,8 +34,8 @@
3334
"@types/node": "^22.0.0",
3435
"c8": "^10.1.2",
3536
"fastify": "^5.0.0",
37+
"neostandard": "^0.11.9",
3638
"proxyquire": "^2.1.3",
37-
"standard": "^17.1.0",
3839
"tsd": "^0.31.0"
3940
}
4041
}

types/example-async.test-d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FastifyPluginAsync } from "fastify";
1+
import { FastifyPluginAsync } from 'fastify'
22

3-
type FastifyExampleAsync = FastifyPluginAsync<fastifyExampleAsync.FastifyExampleAsyncOptions>;
3+
type FastifyExampleAsync = FastifyPluginAsync<fastifyExampleAsync.FastifyExampleAsyncOptions>
44

55
declare namespace fastifyExampleAsync {
66

@@ -14,6 +14,6 @@ declare namespace fastifyExampleAsync {
1414
export { fastifyExampleAsync as default }
1515
}
1616

17-
declare function fastifyExampleAsync(...params: Parameters<FastifyExampleAsync>): ReturnType<FastifyExampleAsync>
17+
declare function fastifyExampleAsync (...params: Parameters<FastifyExampleAsync>): ReturnType<FastifyExampleAsync>
1818

1919
export default fastifyExampleAsync

types/example-callback.test-d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FastifyPluginCallback } from "fastify";
1+
import { FastifyPluginCallback } from 'fastify'
22

3-
type FastifyExampleCallback = FastifyPluginCallback<fastifyExampleCallback.FastifyExampleCallbackOptions>;
3+
type FastifyExampleCallback = FastifyPluginCallback<fastifyExampleCallback.FastifyExampleCallbackOptions>
44

55
declare namespace fastifyExampleCallback {
66

@@ -14,6 +14,6 @@ declare namespace fastifyExampleCallback {
1414
export { fastifyExampleCallback as default }
1515
}
1616

17-
declare function fastifyExampleCallback(...params: Parameters<FastifyExampleCallback>): ReturnType<FastifyExampleCallback>
17+
declare function fastifyExampleCallback (...params: Parameters<FastifyExampleCallback>): ReturnType<FastifyExampleCallback>
1818

1919
export default fastifyExampleCallback

types/plugin.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ declare function fastifyPlugin<
5353
TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
5454
Logger extends FastifyBaseLogger = FastifyBaseLogger,
5555
Fn extends FastifyPluginCallback<Options, RawServer, TypeProvider, Logger> | FastifyPluginAsync<Options, RawServer, TypeProvider, Logger> = FastifyPluginCallback<Options, RawServer, TypeProvider, Logger>
56-
>(
56+
> (
5757
fn: Fn extends unknown ? Fn extends (...args: any) => Promise<any> ? FastifyPluginAsync<Options, RawServer, TypeProvider, Logger> : FastifyPluginCallback<Options, RawServer, TypeProvider, Logger> : Fn,
5858
options?: fastifyPlugin.PluginMetadata | string
59-
): Fn;
59+
): Fn
6060

6161
export = fastifyPlugin

types/plugin.test-d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import fastifyPlugin from '..';
2-
import fastify, { FastifyPluginCallback, FastifyPluginAsync, FastifyError, FastifyInstance, FastifyPluginOptions, RawServerDefault, FastifyTypeProviderDefault, FastifyBaseLogger } from 'fastify';
1+
import fastifyPlugin from '..'
2+
import fastify, { FastifyPluginCallback, FastifyPluginAsync, FastifyError, FastifyInstance, FastifyPluginOptions, RawServerDefault, FastifyTypeProviderDefault, FastifyBaseLogger } from 'fastify'
33
import { expectAssignable, expectError, expectNotType, expectType } from 'tsd'
4-
import { Server } from "node:https"
5-
import { TypeBoxTypeProvider } from "@fastify/type-provider-typebox"
6-
import fastifyExampleCallback from './example-callback.test-d';
7-
import fastifyExampleAsync from './example-async.test-d';
4+
import { Server } from 'node:https'
5+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox'
6+
import fastifyExampleCallback from './example-callback.test-d'
7+
import fastifyExampleAsync from './example-async.test-d'
88

99
interface Options {
1010
foo: string

0 commit comments

Comments
 (0)