mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Set up eslint for test files. (#517)
This commit is contained in:
parent
560e416032
commit
c4d24de7a0
@ -5,7 +5,7 @@
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 9,
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.json"
|
||||
"project": "./tsconfig.lint.json"
|
||||
},
|
||||
"globals": {
|
||||
"fetch": true
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable import/first */
|
||||
// Initial env variable setup for tests.
|
||||
process.env['INPUT_FOLDER'] = 'build'
|
||||
process.env['GITHUB_SHA'] = '123'
|
||||
@ -23,6 +24,7 @@ jest.mock('@actions/io', () => ({
|
||||
}))
|
||||
|
||||
jest.mock('../src/execute', () => ({
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
__esModule: true,
|
||||
execute: jest.fn()
|
||||
}))
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable import/first */
|
||||
// Initial env variable setup for tests.
|
||||
process.env['INPUT_FOLDER'] = 'build'
|
||||
process.env['GITHUB_SHA'] = '123'
|
||||
|
@ -9,7 +9,7 @@
|
||||
"scripts": {
|
||||
"build": "rimraf lib && tsc --declaration",
|
||||
"test": "jest",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"lint": "eslint src/**/*.ts __tests__/**/*.ts",
|
||||
"format": "prettier --write './**/*.ts'"
|
||||
},
|
||||
"repository": {
|
||||
|
7
tsconfig.lint.json
Normal file
7
tsconfig.lint.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "."
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
Loading…
Reference in New Issue
Block a user