[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
This commit is contained in:
Paul Matthew Barrameda
2020-02-19 22:56:52 -08:00
committed by Jordan Harband
parent c0ee2c4924
commit 06b3ab11d9
2 changed files with 2 additions and 2 deletions

View File

@@ -313,7 +313,7 @@ module.exports = {
// disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
// https://eslint.org/docs/rules/no-multiple-empty-lines
'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 1, maxEOF: 0 }],
'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 0, maxEOF: 0 }],
// disallow negated conditions
// https://eslint.org/docs/rules/no-negated-condition

View File

@@ -24,7 +24,7 @@ function lint(text) {
}
function wrapComponent(body) {
return `
return `\
import React from 'react';
export default class MyComponent extends React.Component {