Skip to content

Commit

Permalink
Merge pull request #442 from hodcroftlab/400-fix-linting
Browse files Browse the repository at this point in the history
400 fix linting
  • Loading branch information
AdvancedCodingMonkey authored Dec 10, 2024
2 parents fc4bbdc + 866f39b commit c17bbf0
Show file tree
Hide file tree
Showing 139 changed files with 1,089 additions and 645 deletions.
2 changes: 1 addition & 1 deletion web/config/next/lib/addWebpackPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { NextConfig } from 'next'
import type { WebpackConfigContext } from 'next/dist/server/config-shared'
import type { Compiler, Configuration, WebpackPluginFunction, WebpackPluginInstance } from 'webpack'
Expand All @@ -7,6 +6,7 @@ import { addWebpackConfig } from './addWebpackConfig'

export function addWebpackPlugin(
nextConfig: NextConfig,
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents,@typescript-eslint/no-explicit-any
plugin: WebpackPluginInstance | WebpackPluginFunction | ((this: Compiler, compiler: Compiler) => void) | any,
) {
return addWebpackConfig(
Expand Down
1 change: 1 addition & 0 deletions web/config/next/withCopy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { NextConfig } from 'next'
// eslint-disable-next-line import/default
import CopyPlugin, { PluginOptions as CopyPluginOptions } from 'copy-webpack-plugin'
import { addWebpackPlugin } from './lib/addWebpackPlugin'

Expand Down
4 changes: 2 additions & 2 deletions web/config/next/withFriendlyConsole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ function cleanup() {
function stripProjectRoot(projectRoot: string) {
return (error: FriendlyErrorsWebpackPluginError) => ({
...error,
message: error && error.message && error.message.replace(`${projectRoot}/`, ''),
file: error && error.file && error.file.replace(`${projectRoot}/`, ''),
message: error?.message?.replace(`${projectRoot}/`, ''),
file: error?.file?.replace(`${projectRoot}/`, ''),
})
}

Expand Down
2 changes: 1 addition & 1 deletion web/config/next/withRobotsTxt.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NextConfig } from 'next'
import { addWebpackPlugin } from './lib/addWebpackPlugin'
import EmitFilePlugin from 'emit-file-webpack-plugin'
import { addWebpackPlugin } from './lib/addWebpackPlugin'

export const getWithRobotsTxt = (content: string) => (nextConfig: NextConfig) => {
return addWebpackPlugin(
Expand Down
2 changes: 1 addition & 1 deletion web/config/next/withTypeChecking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import path from 'path'
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'

import type { NextConfig } from 'next'
import { addWebpackPlugin } from './lib/addWebpackPlugin'

import { findModuleRoot } from '../../lib/findModuleRoot'
import tsConfig from '../../tsconfig.json'
import { addWebpackPlugin } from './lib/addWebpackPlugin'

const { moduleRoot } = findModuleRoot()

Expand Down
Loading

0 comments on commit c17bbf0

Please sign in to comment.