Skip to content

Commit 5587737

Browse files
authored
build(deps-dev): replace standard with neostandard (#421)
1 parent 5c985cb commit 5587737

File tree

24 files changed

+135
-130
lines changed

24 files changed

+135
-130
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![CI](https://github.com/fastify/fastify-autoload/workflows/CI/badge.svg)
44
[![NPM version](https://img.shields.io/npm/v/@fastify/autoload.svg?style=flat)](https://www.npmjs.com/package/@fastify/autoload)
5-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)
5+
[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)
66

77
Convenience plugin for Fastify that loads all plugins found in a directory and automatically configures routes matching the folder structure.
88

eslint.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict'
2+
3+
module.exports = require('neostandard')({
4+
ignores: [
5+
...require('neostandard').resolveIgnoresFromGitignore(),
6+
'test/commonjs/syntax-error/lib/a.js',
7+
'test/issues/369/invalid-autohooks',
8+
'test/issues/369/non-SyntaxError'
9+
],
10+
ts: true
11+
})

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"type": "commonjs",
77
"types": "types/index.d.ts",
88
"scripts": {
9-
"lint": "standard | snazzy",
10-
"lint:fix": "standard --fix | snazzy",
9+
"lint": "eslint",
10+
"lint:fix": "eslint --fix",
1111
"test": "npm run typescript && npm run typescript:jest && npm run typescript:swc-node-register && npm run typescript:tsm && npm run typescript:tsx && npm run typescript:vitest && npm run typescript:esbuild && npm run unit",
1212
"typescript": "tsd",
1313
"typescript:jest": "jest",
@@ -56,8 +56,7 @@
5656
"fastify": "^5.0.0",
5757
"fastify-plugin": "^5.0.0",
5858
"jest": "^29.7.0",
59-
"snazzy": "^9.0.0",
60-
"standard": "^17.1.0",
59+
"neostandard": "^0.11.9",
6160
"tap": "^19.0.2",
6261
"ts-jest": "^29.1.4",
6362
"ts-node": "^10.9.2",
@@ -70,11 +69,6 @@
7069
"vite": "^5.2.12",
7170
"vitest": "^2.0.3"
7271
},
73-
"standard": {
74-
"ignore": [
75-
"test/*/*-error/lib/a.js"
76-
]
77-
},
7872
"jest": {
7973
"preset": "ts-jest",
8074
"testEnvironment": "node",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = async (fastify) => {
2-
fastify.get("/", function () {
3-
return { foo: "bar" };
2+
fastify.get('/', function () {
3+
return { foo: 'bar' }
44
})
5-
};
5+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = async (fastify) => {
2-
fastify.get("/", function () {
3-
return { hello: "world" };
2+
fastify.get('/', function () {
3+
return { hello: 'world' }
44
})
5-
};
5+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports.default = async (fastify: any) => {
2-
fastify.get("/", function () {
3-
return { bar: "bar" };
2+
fastify.get('/', function () {
3+
return { bar: 'bar' }
44
})
5-
};
5+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports.default = async (fastify: any) => {
2-
fastify.get("/customPath", function () {
3-
return { baz: "baz" };
2+
fastify.get('/customPath', function () {
3+
return { baz: 'baz' }
44
})
5-
};
5+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports.default = async (fastify: any) => {
2-
fastify.get("/", function () {
3-
return { foo: "foo" };
2+
fastify.get('/', function () {
3+
return { foo: 'foo' }
44
})
5-
};
5+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports.default = async (fastify: any) => {
2-
fastify.get("/", function () {
3-
return { hello: "world" };
2+
fastify.get('/', function () {
3+
return { hello: 'world' }
44
})
5-
};
5+
}

test/issues/369/routes/.autohooks.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports = async function (app, opts) {
44
app.addHook('onRequest', async (req, reply) => {
5-
req.hooked = req.hooked || []
6-
req.hooked.push('root')
7-
})
5+
req.hooked = req.hooked || []
6+
req.hooked.push('root')
7+
})
88
}

0 commit comments

Comments
 (0)