Add ESLint and Prettier tooling

This commit is contained in:
Jonathan Clem
2019-04-19 15:35:44 -04:00
parent 37e19115be
commit 3e32975625
6 changed files with 969 additions and 38 deletions
+10
View File
@@ -0,0 +1,10 @@
{
"extends": ["plugin:github/es6"],
"parser": "@typescript-eslint/parser",
"plugins": ["jest"],
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
+14 -2
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
View File
@@ -0,0 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}
+923 -32
View File
File diff suppressed because it is too large Load Diff
+7
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"
}
+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)
})
})