From e7040d111e1af110717b394be2a88c0214e070c7 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 10 Apr 2020 16:20:04 +0200 Subject: [PATCH] Document options for php and js code formatting tools Ref https://github.com/nextcloud/server/pull/20209 Signed-off-by: Christoph Wurst --- developer_manual/app/coding-style.rst | 15 +++++++++++++++ developer_manual/app/index.rst | 1 + 2 files changed, 16 insertions(+) create mode 100644 developer_manual/app/coding-style.rst diff --git a/developer_manual/app/coding-style.rst b/developer_manual/app/coding-style.rst new file mode 100644 index 000000000..363467bb8 --- /dev/null +++ b/developer_manual/app/coding-style.rst @@ -0,0 +1,15 @@ +============ +Coding Style +============ + +.. sectionauthor:: Christoph Wurst + +PHP +--- + +Starting with Nextcloud 19 there is a shared `PHP Coding Standards Fixer `_ configuration you can use to automatically format your app's source code. For full details see the `repository on Github `_. + +JavaScript +---------- + +There is a shared configuration for `eslint `_ that you can use to automatically format your Nextcloud apps's JavaScript code. It consists of two parts: a `config package `_ that contains the formatting preferences and a `plugin `_ to detect deprecated and removed APIs in your code. See their readmes for instructions. diff --git a/developer_manual/app/index.rst b/developer_manual/app/index.rst index 60e561b34..cd62621be 100644 --- a/developer_manual/app/index.rst +++ b/developer_manual/app/index.rst @@ -30,6 +30,7 @@ App development repair publicpage testing + coding-style ../api