diff --git a/README.md b/README.md index 08e56dd..82dec10 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![CI](https://github.com/fastify/fastify-env/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/fastify-env/actions/workflows/ci.yml) [![NPM version](https://img.shields.io/npm/v/@fastify/env.svg?style=flat)](https://www.npmjs.com/package/@fastify/env) -[![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 to check environment variables diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..89fd678 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + ignores: require('neostandard').resolveIgnoresFromGitignore(), + ts: true +}) diff --git a/package.json b/package.json index bce86f1..f71bf75 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "types": "types/index.d.ts", "scripts": { "coverage": "cross-env VALUE_FROM_ENV=pippo c8 --reporter=html node --test", - "lint": "standard | snazzy", - "lint:fix": "standard --fix", + "lint": "eslint", + "lint:fix": "eslint --fix", "test": "npm run test:unit && npm run test:typescript", "test:typescript": "tsd", "test:unit": "c8 --100 cross-env VALUE_FROM_ENV=pippo node --test" @@ -33,11 +33,10 @@ "devDependencies": { "@fastify/pre-commit": "^2.1.0", "@types/node": "^22.0.0", + "c8": "^10.1.2", "cross-env": "^7.0.3", "fastify": "^5.0.0", - "snazzy": "^9.0.0", - "standard": "^17.1.0", - "c8": "^10.1.2", + "neostandard": "^0.11.9", "tsd": "^0.31.0" }, "pre-commit": [ diff --git a/types/index.d.ts b/types/index.d.ts index 7f29e8c..7d5cda9 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,5 +1,5 @@ -import { EnvSchemaOpt } from "env-schema" -import { FastifyPluginCallback } from "fastify" +import { EnvSchemaOpt } from 'env-schema' +import { FastifyPluginCallback } from 'fastify' declare module 'fastify' { export interface FastifyInstance { @@ -29,6 +29,5 @@ declare namespace fastifyEnv { export { fastifyEnv as default } } -declare function fastifyEnv(...params: Parameters): ReturnType +declare function fastifyEnv (...params: Parameters): ReturnType export = fastifyEnv - diff --git a/types/index.test-d.ts b/types/index.test-d.ts index 58486b6..ee7012c 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -1,4 +1,4 @@ -import Fastify, {FastifyInstance, FastifyRequest} from 'fastify' +import Fastify, { FastifyInstance, FastifyRequest } from 'fastify' import { expectDeprecated, expectType } from 'tsd' import fastifyEnv, { FastifyEnvOptions, fastifyEnvOpt } from '..'