Skip to content

Commit

Permalink
chore(deps): use @html-validate/stylish
Browse files Browse the repository at this point in the history
instead of pulling `eslint`
  • Loading branch information
ext committed Nov 15, 2020
1 parent c93594a commit e7f42d1
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 61 deletions.
226 changes: 169 additions & 57 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
]
},
"dependencies": {
"@html-validate/stylish": "^1.0.0",
"argparse": "^2.0.1",
"eslint": "^7.13.0",
"find-up": "^5.0.0",
"tar": "^6.0.5"
},
Expand All @@ -77,6 +77,7 @@
"@types/tar": "4.0.3",
"@typescript-eslint/eslint-plugin": "4.7.0",
"@typescript-eslint/parser": "4.7.0",
"eslint": "7.13.0",
"eslint-plugin-jest": "24.1.3",
"execa": "4.1.0",
"glob": "7.1.6",
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import { existsSync, promises as fs } from "fs";
import path from "path";
import { ArgumentParser } from "argparse";
import findUp from "find-up";
import stylish from "@html-validate/stylish";
import { setupBlacklist } from "./blacklist";
import { verify } from "./verify";
import PackageJson from "./types/package-json";
import { tarballLocation } from "./tarball-location";

/* eslint-disable-next-line @typescript-eslint/no-var-requires */
const stylish = require("eslint/lib/cli-engine/formatters/stylish");

/* eslint-disable-next-line @typescript-eslint/no-var-requires */
const { version } = require("../package.json");

Expand Down
2 changes: 2 additions & 0 deletions src/package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export async function verifyPackageJson(pkg: PackageJson, filePath: string): Pro
filePath,
errorCount: messages.length,
warningCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 0,
},
];
}
2 changes: 2 additions & 0 deletions src/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ export interface Result {
filePath: string;
errorCount: number;
warningCount: number;
fixableErrorCount: number;
fixableWarningCount: number;
}
2 changes: 2 additions & 0 deletions src/shebang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export async function verifyShebang(pkg: PackageJson, tarball: string): Promise<
filePath,
errorCount: 1,
warningCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 0,
});
}

Expand Down
2 changes: 2 additions & 0 deletions src/tarball.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export async function verifyTarball(pkg: PackageJson, filePath: string): Promise
filePath,
errorCount: messages.length,
warningCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 0,
},
];
}
10 changes: 10 additions & 0 deletions tests/__snapshots__/integration.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Array [
Object {
"errorCount": 1,
"filePath": "tests/fixtures/disallowed-files/disallowed-files-1.0.0.tgz",
"fixableErrorCount": 0,
"fixableWarningCount": 0,
"messages": Array [
Object {
"column": 1,
Expand All @@ -24,6 +26,8 @@ Array [
Object {
"errorCount": 7,
"filePath": "tests/fixtures/empty-fields/package.json",
"fixableErrorCount": 0,
"fixableWarningCount": 0,
"messages": Array [
Object {
"column": 1,
Expand Down Expand Up @@ -85,6 +89,8 @@ Array [
Object {
"errorCount": 1,
"filePath": "tests/fixtures/missing-binary/missing-binary-1.0.0.tgz",
"fixableErrorCount": 0,
"fixableWarningCount": 0,
"messages": Array [
Object {
"column": 1,
Expand All @@ -104,6 +110,8 @@ Array [
Object {
"errorCount": 7,
"filePath": "tests/fixtures/missing-fields/package.json",
"fixableErrorCount": 0,
"fixableWarningCount": 0,
"messages": Array [
Object {
"column": 1,
Expand Down Expand Up @@ -165,6 +173,8 @@ Array [
Object {
"errorCount": 1,
"filePath": "tests/fixtures/missing-main/missing-main-1.0.0.tgz",
"fixableErrorCount": 0,
"fixableWarningCount": 0,
"messages": Array [
Object {
"column": 1,
Expand Down

0 comments on commit e7f42d1

Please sign in to comment.