Adds liniting into the workflow (#3082)

* initial linting of src

* fix indent to 2 spaces

* Removes unnecessary rules

* ignore spec folder for now

* Spec linting

* Fix spec indent

* nits

* nits

* no no-empty rule
This commit is contained in:
Florent Vilmart
2016-11-24 15:47:41 -05:00
committed by GitHub
parent 6e2fba4ae4
commit 8c2c76dd26
149 changed files with 3478 additions and 3507 deletions

View File

@@ -31,7 +31,7 @@ describe("AdaptableController", ()=>{
});
it("should fail setting the wrong adapter to the controller", (done) => {
function WrongAdapter() {};
function WrongAdapter() {}
var adapter = new FilesAdapter();
var controller = new FilesController(adapter);
var otherAdapter = new WrongAdapter();
@@ -42,7 +42,7 @@ describe("AdaptableController", ()=>{
});
it("should fail to instantiate a controller with wrong adapter", (done) => {
function WrongAdapter() {};
function WrongAdapter() {}
var adapter = new WrongAdapter();
expect(() => {
new FilesController(adapter);
@@ -59,10 +59,10 @@ describe("AdaptableController", ()=>{
it("should accept an object adapter", (done) => {
var adapter = {
createFile: function(config, filename, data) { },
deleteFile: function(config, filename) { },
getFileData: function(config, filename) { },
getFileLocation: function(config, filename) { },
createFile: function() { },
deleteFile: function() { },
getFileData: function() { },
getFileLocation: function() { },
}
expect(() => {
new FilesController(adapter);
@@ -71,11 +71,11 @@ describe("AdaptableController", ()=>{
});
it("should accept an object adapter", (done) => {
function AGoodAdapter() {};
AGoodAdapter.prototype.createFile = function(config, filename, data) { };
AGoodAdapter.prototype.deleteFile = function(config, filename) { };
AGoodAdapter.prototype.getFileData = function(config, filename) { };
AGoodAdapter.prototype.getFileLocation = function(config, filename) { };
function AGoodAdapter() {}
AGoodAdapter.prototype.createFile = function() { };
AGoodAdapter.prototype.deleteFile = function() { };
AGoodAdapter.prototype.getFileData = function() { };
AGoodAdapter.prototype.getFileLocation = function() { };
var adapter = new AGoodAdapter();
expect(() => {