style: introduce @typescript-eslint/recommended

This commit is contained in:
harttle
2019-07-06 14:33:34 +08:00
parent e6f5f1cd85
commit 88c89fe3b3
48 changed files with 260 additions and 235 deletions
+6 -6
View File
@@ -5,11 +5,11 @@ import * as chaiAsPromised from 'chai-as-promised'
use(chaiAsPromised)
class SettingsDrop extends Liquid.Types.Drop {
foo: string = 'FOO'
bar () {
private foo: string = 'FOO'
public bar () {
return 'BAR'
}
liquidMethodMissing (key: string) {
public liquidMethodMissing (key: string) {
return key.toUpperCase()
}
}
@@ -29,10 +29,10 @@ describe('drop', function () {
describe('BlandDrop', function () {
it('should test blank strings', async function () {
const src = `
{% unless settings.fp_heading == blank %}
<h1>{{ settings.fp_heading }}</h1>
{% unless settings.fpHeading == blank %}
<h1>{{ settings.fpHeading }}</h1>
{% endunless %}`
var ctx = { settings: { fp_heading: '' } }
var ctx = { settings: { fpHeading: '' } }
const html = await engine.parseAndRender(src, ctx)
return expect(html).to.match(/^\s+$/)
})
+2 -2
View File
@@ -136,7 +136,7 @@ describe('xhr', () => {
[200, { 'Content-Type': 'text/plain' }, 'foo2'])
return engine.renderFile('foo.html')
})
.then((html:string) => expect(html).to.equal('foo2'))
.then((html: string) => expect(html).to.equal('foo2'))
})
it('should respect cache=true option', () => {
engine = new Liquid({
@@ -153,7 +153,7 @@ describe('xhr', () => {
[200, { 'Content-Type': 'text/plain' }, 'foo2'])
return engine.renderFile('foo.html')
})
.then((html:string) => expect(html).to.equal('foo1'))
.then((html: string) => expect(html).to.equal('foo1'))
})
})
})