mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:42:02 +00:00
Re-style the Ruff playground (#1438)
This commit is contained in:
parent
057414ddd4
commit
acf0b82f19
28 changed files with 2218 additions and 398 deletions
|
@ -16,6 +16,8 @@ use crate::settings::{flags, Settings};
|
|||
use crate::source_code_locator::SourceCodeLocator;
|
||||
use crate::source_code_style::SourceCodeStyleDetector;
|
||||
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
#[wasm_bindgen(typescript_custom_section)]
|
||||
const TYPES: &'static str = r#"
|
||||
export interface Check {
|
||||
|
@ -59,6 +61,11 @@ pub fn run() {
|
|||
console_log::init_with_level(Level::Debug).expect("Initializing logger went wrong.");
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn current_version() -> JsValue {
|
||||
JsValue::from(VERSION)
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn check(contents: &str, options: JsValue) -> Result<JsValue, JsValue> {
|
||||
let options: Options = serde_wasm_bindgen::from_value(options).map_err(|e| e.to_string())?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue