🐞 BUG: `padding-line-between-statements` & `lines-around-comment` rules conflict with each other
See original GitHub issueEnvironment
Node version: v16.5
npm version: -
Local ESLint version: v7.32
Global ESLint version: Same
Operating System: Linux
What parser are you using?
Default (Espree)
What did you do?
Config
'padding-line-between-statements' : [
// Disallow empty lines between consecutive variable declarations
{
blankLine : 'never',
prev : [
'singleline-let',
'singleline-const',
'singleline-var',
],
next : [
'singleline-let',
'singleline-const',
'singleline-var',
],
},
]
// Require empty line before comments
'lines-around-comment' : [
{
beforeBlockComment : true,
beforeLineComment : true,
applyDefaultIgnorePatterns : false,
},
],
Example
// Works
const apple = 'Apple'
const cat = 'Cat'
// Produces lint errors when there is a space between these two declarations & also when, there is none.
// Fruit
const apple = 'Apple'
// Animal
const cat = 'Cat'
What did you expect to happen?
lines-around-comment
rule should take precedence.
What actually happened?
Both rules conflict with each other.
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Rule 1.7 Conflict of Interest: Current Clients - Comment
[11] When lawyers representing different clients in the same matter or in substantially related matters are closely related by blood or marriage, there...
Read more >Rule 1.7 Conflict of Interest: Current Clients
(Rule Approved by the Supreme Court, Effective November 1, 2018). (a) A lawyer shall not, without informed written consent* from each client and....
Read more >rule 19-301.7. conflict of interest - State Government Sites
For specific Rules regarding certain conflicts of interest, see Rule 19-301.8 (1.8). ... Whether clients are aligned directly against each other within the ......
Read more >Ten Simple Rules for avoiding and resolving conflicts ... - NCBI
During the course of our personal and professional lives, we spend a significant amount of time communicating with others.
Read more >Supreme Court Rules - Conflict of Interest: Current Clients
For former client conflicts of interest, see Rule 4-1.9. ... Whether clients are aligned directly against each other within the meaning of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bfelbo No, haven’t added that one. I changed my config (and padded-block rule), that seemed to satisfy my needs.
@flosker did you create a rule to include comment as an additional STATEMENT_TYPE?
If so, would be awesome if you could share 😄