From d38be81fe737b9f7ab312d7626ffb000d3506041 Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Fri, 6 Dec 2024 17:57:19 -0800 Subject: [PATCH] feat: use eslint 9 for new studios --- .../cli/src/actions/init-project/bootstrapLocalTemplate.ts | 4 ++-- packages/@sanity/cli/src/studioDependencies.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@sanity/cli/src/actions/init-project/bootstrapLocalTemplate.ts b/packages/@sanity/cli/src/actions/init-project/bootstrapLocalTemplate.ts index 1029ef80d63..a635d5c792d 100644 --- a/packages/@sanity/cli/src/actions/init-project/bootstrapLocalTemplate.ts +++ b/packages/@sanity/cli/src/actions/init-project/bootstrapLocalTemplate.ts @@ -138,8 +138,8 @@ export async function bootstrapLocalTemplate( writeFileIfNotExists(`sanity.cli.${codeExt}`, cliConfig), writeFileIfNotExists('package.json', packageManifest), writeFileIfNotExists( - '.eslintrc', - `${JSON.stringify({extends: '@sanity/eslint-config-studio'}, null, 2)}\n`, + 'eslint.config.mjs', + `import studio from '@sanity/eslint-config-studio'\n\nexport default [...studio]\n`, ), ]) diff --git a/packages/@sanity/cli/src/studioDependencies.ts b/packages/@sanity/cli/src/studioDependencies.ts index 0adcfce5c5a..4c37da4e6b8 100644 --- a/packages/@sanity/cli/src/studioDependencies.ts +++ b/packages/@sanity/cli/src/studioDependencies.ts @@ -18,7 +18,7 @@ export const studioDependencies = { '@sanity/eslint-config-studio': 'latest', // When using typescript, we'll want the these types too, so might as well install them '@types/react': '^18.0.25', - 'eslint': '^8.6.0', + 'eslint': '^9.9.0', 'prettier': '^3.0.2', 'typescript': '^5.1.6', // Peer dependency of eslint-config-studio (implicitly) },