mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 04:34:15 -04:00
(ts) disable noUncheckedIndexedAccess because of the huge count of errors
https://nuxt.com/docs/4.x/getting-started/upgrade#default-typescript-configuration-changes
This commit is contained in:
parent
8e6f812a9a
commit
72d574a039
@ -1,4 +0,0 @@
|
||||
{
|
||||
// necessary for a peculiar edge case where the symlinked locale to data/ yields an error with ESLint
|
||||
"extends": "../tsconfig.json"
|
||||
}
|
@ -61,6 +61,13 @@ if (process.platform === 'win32') {
|
||||
__dirname = __dirname.slice(1);
|
||||
}
|
||||
|
||||
const tsConfig = {
|
||||
compilerOptions: {
|
||||
allowImportingTsExtensions: true,
|
||||
noUncheckedIndexedAccess: false,
|
||||
},
|
||||
};
|
||||
|
||||
const esBuildOptions = {
|
||||
supported: {
|
||||
'top-level-await': true,
|
||||
@ -120,6 +127,9 @@ export default defineNuxtConfig({
|
||||
},
|
||||
compatibilityDate: '2024-07-06',
|
||||
nitro: {
|
||||
typescript: {
|
||||
tsConfig,
|
||||
},
|
||||
rollupConfig: {
|
||||
external: [
|
||||
'canvas',
|
||||
@ -220,12 +230,7 @@ export default defineNuxtConfig({
|
||||
typescript: {
|
||||
typeCheck: !process.env.RUN_SNAPSHOT_TESTS &&
|
||||
(process.env.APP_ENV || process.env.NODE_ENV) !== 'production',
|
||||
tsConfig: {
|
||||
compilerOptions: {
|
||||
baseUrl: './',
|
||||
allowImportingTsExtensions: true,
|
||||
},
|
||||
},
|
||||
tsConfig,
|
||||
},
|
||||
postcss: {
|
||||
plugins: {
|
||||
@ -235,6 +240,11 @@ export default defineNuxtConfig({
|
||||
},
|
||||
},
|
||||
hooks: {
|
||||
'prepare:types'({ nodeTsConfig, sharedTsConfig }) {
|
||||
// somewhy, allowImportingTsExtensions is ignored in Nuxt
|
||||
nodeTsConfig.compilerOptions = { ...nodeTsConfig.compilerOptions, ...tsConfig.compilerOptions };
|
||||
sharedTsConfig.compilerOptions = { ...sharedTsConfig.compilerOptions, ...tsConfig.compilerOptions };
|
||||
},
|
||||
async 'pages:extend'(routes) {
|
||||
for (const code of codes) {
|
||||
for (const subroute of configByLocale[code].nouns.subroutes || []) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user