Skip to content

Commit

Permalink
Add eslint-plugin-simple-import-sort (actions#219)
Browse files Browse the repository at this point in the history
* Add eslint-plugin-simple-import-sort

* Update .eslintrc.json

* eslint --fix
  • Loading branch information
BSKY authored Mar 18, 2020
1 parent 206172e commit 6c471ae
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint", "jest"]
"plugins": ["@typescript-eslint", "simple-import-sort", "jest"],
"rules": {
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"simple-import-sort/sort": "error",
"sort-imports": "off"
}
}
1 change: 1 addition & 0 deletions __tests__/restore.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as core from "@actions/core";
import * as path from "path";

import * as cacheHttpClient from "../src/cacheHttpClient";
import { Events, Inputs } from "../src/constants";
import { ArtifactCacheEntry } from "../src/contracts";
Expand Down
1 change: 1 addition & 0 deletions __tests__/save.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as core from "@actions/core";
import * as path from "path";

import * as cacheHttpClient from "../src/cacheHttpClient";
import { Events, Inputs } from "../src/constants";
import { ArtifactCacheEntry } from "../src/contracts";
Expand Down
1 change: 1 addition & 0 deletions __tests__/tar.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as exec from "@actions/exec";
import * as io from "@actions/io";

import * as tar from "../src/tar";

jest.mock("@actions/exec");
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jest": "^23.0.3",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-simple-import-sort": "^5.0.2",
"jest": "^24.8.0",
"jest-circus": "^24.7.1",
"nock": "^11.7.0",
Expand Down
5 changes: 3 additions & 2 deletions src/cacheHttpClient.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as core from "@actions/core";
import * as fs from "fs";
import { BearerCredentialHandler } from "@actions/http-client/auth";
import { HttpClient, HttpCodes } from "@actions/http-client";
import { BearerCredentialHandler } from "@actions/http-client/auth";
import {
IHttpClientResponse,
IRequestOptions,
ITypedResponse
} from "@actions/http-client/interfaces";
import * as fs from "fs";

import {
ArtifactCacheEntry,
CommitCacheRequest,
Expand Down
1 change: 1 addition & 0 deletions src/restore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as core from "@actions/core";
import * as path from "path";

import * as cacheHttpClient from "./cacheHttpClient";
import { Events, Inputs, State } from "./constants";
import { extractTar } from "./tar";
Expand Down
1 change: 1 addition & 0 deletions src/save.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as core from "@actions/core";
import * as path from "path";

import * as cacheHttpClient from "./cacheHttpClient";
import { Events, Inputs, State } from "./constants";
import { createTar } from "./tar";
Expand Down

0 comments on commit 6c471ae

Please sign in to comment.