Skip to content

Commit 06b3ab1

Browse files
Luis729ljharb
authored andcommitted
[eslint config] [minor] Fix typo in no-multiple-empty-lines rule
## Why is the change being made? This change is made because the Airbnb documentation states to "avoid a newline at the beginning of files", yet the code does not follow this. ## What has changed to address the problem? This change fixes the `no-multiple-empty-lines` rule by setting max beginning of file (`maxBOF`) to from 1 to 0. ## How was this change tested? This change was tested with `npm test`. ## Related docs https://github.com/airbnb/javascript#whitespace--no-multiple-empty-lines
1 parent c0ee2c4 commit 06b3ab1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/eslint-config-airbnb-base/rules/style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ module.exports = {
313313

314314
// disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
315315
// https://eslint.org/docs/rules/no-multiple-empty-lines
316-
'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 1, maxEOF: 0 }],
316+
'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 0, maxEOF: 0 }],
317317

318318
// disallow negated conditions
319319
// https://eslint.org/docs/rules/no-negated-condition

packages/eslint-config-airbnb/test/test-react-order.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function lint(text) {
2424
}
2525

2626
function wrapComponent(body) {
27-
return `
27+
return `\
2828
import React from 'react';
2929
3030
export default class MyComponent extends React.Component {

0 commit comments

Comments
 (0)