Skip to content

Commit

Permalink
Improve ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
Léo Frachet committed Mar 9, 2018
1 parent 8cb54fc commit 9b3f445
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
10 changes: 10 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "transit",
"rules": {
"no-console": 0
},
"globals": {
"describe": true,
"it": true
}
}
19 changes: 1 addition & 18 deletions tests.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
'use strict';

/* Run the tests with mocha: mocha tests.js */

// eslint-disable-next-line import/no-extraneous-dependencies

const { expect } = require('chai');
const fs = require('fs-extra');

const { Gtfs } = require('./index');

// eslint-disable-next-line no-undef
describe('Tests on GTFS', () => {
// eslint-disable-next-line no-undef
it('Test on meta functions', (done) => {
const path = `${__dirname}/samples/1/`;
const gtfs = new Gtfs(path);
Expand All @@ -21,7 +19,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Test on generic table functions', (done) => {
const path = `${__dirname}/samples/1/`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -78,7 +75,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on agencies', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -119,7 +115,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on stops', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -162,7 +157,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on routes', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -207,7 +201,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on trips', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -248,7 +241,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on stop times', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -312,7 +304,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on calendars', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -357,7 +348,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on calendar dates', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -418,7 +408,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on shapes', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -475,7 +464,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on frequencies', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -526,7 +514,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on transfers', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -579,7 +566,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on feed info', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand All @@ -597,7 +583,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Tests on exporting', (done) => {
const path = `${__dirname}/samples/1`;
const gtfs = new Gtfs(path);
Expand Down Expand Up @@ -642,7 +627,6 @@ describe('Tests on GTFS', () => {
});
});

// eslint-disable-next-line no-undef
it('Tests on the regex/pattern applied to fix a bad CSV', (done) => {
const path = `${__dirname}/samples/2/`;
const gtfsWithoutFix = new Gtfs(path);
Expand All @@ -663,7 +647,6 @@ describe('Tests on GTFS', () => {
done();
});

// eslint-disable-next-line no-undef
it('Test getters helpers: getActualKeysForTable', (done) => {
const gtfs = new Gtfs();
const funkyStop = {};
Expand Down

0 comments on commit 9b3f445

Please sign in to comment.