Skip to content

Commit

Permalink
chore: import order
Browse files Browse the repository at this point in the history
  • Loading branch information
technote-space committed Jun 24, 2022
1 parent 2d8a3ed commit 6d5d800
Show file tree
Hide file tree
Showing 6 changed files with 449 additions and 51 deletions.
51 changes: 9 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,12 @@
],
"semi": [
"error"
]
],
"sort-imports": 0,
"import/order": [2, {
"groups": ["type", "builtin", "external", "internal", "parent", "sibling", "index", "object"],
"alphabetize": { "order": "asc", "caseInsensitive": true }
}],
"@typescript-eslint/no-non-null-assertion": "off"
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@typescript-eslint/parser": "^5.29.0",
"c8": "^7.11.3",
"eslint": "^8.18.0",
"eslint-plugin-import": "^2.26.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"nock": "^13.2.7",
Expand Down
2 changes: 1 addition & 1 deletion src/checkLibrary.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
import { existsSync } from 'fs';
import { join } from 'path';
import { describe, expect, it } from 'vitest';
import { BIN_PATH, BIN_FILE } from './constant';

describe('npm check updates', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/misc.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable no-magic-numbers */
import { describe, expect, it } from 'vitest';
import path from 'path';
import {
spyOnAddPath,
addPathCalledWith,
testEnv,
generateContext,
} from '@technote-space/github-action-test-helper';
import { describe, expect, it } from 'vitest';
import { getOnlyDefaultBranchFlag, getRunnerArguments } from './misc';

describe('getOnlyDefaultBranchFlag', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/misc.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import path from 'path';
import type { Context } from '@actions/github/lib/context';
import { Utils, ContextHelper } from '@technote-space/github-action-helper';
import type { MainArguments } from '@technote-space/github-action-pr-helper/dist/types';
import type { ExecuteTask, CommandOutput } from '@technote-space/github-action-pr-helper/dist/types';
import path from 'path';
import { getInput, addPath } from '@actions/core' ;
import { Utils, ContextHelper } from '@technote-space/github-action-helper';
import { ACTION_NAME, ACTION_OWNER, ACTION_REPO, TARGET_NCU_COMMANDS, BIN_PATH, BIN_FILE } from '../constant';
import type { ExecuteTask, CommandOutput } from '@technote-space/github-action-pr-helper/dist/types';

const { getArrayInput, getBoolValue } = Utils;

Expand Down
Loading

0 comments on commit 6d5d800

Please sign in to comment.