Add and apply eslint rule to disallow consecutive empty lines
authorFrank Bessou <frank.bessou@logilab.fr>
Tue, 11 Apr 2017 09:34:45 +0200
changeset 102 02ed873453e8
parent 101 80b3bcb94070
child 103 930f8bb45e22
Add and apply eslint rule to disallow consecutive empty lines
.eslintrc.yml
src/Api.js
src/components/BaseViews.js
src/components/Entity.js
src/components/Workflow.js
src/jsonaryutils.js
src/model.js
src/utils.js
test/index.js
--- a/.eslintrc.yml	Mon Apr 10 15:40:44 2017 +0200
+++ b/.eslintrc.yml	Tue Apr 11 09:34:45 2017 +0200
@@ -29,6 +29,7 @@
   key-spacing: [0]
   new-cap: [0]
   no-console: ["error", {"allow": ["warn", "error"]}]
+  no-multiple-empty-lines: ["error", {"max":1, "maxEOF": 0, "maxBOF": 0}]
   no-multi-spaces: [0]
   no-shadow: [0]
   no-trailing-spaces: [2]
--- a/src/Api.js	Mon Apr 10 15:40:44 2017 +0200
+++ b/src/Api.js	Tue Apr 11 09:34:45 2017 +0200
@@ -98,7 +98,6 @@
         return resourcePromise;
     }
 
-
     getRoot() {
         return this.getResource('');
     }
@@ -111,7 +110,6 @@
         return this.jsonSchemaFetch(url);
     }
 
-
     getEntities(etype) {
         const route = `/${etype}/`;
         const url = route;
--- a/src/components/BaseViews.js	Mon Apr 10 15:40:44 2017 +0200
+++ b/src/components/BaseViews.js	Tue Apr 11 09:34:45 2017 +0200
@@ -109,4 +109,3 @@
     style: React.PropTypes.string,
     children: React.PropTypes.arrayOf(React.PropTypes.object),
 }
-
--- a/src/components/Entity.js	Mon Apr 10 15:40:44 2017 +0200
+++ b/src/components/Entity.js	Tue Apr 11 09:34:45 2017 +0200
@@ -35,7 +35,6 @@
     attribute: PropTypeJsonaryWrapper.isRequired,
 };
 
-
 function EntityAttributes(props) {
     const {data} = props;
     const properties = data.schemas().definedProperties();
@@ -233,7 +232,6 @@
     }),
 };
 
-
 export class EntityView extends React.Component {
 
     renderTitle() {
@@ -301,7 +299,6 @@
     }).isRequired,
 };
 
-
 const uiSchema = {
     description: {
         'ui:widget': 'textarea',
--- a/src/components/Workflow.js	Mon Apr 10 15:40:44 2017 +0200
+++ b/src/components/Workflow.js	Tue Apr 11 09:34:45 2017 +0200
@@ -77,7 +77,6 @@
     workflowState: React.PropTypes.string.isRequired,
 };
 
-
 function WorkflowActionsView(props) {
     const className = (defaultValue) => [
         get(props, ['className'], ''), defaultValue].join(' ');
--- a/src/jsonaryutils.js	Mon Apr 10 15:40:44 2017 +0200
+++ b/src/jsonaryutils.js	Tue Apr 11 09:34:45 2017 +0200
@@ -20,4 +20,3 @@
 Jsonary.extendData({
     mapItems: mapItems,
 });
-
--- a/src/model.js	Mon Apr 10 15:40:44 2017 +0200
+++ b/src/model.js	Tue Apr 11 09:34:45 2017 +0200
@@ -2,7 +2,6 @@
 import {merge} from 'lodash';
 import {PropTypeJsonaryWrapper} from './jsonaryutils';
 
-
 export const PropTypeAction = React.PropTypes.oneOf([
         'create',
         'view',
--- a/src/utils.js	Mon Apr 10 15:40:44 2017 +0200
+++ b/src/utils.js	Tue Apr 11 09:34:45 2017 +0200
@@ -12,7 +12,6 @@
     return url + path;
 }
 
-
 export function buildFormData(wrappedData) {
     // Return a formData object suitable for usage in a
     // react-jsonschema-form's Form with `schema`. This is built by filter out
--- a/test/index.js	Mon Apr 10 15:40:44 2017 +0200
+++ b/test/index.js	Tue Apr 11 09:34:45 2017 +0200
@@ -276,7 +276,6 @@
         },
     };
 
-
     describe('with data containing "created_at" and "updated_at" properties', () => {
 
         it('renders something', () => {
@@ -300,7 +299,6 @@
         it('renders "created at" when the "created_at" property has no title', () => {
             const data =  wrapEntityData(dataWithDates, schemaWithDatesWithoutTitles);
 
-
             const wrapper = shallow(<EntityMeta data={data}/>);
             expect(wrapper.html()).to.contain('created at');
         });
@@ -308,7 +306,6 @@
         it('renders "updated at" when the "updated_at" property has no title', () => {
             const data =  wrapEntityData(dataWithDates, schemaWithDatesWithoutTitles);
 
-
             const wrapper = shallow(<EntityMeta data={data}/>);
             expect(wrapper.html()).to.contain('updated at');
         });
@@ -316,7 +313,6 @@
         it('renders the "created_at" property\'s title when it exists', () => {
             const data =  wrapEntityData(dataWithDates, schemaWithDatesWithTitles);
 
-
             const wrapper = shallow(<EntityMeta data={data}/>);
             expect(wrapper.html()).to.contain(createdAtTitle);
         });
@@ -324,7 +320,6 @@
         it('renders the "updated_at" property\'s title when it exists', () => {
             const data =  wrapEntityData(dataWithDates, schemaWithDatesWithTitles);
 
-
             const wrapper = shallow(<EntityMeta data={data}/>);
             expect(wrapper.html()).to.contain(updatedAtTitle);
         });
@@ -530,4 +525,3 @@
         });
     });
 });
-