Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to neostandard #462

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict'

module.exports = require('neostandard')({
noJsx: true,
ts: true,
})
21 changes: 5 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
"types": "types/index.d.ts",
"scripts": {
"coverage": "npm run test:unit -- --coverage-report=html",
"lint": "npm run lint:javascript && npm run lint:typescript",
"lint:javascript": "standard | snazzy",
"lint:fix": "standard --fix && npm run lint:typescript -- --fix",
"lint:typescript": "eslint -c .eslintrc.json types/**/*.d.ts types/**/*.test-d.ts",
"lint": "eslint",
"lint:fix": "eslint --fix",
"test": "npm run test:unit && npm run test:typescript",
"test:typescript": "tsd",
"test:unit": "tap",
Expand Down Expand Up @@ -42,29 +40,20 @@
"@fastify/compress": "^8.0.0-pre.fv5.1",
"@fastify/pre-commit": "^2.1.0",
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"concat-stream": "^2.0.0",
"eslint": "^9.9.0",
"fastify": "^5.0.0-alpha.3",
"handlebars": "^4.7.8",
"neostandard": "^0.11.3",
"pino": "^9.1.0",
"proxyquire": "^2.1.3",
"simple-get": "^4.0.1",
"snazzy": "^9.0.0",
"standard": "^17.1.0",
"tap": "^18.7.1",
"tsd": "^0.31.0",
"typescript": "^5.4.3"
"tsd": "^0.31.0"
},
"tsd": {
"directory": "test/types"
},
"eslintConfig": {
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
}
},
"publishConfig": {
"access": "public"
}
Expand Down
10 changes: 0 additions & 10 deletions tsconfig.eslint.json

This file was deleted.

6 changes: 3 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare module 'fastify' {
}
}

type FastifyStaticPlugin = FastifyPluginAsync<NonNullable<fastifyStatic.FastifyStaticOptions>>;
type FastifyStaticPlugin = FastifyPluginAsync<NonNullable<fastifyStatic.FastifyStaticOptions>>

declare namespace fastifyStatic {
export interface SetHeadersResponse {
Expand Down Expand Up @@ -119,6 +119,6 @@ declare namespace fastifyStatic {
export { fastifyStatic as default }
}

declare function fastifyStatic(...params: Parameters<FastifyStaticPlugin>): ReturnType<FastifyStaticPlugin>;
declare function fastifyStatic (...params: Parameters<FastifyStaticPlugin>): ReturnType<FastifyStaticPlugin>

export = fastifyStatic;
export = fastifyStatic
2 changes: 1 addition & 1 deletion types/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import fastifyStatic, {
fastifyStatic as fastifyStaticNamed
} from '..'

import fastifyStaticCjsImport = require('..');
import fastifyStaticCjsImport = require('..')
const fastifyStaticCjs = require('..')

const app: FastifyInstance = fastify()
Expand Down