Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 78d2bca

Browse files
Kerumenrakannimer
authored andcommitted
chore(docz-core): copy .eslintignore from project (#1201)
1 parent c10de98 commit 78d2bca

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/docz-core/src/bundler/machine/services/create-resources.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ const writeEslintRc = async ({ isDoczRepo }: ServerMachineCtx) => {
4949
await fs.outputJSON(filepath, { extends: 'react-app' })
5050
}
5151

52+
const copyEslintIgnore = async () => {
53+
const filename = '.eslintignore'
54+
const filepath = path.join(paths.root, filename)
55+
const dest = path.join(paths.docz, filename)
56+
57+
if (fs.pathExistsSync(filepath)) {
58+
await fs.copy(filepath, dest)
59+
}
60+
}
61+
5262
export const writeNotFound = async () => {
5363
const outputPath = path.join(paths.docz, 'src/pages/404.js')
5464
await outputFileFromTemplate('404.tpl.js', outputPath, {})
@@ -99,6 +109,7 @@ export const createResources = async (ctx: ServerMachineCtx) => {
99109
copyDoczRc(ctx.args.config)
100110
await copyAndModifyPkgJson(ctx)
101111
await writeEslintRc(ctx)
112+
await copyEslintIgnore()
102113
await writeNotFound()
103114
await writeGatsbyConfig(ctx)
104115
await writeGatsbyConfigNode()

0 commit comments

Comments
 (0)