Skip to content

Commit 4866ff1

Browse files
chore: import order
1 parent 15c4be8 commit 4866ff1

File tree

8 files changed

+460
-52
lines changed

8 files changed

+460
-52
lines changed

.eslintrc

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"plugin:@typescript-eslint/eslint-recommended"
66
],
77
"plugins": [
8-
"@typescript-eslint"
8+
"@typescript-eslint",
9+
"import"
910
],
1011
"parser": "@typescript-eslint/parser",
1112
"parserOptions": {
@@ -30,29 +31,6 @@
3031
"properties": "always"
3132
}
3233
],
33-
"require-jsdoc": [
34-
"error",
35-
{
36-
"require": {
37-
"FunctionDeclaration": true,
38-
"MethodDefinition": true,
39-
"ClassDeclaration": true
40-
}
41-
}
42-
],
43-
"valid-jsdoc": [
44-
"error",
45-
{
46-
"requireReturn": false,
47-
"preferType": {
48-
"String": "string",
49-
"Object": "object",
50-
"Number": "number",
51-
"Function": "function",
52-
"Void": "void"
53-
}
54-
}
55-
],
5634
"quotes": [
5735
"error",
5836
"single",
@@ -71,12 +49,6 @@
7149
}
7250
}
7351
],
74-
"no-magic-numbers": [
75-
"error",
76-
{
77-
"ignoreArrayIndexes": true
78-
}
79-
],
8052
"eqeqeq": "error",
8153
"block-scoped-var": "error",
8254
"complexity": [
@@ -85,7 +57,6 @@
8557
"maximum": 20
8658
}
8759
],
88-
"curly": "error",
8960
"default-case": "error",
9061
"dot-location": [
9162
"error",
@@ -102,16 +73,6 @@
10273
"after": true
10374
}
10475
],
105-
"id-length": [
106-
"error",
107-
{
108-
"min": 2,
109-
"properties": "never",
110-
"exceptions": [
111-
"$"
112-
]
113-
}
114-
],
11576
"indent": [
11677
"error",
11778
2,
@@ -144,6 +105,12 @@
144105
],
145106
"semi": [
146107
"error"
147-
]
108+
],
109+
"sort-imports": 0,
110+
"import/order": [2, {
111+
"groups": ["type", "builtin", "external", "internal", "parent", "sibling", "index", "object"],
112+
"alphabetize": { "order": "asc", "caseInsensitive": true }
113+
}],
114+
"@typescript-eslint/no-non-null-assertion": "off"
148115
}
149116
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@typescript-eslint/parser": "^5.28.0",
5353
"c8": "^7.11.3",
5454
"eslint": "^8.18.0",
55+
"eslint-plugin-import": "^2.26.0",
5556
"husky": "^8.0.1",
5657
"lint-staged": "^13.0.2",
5758
"nock": "^13.2.7",

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { Context } from '@actions/github/lib/context';
44
import { isTargetEvent } from '@technote-space/filter-github-action';
55
import { ContextHelper, Utils } from '@technote-space/github-action-helper';
66
import { Logger } from '@technote-space/github-action-log-helper';
7-
import { execute } from './process';
87
import { TARGET_EVENTS } from './constant';
8+
import { execute } from './process';
99

1010
const run = async(): Promise<void> => {
1111
const logger = new Logger();

src/process.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable no-magic-numbers */
2-
import { describe, expect, it, vi } from 'vitest';
3-
import nock from 'nock';
42
import path from 'path';
53
import { Logger } from '@technote-space/github-action-log-helper';
64
import { disableNetConnect, getApiFixture, getContext, getOctokit } from '@technote-space/github-action-test-helper';
5+
import nock from 'nock';
6+
import { describe, expect, it, vi } from 'vitest';
77
import { execute } from './process';
88

99
describe('execute', () => {

src/utils/context.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-magic-numbers */
2-
import { describe, expect, it } from 'vitest';
32
import { getContext } from '@technote-space/github-action-test-helper';
3+
import { describe, expect, it } from 'vitest';
44
import { getAssignees } from './context';
55

66
describe('getAssignees', () => {

src/utils/github.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable no-magic-numbers */
2-
import { describe, expect, it, vi } from 'vitest';
3-
import nock from 'nock';
42
import path from 'path';
53
import { Logger } from '@technote-space/github-action-log-helper';
64
import { disableNetConnect, getApiFixture, getContext, spyOnStdout, stdoutCalledWith, getOctokit } from '@technote-space/github-action-test-helper';
5+
import nock from 'nock';
6+
import { describe, expect, it, vi } from 'vitest';
77
import { addAssignees } from './github';
88

99
describe('addAssignees', () => {

src/utils/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Octokit } from '@technote-space/github-action-helper';
21
import type { Context } from '@actions/github/lib/context';
2+
import type { Octokit } from '@technote-space/github-action-helper';
33
import type { Logger } from '@technote-space/github-action-log-helper';
44

55
export const addAssignees = async(assignees: string[] | false, octokit: Octokit, logger: Logger, context: Context): Promise<void> => {

0 commit comments

Comments
 (0)