chore(lint): migrate from standard to neostandard & upgrade eslint to v9 (#2316)

This commit is contained in:
Mallepally Lokeshwar Reddy 2025-10-06 18:30:01 +05:30 committed by GitHub
parent 2b0bd9f6e4
commit b2c1408701
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 21 additions and 13 deletions

View File

@ -1,2 +0,0 @@
pino.d.ts
test/types/pino.test-d.ts

View File

@ -1,8 +0,0 @@
{
"extends": [
"standard"
],
"rules": {
"no-var": "off"
}
}

19
eslint.config.js Normal file
View File

@ -0,0 +1,19 @@
'use strict'
const { defineConfig, globalIgnores } = require('eslint/config')
const neostandard = require('neostandard')
module.exports = defineConfig([
neostandard({}),
globalIgnores([
'pino.d.ts',
'test/types/pino.test-d.ts',
'test/fixtures/syntax-error-esm.mjs',
'test/fixtures/ts/*cjs',
]),
{
rules: {
'no-var': 'off',
},
},
])

View File

@ -204,7 +204,6 @@ function _asJson (obj, msg, num, time) {
case 'function':
break
case 'number':
/* eslint no-fallthrough: "off" */
if (Number.isFinite(value) === false) {
value = null
}

View File

@ -71,8 +71,7 @@
"bunyan": "^1.8.14",
"debug": "^4.3.4",
"docsify-cli": "^4.4.4",
"eslint": "^8.17.0",
"eslint-config-standard": "^17.0.0",
"eslint": "^9.37.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "15.7.0",
"eslint-plugin-node": "^11.1.0",
@ -85,6 +84,7 @@
"log": "^6.0.0",
"loglevel": "^1.6.7",
"midnight-smoker": "1.1.1",
"neostandard": "^0.12.2",
"pino-pretty": "^13.0.0",
"pre-commit": "^1.2.2",
"proxyquire": "^2.1.3",