diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..7ecdd4dd --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,6 @@ +'use strict' + +module.exports = require('neostandard')({ + noJsx: true, + ts: true, +}) diff --git a/package.json b/package.json index 97c0bddd..c169c6ca 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" } diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json deleted file mode 100644 index 8acbb815..00000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "target": "es6", - "lib": ["ES2018"], - "module": "commonjs", - "noEmit": true, - "strict": true - }, - "include": ["types/*.test-d.ts", "types/*.d.ts"] -} diff --git a/types/index.d.ts b/types/index.d.ts index 0dd4cee4..1af2a6bc 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -16,7 +16,7 @@ declare module 'fastify' { } } -type FastifyStaticPlugin = FastifyPluginAsync>; +type FastifyStaticPlugin = FastifyPluginAsync> declare namespace fastifyStatic { export interface SetHeadersResponse { @@ -119,6 +119,6 @@ declare namespace fastifyStatic { export { fastifyStatic as default } } -declare function fastifyStatic(...params: Parameters): ReturnType; +declare function fastifyStatic (...params: Parameters): ReturnType -export = fastifyStatic; +export = fastifyStatic diff --git a/types/index.test-d.ts b/types/index.test-d.ts index ee01e208..75f21be0 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -8,7 +8,7 @@ import fastifyStatic, { fastifyStatic as fastifyStaticNamed } from '..' -import fastifyStaticCjsImport = require('..'); +import fastifyStaticCjsImport = require('..') const fastifyStaticCjs = require('..') const app: FastifyInstance = fastify()