Skip to content

Commit f6dcdd4

Browse files
Merge pull request #66 from enhance-dev/lint
Lint
2 parents 96f8a15 + d952da9 commit f6dcdd4

56 files changed

Lines changed: 214 additions & 202 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public/bundles/

app/api/about.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export async function get (req) {
1+
export async function get (/* req */) {
22
return {
3-
json: { people: ['fred', 'joe', 'mary'] }
3+
json: { people: [ 'fred', 'joe', 'mary' ] }
44
}
55
}

app/api/contact.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import data from '@begin/data'
22

33
export async function post (req) {
4-
let contact = await data.set({
4+
let contact = await data.set({
55
table: 'contacts',
66
message: req.body.message,
77
ts: Date.now()
88
})
99
console.log('saved', contact)
10-
return {
10+
return {
1111
location: '/contact?success=true'
1212
}
1313
}

app/api/cool.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export let get = [one, two]
1+
export let get = [ one, two ]
22

33
async function one (req) {
44
req.value = 'some value'
@@ -8,6 +8,6 @@ async function one (req) {
88
async function two (req) {
99
console.log(req.value)
1010
return {
11-
json: "apples oranges".split()
11+
json: 'apples oranges'.split()
1212
}
1313
}

app/api/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export async function get() {
2-
return { json: { message: 'dynamic content' }}
1+
export async function get () {
2+
return { json: { message: 'dynamic content' } }
33
}

app/api/notes/$id.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import destroy from '../../../models/notes/destroy.mjs'
44

55
// post /notes/:id - update or destroy a note
66
export async function post (req) {
7-
let method = req.body._method === 'delete'? destroy : update
7+
let method = req.body._method === 'delete' ? destroy : update
88
let note = { ...req.body }
99
note.key = req.params.id
1010
let json = await method(req.body)

app/api/notes/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import list from '../../../models/notes/list.mjs'
44
// get /notes - list notes
55
export async function get () {
66
let notes = await list()
7-
return {
8-
json: { notes }
7+
return {
8+
json: { notes }
99
}
1010
}
1111

app/api/stuff/$$.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// get /stuff/*
1+
// get /stuff/*
22
export async function get (req) {
33
return { json: { req } }
44
}

app/api/test/$$.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export async function get (req) {
1+
export async function get (/* req */) {
22
return { json: { data: '/test/$$.mjs' } }
33
}

app/api/test/one.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export async function get() {
2-
return { json: { data:'one' }}
1+
export async function get () {
2+
return { json: { data: 'one' } }
33
}

0 commit comments

Comments
 (0)