1
0
Fork 0

Add ESLint and Prettier tooling

pull/1/head
Jonathan Clem 2019-04-19 15:35:44 -04:00
parent 37e19115be
commit 3e32975625
No known key found for this signature in database
GPG Key ID: 48C5B22E9FD6E80F
6 changed files with 969 additions and 38 deletions

10
.eslintrc.json Normal file
View File

@ -0,0 +1,10 @@
{
"extends": ["plugin:github/es6"],
"parser": "@typescript-eslint/parser",
"plugins": ["jest"],
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}

16
.github/main.workflow vendored
View File

@ -1,11 +1,23 @@
workflow "CI" {
on = "push"
resolves = "Test"
resolves = ["Format", "Lint", "Test"]
}
action "Dependencies" {
uses = "actions/npm@v2.0.0"
args = "ci"
args = "install"
}
action "Format" {
needs = "Dependencies"
uses = "actions/npm@v2.0.0"
args = "run format"
}
action "Lint" {
needs = "Dependencies"
uses = "actions/npm@v2.0.0"
args = "run lint"
}
action "Test" {

11
.prettierrc.json Normal file
View File

@ -0,0 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}

955
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,14 +2,21 @@
"name": "root",
"private": true,
"scripts": {
"format": "prettier --check packages/**/*.ts",
"lint": "eslint packages/**/*.ts",
"test": "jest"
},
"devDependencies": {
"@types/jest": "^24.0.11",
"@types/node": "^11.13.5",
"@typescript-eslint/parser": "^1.6.0",
"eslint": "^5.16.0",
"eslint-plugin-github": "^2.0.0",
"eslint-plugin-jest": "^22.4.1",
"jest": "^24.7.1",
"jest-circus": "^24.7.1",
"lerna": "^3.13.3",
"prettier": "^1.17.0",
"ts-jest": "^24.0.2",
"typescript": "^3.4.4"
}

View File

@ -1,7 +1,7 @@
import { github } from '../src/github';
import {github} from '../src/github'
describe('@actions/github', () => {
it('needs tests', () => {
expect(github()).toBe(true)
});
});
expect(github()).toBe(true)
})
})