mirror of https://github.com/actions/toolkit
Add ESLint and Prettier tooling
parent
37e19115be
commit
3e32975625
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"extends": ["plugin:github/es6"],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"plugins": ["jest"],
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"es6": true,
|
||||||
|
"jest/globals": true
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,23 @@
|
||||||
workflow "CI" {
|
workflow "CI" {
|
||||||
on = "push"
|
on = "push"
|
||||||
resolves = "Test"
|
resolves = ["Format", "Lint", "Test"]
|
||||||
}
|
}
|
||||||
|
|
||||||
action "Dependencies" {
|
action "Dependencies" {
|
||||||
uses = "actions/npm@v2.0.0"
|
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" {
|
action "Test" {
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"printWidth": 80,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "none",
|
||||||
|
"bracketSpacing": false,
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"parser": "typescript"
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -2,14 +2,21 @@
|
||||||
"name": "root",
|
"name": "root",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"format": "prettier --check packages/**/*.ts",
|
||||||
|
"lint": "eslint packages/**/*.ts",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^24.0.11",
|
"@types/jest": "^24.0.11",
|
||||||
"@types/node": "^11.13.5",
|
"@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": "^24.7.1",
|
||||||
"jest-circus": "^24.7.1",
|
"jest-circus": "^24.7.1",
|
||||||
"lerna": "^3.13.3",
|
"lerna": "^3.13.3",
|
||||||
|
"prettier": "^1.17.0",
|
||||||
"ts-jest": "^24.0.2",
|
"ts-jest": "^24.0.2",
|
||||||
"typescript": "^3.4.4"
|
"typescript": "^3.4.4"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { github } from '../src/github';
|
import {github} from '../src/github'
|
||||||
|
|
||||||
describe('@actions/github', () => {
|
describe('@actions/github', () => {
|
||||||
it('needs tests', () => {
|
it('needs tests', () => {
|
||||||
expect(github()).toBe(true)
|
expect(github()).toBe(true)
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
|
|
Loading…
Reference in New Issue