aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-13 22:31:45 +0300
committerValentin Popov <info@valentineus.link>2020-02-13 22:33:09 +0300
commit1826f5a11595b2e0e0e0d8881ee30430f80dbafc (patch)
tree668a493ce4a06f6261d6824274e37dfa644f282b
parent2588edeee2d02abdabe1e7ffe45a633e3c9a62d6 (diff)
downloadeslint-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.md2
-rw-r--r--src/rules/default.json17
2 files changed, 18 insertions, 1 deletions
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"
],