Skip to content

Commit

Permalink
build(deps-dev): replace standard with neostandard (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Dec 8, 2024
1 parent 3e4807f commit f77a829
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![CI](https://github.com/fastify/forwarded/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/forwarded/actions/workflows/ci.yml)
[![NPM version](https://img.shields.io/npm/v/@fastify/forwarded.svg?style=flat)](https://www.npmjs.com/package/@fastify/forwarded)
[![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)

Parse HTTP X-Forwarded-For header.

Expand Down
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')({
ignores: require('neostandard').resolveIgnoresFromGitignore(),
ts: true
})
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@types/node": "^22.0.0",
"benchmark": "2.1.4",
"c8": "^10.1.2",
"standard": "^17.1.0",
"neostandard": "^0.11.9",
"tsd": "^0.31.1"
},
"types": "types/index.d.ts",
Expand All @@ -39,8 +39,8 @@
"scripts": {
"bench": "node benchmark/index.js",
"bench:combined": "node benchmark/combined.js",
"lint": "standard",
"lint:fix": "standard --fix",
"lint": "eslint",
"lint:fix": "eslint --fix",
"test": "npm run test:unit && npm run test:typescript",
"test:unit": "c8 --100 node --test",
"test:typescript": "tsd"
Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IncomingMessage } from 'http';
import { IncomingMessage } from 'http'

type Forwarded = (req: IncomingMessage) => string[]

Expand All @@ -10,5 +10,5 @@ declare namespace forwarded {
/**
* Get all addresses in the request used in the `X-Forwarded-For` header.
*/
declare function forwarded(...params: Parameters<Forwarded>): ReturnType<Forwarded>
declare function forwarded (...params: Parameters<Forwarded>): ReturnType<Forwarded>
export = forwarded
10 changes: 5 additions & 5 deletions types/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IncomingMessage } from "http";
import { expectError, expectType } from "tsd";
import { forwarded } from "..";
import forwardedESM from "..";
import * as forwardedVarImport from "..";
import { IncomingMessage } from 'http'
import { expectError, expectType } from 'tsd'
import { forwarded } from '..'
import forwardedESM from '..'
import * as forwardedVarImport from '..'

expectType<string[]>(forwardedESM({} as IncomingMessage))
expectType<string[]>(forwarded({} as IncomingMessage))
Expand Down

0 comments on commit f77a829

Please sign in to comment.