From 1826f5a11595b2e0e0e0d8881ee30430f80dbafc Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 13 Feb 2020 23:31:45 +0400 Subject: feat(eslint): Rule "lines-around-comment" Signed-off-by: Valentin Popov --- ROADMAP.md | 2 +- src/rules/default.json | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 02dc0ff..933ce94 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -58,7 +58,7 @@ - [X] "keyword-spacing" - [ ] "line-comment-position" - [X] "linebreak-style" -- [ ] "lines-around-comment" +- [X] "lines-around-comment" - [X] "lines-around-directive" - [X] "lines-between-class-members" - [ ] "max-classes-per-file" diff --git a/src/rules/default.json b/src/rules/default.json index f0e2ab2..a97ecf8 100644 --- a/src/rules/default.json +++ b/src/rules/default.json @@ -107,6 +107,23 @@ "error", "unix" ], + "lines-around-comment": [ + "error", + { + "afterBlockComment": false, + "afterLineComment": false, + "allowArrayEnd": false, + "allowArrayStart": true, + "allowBlockEnd": false, + "allowBlockStart": true, + "allowClassEnd": false, + "allowClassStart": true, + "allowObjectEnd": false, + "allowObjectStart": true, + "beforeBlockComment": true, + "beforeLineComment": false + } + ], "lines-around-directive": [ "off" ], -- cgit v1.2.3