Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 13, 2025

Overview

Changes the default quote style preference from double quotes to single quotes when creating new adapters, while keeping the option to select double quotes available.

Motivation

Most existing ioBroker adapters use single quotes, and the @iobroker/eslint-config package defaults to single quotes as well. This change aligns the default behavior with the broader ioBroker ecosystem, making it easier for new users to create adapters that match existing conventions.

Changes

  • Updated the default value for the quotes question from "double" to "single" in src/lib/core/questions.ts
  • Updated the fallback value in templates/prettier.config.mjs.ts to ensure single quotes are used when answers.quotes is undefined
  • Updated test baseline expectations to reflect the new default
  • Regenerated baseline test files to match the new default behavior

Impact

  • New users: Will now default to single quotes when creating adapters
  • Existing users: No impact - can still select double quotes if preferred
  • Migration: No impact - the migration logic still correctly detects quote style from existing code

Testing

  • ✅ All 63 unit tests pass
  • ✅ All 50 baseline integration tests pass
  • ✅ Linting passes
  • ✅ Build completes successfully
  • ✅ Template generation and type-checking verified

Fixes the issue by implementing the requested change with minimal modifications to the codebase.

Original prompt

This section details on the original issue you should resolve

<issue_title>Change default to use single quotes</issue_title>
<issue_description>The default value for quotes should be changed to single quotes.
The selection should be kept available.

Most adapters / repositories use single quotes ciurrently. And eslint-config defaults to single quotes too.
So it makes sense (in my oppinion) to default to singel quotes for new users / new repositories while keeping the optin for usere who really wnat to use double quotes tos elect them.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #1189


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

- Updated default value in src/lib/core/questions.ts
- Updated fallback value in templates/prettier.config.mjs.ts
- Updated test baseAnswers to use single quotes
- Explicitly set double quotes for test that requires it
- Regenerated baseline test files with new default

Co-authored-by: Apollon77 <[email protected]>
@Copilot Copilot AI changed the title [WIP] Change default quote style to single quotes Change default quote style from double to single quotes Oct 13, 2025
@Copilot Copilot AI requested a review from Apollon77 October 13, 2025 14:42
Copilot finished work on behalf of Apollon77 October 13, 2025 14:42
@Apollon77 Apollon77 marked this pull request as ready for review October 14, 2025 06:57
@Apollon77 Apollon77 enabled auto-merge (squash) October 14, 2025 07:07
@Apollon77 Apollon77 merged commit af8b7cd into master Oct 14, 2025
6 checks passed
@Apollon77 Apollon77 deleted the copilot/change-default-to-single-quotes branch October 14, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change default to use single quotes

2 participants