Skip to content

Commit

Permalink
don't init during assignment to module.exports as TS compiler doesn…
Browse files Browse the repository at this point in the history
…'t associate the JSDoc type declaration properly
  • Loading branch information
fire332 committed Mar 31, 2024
1 parent 6622067 commit 687ac25
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
const config = {
root: true,

env: {
Expand Down Expand Up @@ -35,3 +35,5 @@ module.exports = {
'no-unmodified-loop-condition': 'error'
}
};

module.exports = config;
4 changes: 3 additions & 1 deletion .prettierrc.js → .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('prettier').Config} */
module.exports = {
const config = {
trailingComma: 'none',
singleQuote: true,
overrides: [
Expand All @@ -11,3 +11,5 @@ module.exports = {
}
]
};

export default config;
6 changes: 4 additions & 2 deletions webpack.config.js → webpack.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const CopyPlugin = require('copy-webpack-plugin');
import CopyPlugin from 'copy-webpack-plugin';

/** @type {(env: Record<string, string>) => (import('webpack').Configuration)[]} */
module.exports = () => [
const makeConfig = () => [
{
/**
* NOTE: Builds with devtool = 'eval' contain very big eval chunks which seem
Expand Down Expand Up @@ -57,3 +57,5 @@ module.exports = () => [
]
}
];

export default makeConfig;

0 comments on commit 687ac25

Please sign in to comment.