Skip to content

Commit

Permalink
getting linting working with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timcash committed Apr 24, 2016
1 parent cf064e4 commit b4dda90
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 15 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{

"plugins": [
"babel"
],

"rules": {
"arrow-parens": 0,
"babel/arrow-parens": 2
}
}
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import fetch from 'isomorphic-fetch'

async function asyncer () {
let b = await fetch()
return b
}

asyncer()
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "ava"
"test": "ava",
"watch-test": "ava --watch"
},
"author": "",
"license": "ISC",
"devDependencies": {
"ava": "^0.14.0"
"ava": "^0.14.0",
"babel-eslint": "^6.0.3",
"eslint": "^2.8.0",
"eslint-plugin-babel": "^3.2.0"
},
"standard": {
"parser": "babel-eslint"
}
}
26 changes: 13 additions & 13 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import test from 'ava';
import test from 'ava'
import cb2 from './index'

test('foo', t => {
t.pass();
});
t.pass()
})

test('bar', async t => {
const bar = Promise.resolve('bar');

t.is(await bar, 'bar');
});
const bar = Promise.resolve('bar')
t.is(await bar, 'bar')
})

test('bilbo', t => {
t.pass();
test('bilbo', t => {
t.pass()
})

test('bilbo', t => {
let a = 1
t.is(a, 1)
t.pass()
test('bilbo', t => {
let a = 3
t.is(a, 3)
t.pass()
})

0 comments on commit b4dda90

Please sign in to comment.