Skip to content

🐛 Bug: ESLint failures creating a new repo with blockESLintPlugin #2195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
JoshuaKGoldberg opened this issue Apr 9, 2025 · 1 comment · Fixed by #2196
Closed
3 tasks done

🐛 Bug: ESLint failures creating a new repo with blockESLintPlugin #2195

JoshuaKGoldberg opened this issue Apr 9, 2025 · 1 comment · Fixed by #2196
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

Creating a new ESLint plugin built on CTA's Everything preset should succeed:

npx create-typescript-app --preset everything --add-eslint-plugin --exclude-example-files --directory eslint-plugin-cta-example --title eslint-plugin-cta-example --description "Example ESLint plugin built with create-typescript-app. 🔌"

Actual

┌  ✨ [email protected] ✨
│
●  Learn more on:
│    https://github.com/JoshuaKGoldberg/create-typescript-app
│
◇  Running with mode --setup using the template:
│    create-typescript-app
│
◇  Inferred default options from system
│
◇  Created repository on GitHub
│
◇  Ran the Create TypeScript App template
│
◇  Prepared local repository
│
│  You've got a new repository ready to use in:
│    ./eslint-plugin-cta-example
│  
│  It's also pushed to GitHub on:
│    https://github.com/bingo-examples/eslint-plugin-cta-example
│
■  The pnpm lint --fix script failed. You should re-run it and fix its complaints.
│  ExecaError: Command failed with exit code 1: pnpm lint --fix
│  
│  
│  > [email protected] lint /Users/josh/repos/eslint-plugin-cta-example
│  > eslint . --max-warnings 0 --fix
│  
│  
│  /Users/josh/repos/eslint-plugin-cta-example/src/rules/example.test.ts
│    1:22  error  Can't resolve './enums.js' in '/Users/josh/repos/eslint-plugin-cta-example/src/rules'  n/no-missing-import
│    4:1   error  Unsafe call of a(n) `error` type typed value                                           @typescript-eslint/no-unsafe-call
│    4:12  error  Unsafe member access .run on an `error` typed value                                    @typescript-eslint/no-unsafe-member-access
│  
│  /Users/josh/repos/eslint-plugin-cta-example/src/rules/example.ts
│    3:14  error  Unsafe assignment of an error typed value       @typescript-eslint/no-unsafe-assignment
│    3:21  error  Unsafe call of a(n) `error` type typed value    @typescript-eslint/no-unsafe-call
│    7:5   error  Unsafe call of a(n) `any` typed value           @typescript-eslint/no-unsafe-call
│    7:13  error  Unsafe member access .report on an `any` value  @typescript-eslint/no-unsafe-member-access
│    9:6   error  Unsafe assignment of an `any` value             @typescript-eslint/no-unsafe-assignment
│  
│  /Users/josh/repos/eslint-plugin-cta-example/src/rules/index.ts
│    4:2  error  Unsafe assignment of an error typed value  @typescript-eslint/no-unsafe-assignment
│  
│  /Users/josh/repos/eslint-plugin-cta-example/src/rules/ruleTester.ts
│    1:28  error  Can't resolve '@typescript-eslint/rule-tester' in '/Users/josh/repos/eslint-plugin-cta-example/src/rules'  n/no-missing-import
│    4:12  error  Unsafe member access .afterAll on an `error` typed value                                                   @typescript-eslint/no-unsafe-member-access
│    5:12  error  Unsafe member access .it on an `error` typed value                                                         @typescript-eslint/no-unsafe-member-access
│    6:12  error  Unsafe member access .itOnly on an `error` typed value                                                     @typescript-eslint/no-unsafe-member-access
│    7:12  error  Unsafe member access .describe on an `error` typed value                                                   @typescript-eslint/no-unsafe-member-access
│    9:14  error  Unsafe assignment of an error typed value                                                                  @typescript-eslint/no-unsafe-assignment
│    9:27  error  Unsafe construction of a(n) `error` type typed value                                                       @typescript-eslint/no-unsafe-call
│  
│  /Users/josh/repos/eslint-plugin-cta-example/src/utils.ts
│    1:29  error  Can't resolve '@typescript-eslint/utils' in '/Users/josh/repos/eslint-plugin-cta-example/src'  n/no-missing-import
│    3:14  error  Unsafe assignment of an error typed value                                                      @typescript-eslint/no-unsafe-assignment
│    3:27  error  Unsafe call of a(n) `error` type typed value                                                   @typescript-eslint/no-unsafe-call
│    3:39  error  Unsafe member access .RuleCreator on an `error` typed value                                    @typescript-eslint/no-unsafe-member-access
│    5:87  error  Invalid type "any" of template literal expression                                              @typescript-eslint/restrict-template-expressions
│  
│  ✖ 21 problems (21 errors, 0 warnings)
│  
│  \u2009ELIFECYCLE\u2009 Command failed with exit code 1.
│      at getFinalError (file:///Users/josh/repos/create-typescript-app/node_modules/.pnpm/[email protected]/node_modules/execa/lib/return/final-error.js:6:9)
│      at makeError (file:///Users/josh/repos/create-typescript-app/node_modules/.pnpm/[email protected]/node_modules/execa/lib/return/result.js:108:16)
│      at getAsyncResult (file:///Users/josh/repos/create-typescript-app/node_modules/.pnpm/[email protected]/node_modules/execa/lib/methods/main-async.js:167:4)
│      at handlePromise (file:///Users/josh/repos/create-typescript-app/node_modules/.pnpm/[email protected]/node_modules/execa/lib/methods/main-async.js:150:17)
│      at async runCommand (file:///Users/josh/repos/create-typescript-app/node_modules/.pnpm/[email protected]/node_modules/bingo/lib/runners/applyScriptsToSystem.js:10:24)
│      at async file:///Users/josh/repos/create-typescript-app/node_modules/.pnpm/[email protected]/node_modules/bingo/lib/runners/applyScriptsToSystem.js:22:17
│      at async Promise.all (index 1)
│      at async applyScriptsToSystem (file:///Users/josh/repos/create-typescript-app/node_modules/.pnpm/[email protected]/node_modules/bingo/lib/runners/applyScriptsToSystem.js:20:9)
│      at async Promise.all (index 0)
│      at async runCreation (file:///Users/josh/repos/create-typescript-app/node_modules/.pnpm/[email protected]/node_modules/bingo/lib/runners/runCreation.js:8:5)
│
└  Thanks for using create-typescript-app! 💝

Be sure to:

- enable the GitHub apps on https://github.com/bingo-examples/eslint-plugin-cta-example/settings/installations:
   - Codecov (https://github.com/apps/codecov)
   - Renovate (https://github.com/apps/renovate)
- populate the secrets on https://github.com/bingo-examples/eslint-plugin-cta-example/settings/secrets/actions:
   - ACCESS_TOKEN (a GitHub PAT with repo and workflow permissions)
   - NPM_TOKEN (an npm access token with automation permissions)

Additional Info

🎁

@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :( labels Apr 9, 2025
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Apr 9, 2025
Copy link

github-actions bot commented Apr 9, 2025

🎉 This is included in version v2.40.1 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant