fix: actually used Prettier in ESLint
This commit is contained in:
parent
e3a0a996fe
commit
db7e07bd1d
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
extends:
|
||||
- "@nuxtjs"
|
||||
- plugin:prettier/recommended
|
||||
plugins:
|
||||
- "@typescript-eslint"
|
||||
parserOptions:
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "4.20.0",
|
||||
"@typescript-eslint/parser": "4.20.0",
|
||||
"eslint": "7.23.0",
|
||||
"eslint-config-prettier": "8.1.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-prettier": "3.3.1",
|
||||
"nodemon": "2.0.7",
|
||||
"prettier": "2.2.1",
|
||||
|
|
|
@ -12,9 +12,7 @@ export function getErrorCb (port: number | string | boolean) {
|
|||
throw error
|
||||
}
|
||||
|
||||
const bind = typeof port === 'string'
|
||||
? 'Pipe ' + port
|
||||
: 'Port ' + port
|
||||
const bind = typeof port === 'string' ? 'Pipe ' + port : 'Port ' + port
|
||||
|
||||
// handle specific listen errors with friendly messages
|
||||
switch (error.code) {
|
||||
|
@ -42,9 +40,7 @@ export function getListeningCb (server: http.Server, debug: Debugger) {
|
|||
const addr = server.address()
|
||||
|
||||
if (addr) {
|
||||
const bind = typeof addr === 'string'
|
||||
? 'pipe ' + addr
|
||||
: 'port ' + addr.port
|
||||
const bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port
|
||||
debug('Listening on ' + bind)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { Application } from 'express'
|
||||
import { ApiHandler } from '../../types'
|
||||
import type { Application } from 'express'
|
||||
import type { ApiHandler } from '../../types'
|
||||
|
||||
import getEndpoints from './get'
|
||||
import deleteEndpoints from './delete'
|
||||
import postEndpoints from './post'
|
||||
|
@ -33,7 +34,7 @@ const methods: Method[] = [
|
|||
|
||||
export function registerApis(app: Application) {
|
||||
methods.forEach(({ method, endpoints }) => {
|
||||
endpoints.forEach((endpoint) => {
|
||||
endpoints.forEach(endpoint => {
|
||||
// @ts-ignore
|
||||
app[method](prependApiPath(endpoint.path), endpoint.handler)
|
||||
})
|
||||
|
|
|
@ -1116,7 +1116,7 @@ escape-string-regexp@^1.0.5:
|
|||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
|
||||
eslint-config-prettier@8.1.0:
|
||||
eslint-config-prettier@^8.1.0:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz#4ef1eaf97afe5176e6a75ddfb57c335121abc5a6"
|
||||
integrity sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==
|
||||
|
|
Loading…
Reference in New Issue