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" {
|
||||
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" {
|
||||
|
|
|
@ -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",
|
||||
"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"
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue