diff options
author | Valentin Popov <info@valentineus.link> | 2020-02-13 22:31:45 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2020-02-13 22:33:09 +0300 |
commit | 1826f5a11595b2e0e0e0d8881ee30430f80dbafc (patch) | |
tree | 668a493ce4a06f6261d6824274e37dfa644f282b | |
parent | 2588edeee2d02abdabe1e7ffe45a633e3c9a62d6 (diff) | |
download | eslint-config-1826f5a11595b2e0e0e0d8881ee30430f80dbafc.tar.xz eslint-config-1826f5a11595b2e0e0e0d8881ee30430f80dbafc.zip |
feat(eslint): Rule "lines-around-comment"
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | ROADMAP.md | 2 | ||||
-rw-r--r-- | src/rules/default.json | 17 |
2 files changed, 18 insertions, 1 deletions
@@ -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" ], |