chore: added new linter config (#1028)

* chore: added new linter config

* chore: linting fixes

* chore: refactore in linting config and minor linting fixes
This commit is contained in:
Anix
2020-02-20 14:01:04 +05:30
committed by GitHub
parent a111df9980
commit 75c72e917b
61 changed files with 2556 additions and 1764 deletions
+20 -17
View File
@@ -1,29 +1,32 @@
require = require('esm')(module/* , options */) /* eslint-disable-line no-global-assign */
const { expect } = require('chai')
const { resolvePath } = require('../../src/core/router/util')
/* eslint-disable no-global-assign */
require = require('esm')(
module /* , options */
); /* eslint-disable-line no-global-assign */
const { resolvePath } = require('../../src/core/router/util');
const { expect } = require('chai');
describe('router/util', function () {
it('resolvePath', async function () {
describe('router/util', function() {
it('resolvePath', async function() {
// WHEN
const result = resolvePath('hello.md')
const result = resolvePath('hello.md');
// THEN
expect(result).equal('/hello.md')
})
expect(result).equal('/hello.md');
});
it('resolvePath with dot', async function () {
it('resolvePath with dot', async function() {
// WHEN
const result = resolvePath('./hello.md')
const result = resolvePath('./hello.md');
// THEN
expect(result).equal('/hello.md')
})
expect(result).equal('/hello.md');
});
it('resolvePath with two dots', async function () {
it('resolvePath with two dots', async function() {
// WHEN
const result = resolvePath('test/../hello.md')
const result = resolvePath('test/../hello.md');
// THEN
expect(result).equal('/hello.md')
})
})
expect(result).equal('/hello.md');
});
});