fix(nextjs): add eslint plugin dependencies in application and library generators (#30592)
This commit is contained in:
parent
27b78cd7ae
commit
6e50a011e7
@ -99,6 +99,7 @@ export async function addLinting(
|
||||
addDependenciesToPackageJson(host, extraEslintDependencies.dependencies, {
|
||||
...extraEslintDependencies.devDependencies,
|
||||
'eslint-config-next': eslintConfigNextVersion,
|
||||
'@next/eslint-plugin-next': eslintConfigNextVersion,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@ -93,6 +93,7 @@ export async function normalizeOptions(
|
||||
projectName: appProjectName,
|
||||
projectSimpleName: projectNames.projectSimpleName,
|
||||
style: options.style || 'css',
|
||||
swc: options.swc ?? true,
|
||||
styledModule,
|
||||
unitTestRunner: options.unitTestRunner || 'jest',
|
||||
importPath,
|
||||
|
||||
@ -60,6 +60,7 @@ export async function libraryGeneratorInternal(host: Tree, rawOptions: Schema) {
|
||||
const devDependencies: Record<string, string> = {};
|
||||
if (options.linter === 'eslint') {
|
||||
devDependencies['eslint-config-next'] = eslintConfigNextVersion;
|
||||
devDependencies['@next/eslint-plugin-next'] = eslintConfigNextVersion;
|
||||
}
|
||||
|
||||
if (options.unitTestRunner && options.unitTestRunner !== 'none') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user