Skip to content

Commit 941a41f

Browse files
authored
fix(templates): add generated files to ESLint ignores (#15716)
Add payload-types.ts and payload-generated-schema.ts to ESLint ignores across all template eslint.config.mjs files to suppress 'Unused eslint-disable directive' warnings from auto-generated files. <img width="488" height="163" alt="image" src="https://github.com/user-attachments/assets/9e00dfc7-0b07-40cf-b4d0-15c85d76f963" />
1 parent c4375bd commit 941a41f

9 files changed

Lines changed: 11 additions & 8 deletions

File tree

templates/_template/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const eslintConfig = [
3131
},
3232
},
3333
{
34-
ignores: ['.next/'],
34+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
3535
},
3636
]
3737

templates/blank/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const eslintConfig = [
3131
},
3232
},
3333
{
34-
ignores: ['.next/'],
34+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
3535
},
3636
]
3737

templates/ecommerce/eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ const eslintConfig = [
3030
],
3131
},
3232
},
33+
{
34+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
35+
},
3336
]
3437

3538
export default eslintConfig

templates/website/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const eslintConfig = [
3131
},
3232
},
3333
{
34-
ignores: ['.next/'],
34+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
3535
},
3636
]
3737

templates/with-cloudflare-d1/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const eslintConfig = [
3232
},
3333
},
3434
{
35-
ignores: ['.next/'],
35+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
3636
},
3737
]
3838

templates/with-postgres/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const eslintConfig = [
3131
},
3232
},
3333
{
34-
ignores: ['.next/'],
34+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
3535
},
3636
]
3737

templates/with-vercel-mongodb/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const eslintConfig = [
3131
},
3232
},
3333
{
34-
ignores: ['.next/'],
34+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
3535
},
3636
]
3737

templates/with-vercel-postgres/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const eslintConfig = [
3131
},
3232
},
3333
{
34-
ignores: ['.next/'],
34+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
3535
},
3636
]
3737

templates/with-vercel-website/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const eslintConfig = [
3131
},
3232
},
3333
{
34-
ignores: ['.next/'],
34+
ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'],
3535
},
3636
]
3737

0 commit comments

Comments
 (0)