Skip to content

Commit 1a7be70

Browse files
authored
add rule @typescript/lines-around-comment (#246)
1 parent 130bf88 commit 1a7be70

File tree

4 files changed

+114
-95
lines changed

4 files changed

+114
-95
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ Example ESLint configuration:
172172

173173
### [lines-around-comment]
174174

175+
(The following applies to [@typescript-eslint/lines-around-comment] as well.)
176+
175177
**This rule can be used with certain options.**
176178

177179
This rule requires empty lines before and/or after comments. Prettier preserves blank lines, with two exceptions:
@@ -685,6 +687,7 @@ When you’re done, run `npm test` to verify that you got it all right. It runs
685687

686688
[@babel/eslint-plugin]: https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin
687689
[@typescript-eslint/eslint-plugin]: https://github.com/typescript-eslint/typescript-eslint
690+
[@typescript-eslint/lines-around-comment]: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-around-comment.md
688691
[@typescript-eslint/quotes]: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
689692
[arrow-body-style]: https://eslint.org/docs/rules/arrow-body-style
690693
[babel/quotes]: https://github.com/babel/eslint-plugin-babel#rules

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = {
1515
"no-tabs": 0,
1616
"no-unexpected-multiline": 0,
1717
"quotes": 0,
18+
"@typescript-eslint/lines-around-comment": 0,
1819
"@typescript-eslint/quotes": 0,
1920
"babel/quotes": 0,
2021
"vue/html-self-closing": 0,

0 commit comments

Comments
 (0)