Skip to content

Tune ESLint object/type literal wrapping for multiline indentation - #177

Open
neSpecc with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-object-indentations
Open

Tune ESLint object/type literal wrapping for multiline indentation#177
neSpecc with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-object-indentations

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

ESLint was allowing awkward mixed-line formatting for object literals and TypeScript type literals, which prevented IDE autofix from consistently expanding multiline structures into one-property-per-line blocks. This updates the shared package ESLint configs so multiline objects and TS return type literals wrap cleanly, while single-property forms can remain inline.

  • ESLint codestyle override

    • Add an explicit @stylistic/object-curly-newline override to each package eslint.config.mjs
    • Require line breaks for multiline:
      • object expressions
      • object patterns
      • TypeScript type literals
    • Preserve inline formatting for single-property cases
  • Formatting outcome

    • IDE formatting and eslint --fix now normalize previously accepted forms like:
mockCurrentSelection({
  isBlockIndex: true,
  blockIndex: 1,
});

function dispatchCopyEvent(): {
  preventDefault: jest.Mock;
  setData: jest.Mock;
} {
}
  • Scope
    • Applies consistently across all package-local ESLint configs in the monorepo so the formatting behavior is uniform regardless of workspace

Copilot AI linked an issue Jul 21, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix object properties indentations in code style Tune ESLint object/type literal wrapping for multiline indentation Jul 21, 2026
Copilot AI requested a review from neSpecc July 21, 2026 16:07
@neSpecc
neSpecc marked this pull request as ready for review July 21, 2026 18:03
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Unit Tests

Package Coverage Delta
@editorjs/collaboration-manager 85.81% 0% ⚪️
@editorjs/model 98.25% 0% ⚪️
@editorjs/core 89.55% 0% ⚪️
@editorjs/dom-adapters 86.95% 0% ⚪️
@editorjs/ot-server 20% 0% ⚪️

Mutation Tests

Package Mutation score Dashboard URL
@editorjs/collaboration-manager No files to mutate found.
@editorjs/core No files to mutate found.
@editorjs/dom-adapters No files to mutate found.
@editorjs/model No files to mutate found.

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.

chore(codestyle): fix object indentations

2 participants