From 06a252b9a2aec250109df87d4fb03a4283bfccc5 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 9 Mar 2026 19:12:56 +0000 Subject: [PATCH] Add the Linter extension to the test wiki for DiscussionTools --- cookbooks/wiki/recipes/default.rb | 7 ++++ .../default/mw-ext-Linter.inc.php.erb | 33 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 cookbooks/wiki/templates/default/mw-ext-Linter.inc.php.erb diff --git a/cookbooks/wiki/recipes/default.rb b/cookbooks/wiki/recipes/default.rb index b11d58504..a2c610a7b 100644 --- a/cookbooks/wiki/recipes/default.rb +++ b/cookbooks/wiki/recipes/default.rb @@ -163,6 +163,13 @@ mediawiki_extension "Translate" do only_if { node[:wiki][:test_mode] } end +mediawiki_extension "Linter" do + site site_name + template "mw-ext-Linter.inc.php.erb" + template_cookbook "wiki" + only_if { node[:wiki][:test_mode] } +end + mediawiki_extension "DiscussionTools" do site site_name only_if { node[:wiki][:test_mode] } diff --git a/cookbooks/wiki/templates/default/mw-ext-Linter.inc.php.erb b/cookbooks/wiki/templates/default/mw-ext-Linter.inc.php.erb new file mode 100644 index 000000000..b40f1cb07 --- /dev/null +++ b/cookbooks/wiki/templates/default/mw-ext-Linter.inc.php.erb @@ -0,0 +1,33 @@ + true, + 'linting' => true +]; + +$wgVisualEditorParsoidAutoConfig = false; // to make linting work + +$wgVirtualRestConfig = [ + 'paths' => [], + 'modules' => [ + 'parsoid' => [ + 'url' => 'https://<%= @site %>/w/rest.php', + 'domain' => '<%= @site %>', + 'forwardCookies' => true, + 'restbaseCompat' => false, + 'timeout' => 30 + ], + ], + 'global' => [ + 'timeout' => 360, + 'forwardCookies' => false, + 'HTTPProxy' => null + ] +]; + +wfLoadExtension( 'Linter' ); -- 2.39.5