Skip to content

v0.2.2

Choose a tag to compare

@ZtaMDev ZtaMDev released this 11 Jan 04:56
· 4 commits to main since this release

Release Notes - v0.2.2

round-core v0.2.2

New development ecosystem providing robust linting and formatting for .round files.

New Packages in @round-core

  • @round-core/shared: Core utilities including the SourceMapper and runPreprocess used by our tooling to ensure accurate source-to-generated mapping.
  • @round-core/lint: Official ESLint plugin for RoundJS.
    • Dynamic Global Injection: Automatically detects loop variables (like t in for (t in list)) and declares them as globals, eliminating false "undefined variable" errors.
    • 1:1 Line Mapping: Error highlights align perfectly with your source code, even after complex transformations.
    • Component Awareness: Prevents warnings for used JSX components within RoundJS blocks.
  • @round-core/prettier: Hybrid Prettier plugin that formats your code while preserving native RoundJS syntax.
    • Maintains the clean {for (...) { ... }} and {if (...) { ... }} structures.
    • Integrates seamlessly with standard Prettier workflows.

CLI Improvements

  • round init: Projects initialized with the CLI now come pre-configured with ESLint and Prettier out of the box.

Installation

Install the new developer tools:

npm install -D @round-core/lint @round-core/prettier

or with Bun:

bun add -d @round-core/lint @round-core/prettier

Configuration

eslint.config.js

import lintPlugin from "@round-core/lint";
import globals from "globals";
import * as espree from "espree";

export default [
  {
    files: ["**/*.round"],
    plugins: {
      "@round-core/lint": lintPlugin,
    },
    processor: lintPlugin.processors[".round"],
    rules: {
      "no-unused-vars": "warn",
      "no-undef": "error",
    },
    languageOptions: {
      parser: espree,
      ecmaVersion: "latest",
      sourceType: "module",
      globals: {
        ...globals.browser,
        ...globals.node,
      },
      parserOptions: {
        ecmaFeatures: {
          jsx: true,
        },
      },
    },
  },
];

.prettierrc

{
  "plugins": ["@round-core/prettier"],
  "overrides": [
    {
      "files": "*.round",
      "options": {
        "parser": "round"
      }
    }
  ]
}

VS Code Extension v0.1.9

Synchronized with the new linting and formatting ecosystem.

Improvements

  • Full ESLint Support: Diagnostics now use the official @round-core/lint processor for pixel-perfect error highlighting.
  • Stable Formatting: Prettier integration is now more robust, ensuring your code stays formatted without losing its RoundJS identity.
  • Auto-detection: The extension automatically leverages your local ESLint/Prettier configuration if present.