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, {
|
addDependenciesToPackageJson(host, extraEslintDependencies.dependencies, {
|
||||||
...extraEslintDependencies.devDependencies,
|
...extraEslintDependencies.devDependencies,
|
||||||
'eslint-config-next': eslintConfigNextVersion,
|
'eslint-config-next': eslintConfigNextVersion,
|
||||||
|
'@next/eslint-plugin-next': eslintConfigNextVersion,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,7 @@ export async function normalizeOptions(
|
|||||||
projectName: appProjectName,
|
projectName: appProjectName,
|
||||||
projectSimpleName: projectNames.projectSimpleName,
|
projectSimpleName: projectNames.projectSimpleName,
|
||||||
style: options.style || 'css',
|
style: options.style || 'css',
|
||||||
|
swc: options.swc ?? true,
|
||||||
styledModule,
|
styledModule,
|
||||||
unitTestRunner: options.unitTestRunner || 'jest',
|
unitTestRunner: options.unitTestRunner || 'jest',
|
||||||
importPath,
|
importPath,
|
||||||
|
|||||||
@ -60,6 +60,7 @@ export async function libraryGeneratorInternal(host: Tree, rawOptions: Schema) {
|
|||||||
const devDependencies: Record<string, string> = {};
|
const devDependencies: Record<string, string> = {};
|
||||||
if (options.linter === 'eslint') {
|
if (options.linter === 'eslint') {
|
||||||
devDependencies['eslint-config-next'] = eslintConfigNextVersion;
|
devDependencies['eslint-config-next'] = eslintConfigNextVersion;
|
||||||
|
devDependencies['@next/eslint-plugin-next'] = eslintConfigNextVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.unitTestRunner && options.unitTestRunner !== 'none') {
|
if (options.unitTestRunner && options.unitTestRunner !== 'none') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user