Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ The following environment variables should be provided when running the server (
| `NODE_SMTP_USERNAME` | SMTP username for sending emails. |
| `NODE_SMTP_PASSWORD` | SMTP password for sending emails. |
| `NODE_SIGHTING_EMAIL` | Email address to send sightings to. |
| `LOGTAIL_SOURCE_TOKEN` | Token for Better Stack Logs. |

## Development

Expand Down
44 changes: 30 additions & 14 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginJS from '@eslint/js';
import pluginTS from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
import pluginReactHooks from 'eslint-plugin-react-hooks';
import pluginNext from '@next/eslint-plugin-next';
import pluginJest from 'eslint-plugin-jest';

const recommendedConfigs = [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginJS.configs.recommended,
...pluginTS.configs.recommended,
pluginReact.configs.flat.recommended,
pluginJest.configs['flat/recommended'],

// Custom config until packages support flat configs
{
files: ['src/**/*.{js,ts,jsx,tsx}'],
plugins: {
'react-hooks': pluginReactHooks,
'@next/next': pluginNext,
},
rules: {
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
...pluginReactHooks.configs.recommended.rules,
...pluginNext.configs.recommended.rules,
},
},
];

const customConfigs = [
Expand All @@ -15,8 +34,8 @@ const customConfigs = [
},
{
ignores: [
".next/",
"coverage/",
'.next/',
'coverage/',
],
},
{
Expand All @@ -27,14 +46,11 @@ const customConfigs = [
},
},
{
languageOptions: { globals: {...globals.browser, ...globals.node} },
},
{
rules: {
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-require-imports': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
];
Expand Down
2 changes: 2 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-require-imports */

process.env.NODE_CONTENTFUL_SPACE_ID = 'mocked-contentful-space-id';
process.env.NODE_CONTENTFUL_ENVIRONMENT = 'mocked-contentful-environment';
process.env.NODE_CONTENTFUL_DELIVERY_API_TOKEN = 'mocked-contentful-delivery-api-token';
Expand Down
10 changes: 4 additions & 6 deletions next.config.js → next.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/** @type {import('next').NextConfig} */
import type { NextConfig } from 'next';

const { withLogtail } = require('@logtail/next');
import redirects from './redirects.json';

const redirects = require('./redirects.json');

const nextConfig = {
const nextConfig: NextConfig = {
reactStrictMode: true,
poweredByHeader: false,
experimental: {
Expand Down Expand Up @@ -50,4 +48,4 @@ const nextConfig = {
},
};

module.exports = withLogtail(nextConfig);
module.exports = nextConfig;
Loading
Loading