Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 8 additions & 42 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"plugin:@typescript-eslint/eslint-recommended"
],
"plugins": [
"@typescript-eslint"
"@typescript-eslint",
"import"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand All @@ -30,29 +31,6 @@
"properties": "always"
}
],
"require-jsdoc": [
"error",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true
}
}
],
"valid-jsdoc": [
"error",
{
"requireReturn": false,
"preferType": {
"String": "string",
"Object": "object",
"Number": "number",
"Function": "function",
"Void": "void"
}
}
],
"quotes": [
"error",
"single",
Expand All @@ -71,12 +49,6 @@
}
}
],
"no-magic-numbers": [
"error",
{
"ignoreArrayIndexes": true
}
],
"eqeqeq": "error",
"block-scoped-var": "error",
"complexity": [
Expand All @@ -85,7 +57,6 @@
"maximum": 20
}
],
"curly": "error",
"default-case": "error",
"dot-location": [
"error",
Expand All @@ -102,16 +73,6 @@
"after": true
}
],
"id-length": [
"error",
{
"min": 2,
"properties": "never",
"exceptions": [
"$"
]
}
],
"indent": [
"error",
2,
Expand Down Expand Up @@ -144,6 +105,11 @@
],
"semi": [
"error"
]
],
"sort-imports": 0,
"import/order": [2, {
"groups": ["type", "builtin", "external", "internal", "parent", "sibling", "index", "object"],
"alphabetize": { "order": "asc", "caseInsensitive": true },
}]
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@technote-space/github-action-test-helper",
"version": "0.9.1",
"version": "0.9.2",
"description": "Test helper for GitHub Actions.",
"keywords": [
"github",
Expand Down Expand Up @@ -52,6 +52,7 @@
"@typescript-eslint/parser": "^5.20.0",
"c8": "^7.11.0",
"eslint": "^8.13.0",
"eslint-plugin-import": "^2.26.0",
"rollup": "^2.70.2",
"typescript": "^4.6.3"
},
Expand Down
2 changes: 1 addition & 1 deletion src/command.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-magic-numbers */
import { addPath, exportVariable } from '@actions/core';
import { describe, it } from 'vitest';
import { spyOnExportVariable, exportVariableCalledWith, spyOnAddPath, addPathCalledWith } from '../src';
import { addPath, exportVariable } from '@actions/core';

describe('spyOnExportVariable, exportVariableCalledWith', () => {
it('should spy on exportVariable', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/nock.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path';
import fs from 'fs';
import path from 'path';
import { load } from 'js-yaml';
import { afterEach, beforeEach } from 'vitest';

Expand Down
4 changes: 2 additions & 2 deletions src/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-magic-numbers */
import { EOL } from 'os';
import { exec, spawn } from 'child_process';
import fs from 'fs';
import { EOL } from 'os';
import path from 'path';
import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest';
import {
Expand All @@ -23,7 +24,6 @@ import {
getLogStdout,
} from '../src';
import global from '../src/global';
import fs from 'fs';

beforeAll(() => {
process.env.TEST_ENV = 'test';
Expand Down
6 changes: 3 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { SpyInstance } from 'vitest';
import type { Octokit } from './types';
import type { PathLike } from 'fs';
import global from './global';
import type { SpyInstance } from 'vitest';
import fs from 'fs';
import { EOL } from 'os';
import path from 'path';
import fs from 'fs';
import { getOctokit as getOctokitInstance } from '@actions/github';
import { load } from 'js-yaml';
import { afterEach, beforeEach, expect, vi } from 'vitest';
import global from './global';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const setActionEnv = (rootDir: string): { [key: string]: any } => {
Expand Down
Loading