Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
schehata committed Sep 1, 2022
1 parent db0bc5d commit 37b51f1
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion examples/with-axiom/middleware.ts
Expand Up @@ -2,7 +2,7 @@ import { NextResponse } from 'next/server'
import { log, withAxiom } from 'next-axiom'

async function middleware() {
log.info("Hello from middleware", { 'bar': 'baz' })
log.info('Hello from middleware', { bar: 'baz' })
return NextResponse.next()
}

Expand Down
5 changes: 5 additions & 0 deletions examples/with-axiom/next-env.d.ts
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
2 changes: 1 addition & 1 deletion examples/with-axiom/next.config.js
@@ -1,4 +1,4 @@
const { withAxiom } = require('next-axiom');
const { withAxiom } = require('next-axiom')

/** @type {import('next').NextConfig} */
const nextConfig = withAxiom({
Expand Down
2 changes: 1 addition & 1 deletion examples/with-axiom/package.json
Expand Up @@ -18,4 +18,4 @@
"@types/node": "^16.11.26",
"typescript": "^4.7.4"
}
}
}
4 changes: 2 additions & 2 deletions examples/with-axiom/pages/api/hello.ts
@@ -1,9 +1,9 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'
import { log, withAxiom } from 'next-axiom';
import { log, withAxiom } from 'next-axiom'

async function handler(req: NextApiRequest, res: NextApiResponse) {
log.info('Hello from function', { url: req.url });
log.info('Hello from function', { url: req.url })
res.status(200).json({ name: 'John Doe' })
}

Expand Down
6 changes: 3 additions & 3 deletions examples/with-axiom/pages/index.tsx
Expand Up @@ -10,9 +10,9 @@ export const getStaticProps = async (ctx: GetStaticPropsContext) => {
}

const fetcher = async (...args: any[]) => {
log.info('Hello from SWR', { args });
const res = await fetch.apply(null, [...args]);
return await res.json();
log.info('Hello from SWR', { args })
const res = await fetch.apply(null, [...args])
return await res.json()
}

const Home = () => {
Expand Down
16 changes: 3 additions & 13 deletions examples/with-axiom/tsconfig.json
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
Expand All @@ -18,12 +14,6 @@
"isolatedModules": true,
"jsx": "preserve"
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

0 comments on commit 37b51f1

Please sign in to comment.