This repository contains a simple React web app that demonstrates Mago’s PHP linter and formatter in the browser. It allows you to play with Mago’s capabilities without having to install anything locally.
Mago is a toolchain for formatting, linting, and analyzing PHP code. The goal is to provide a robust, modern approach to PHP language analysis.
- Browser-based: Instantly run Mago’s linter, and formatter from a web page.
- Live Examples: Switch between preloaded code samples or paste your own snippet for quick tests.
- Configurable Linter: Enable or disable specific plugins and rules at runtime.
-
Clone the repo:
git clone https://github.com/carthage-software/mago-playground.git cd mago-playground
-
Install dependencies:
npm install
-
Start the development server:
npm start
- WASM Integration: The project uses the compiled WebAssembly build of Mago for all PHP analysis.
- React Frontend: A simple React UI allows you to switch versions, manage linter rules, and preview the formatted code.
The project is hosted on GitHub Pages and is automatically deployed on every push to the main
branch.
Mago Playground is licensed under either of
- MIT License (MIT) - see LICENSE-MIT file for details
- Apache License, Version 2.0 (Apache-2.0) - see LICENSE-APACHE file for details
at your option.