Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update husky hooks #359

Merged
merged 1 commit into from
Jul 29, 2024
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
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install commitlint --edit $1
commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install lint-staged
lint-staged
17 changes: 9 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"eslint-plugin-import": "^2.29.1",
"file-loader": "^6.2.0",
"fs-extra": "^11.2.0",
"husky": "^9.0.11",
"husky": "^9.1.3",
"jest": "^29.7.0",
"lint-staged": "^15.2.7",
"npm-run-all": "^4.1.5",
Expand Down
14 changes: 7 additions & 7 deletions types/getStylelint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ declare namespace getStylelint {
Worker,
};
}
type Options = import('./options').Options;
type Linter = {
stylelint: Stylelint;
lintFiles: LintTask;
cleanup: AsyncTask;
threads: number;
};
type Stylelint = {
lint: (options: LinterOptions) => Promise<LinterResult>;
formatters: {
Expand All @@ -41,8 +34,15 @@ type LinterOptions = import('stylelint').LinterOptions;
type LinterResult = import('stylelint').LinterResult;
type Formatter = import('stylelint').Formatter;
type FormatterType = import('stylelint').FormatterType;
type Options = import('./options').Options;
type AsyncTask = () => Promise<void>;
type LintTask = (files: string | string[]) => Promise<LintResult[]>;
type Linter = {
stylelint: Stylelint;
lintFiles: LintTask;
cleanup: AsyncTask;
threads: number;
};
type Worker = JestWorker & {
lintFiles: LintTask;
};
Expand Down
8 changes: 4 additions & 4 deletions types/linter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ declare namespace linter {
LintResultMap,
};
}
type Options = import('./options').Options;
type Compilation = import('webpack').Compilation;
type Linter = (files: string | string[]) => void;
type Reporter = () => Promise<Report>;
type Compiler = import('webpack').Compiler;
type Compilation = import('webpack').Compilation;
type Stylelint = import('./getStylelint').Stylelint;
type LintResult = import('./getStylelint').LintResult;
type LinterResult = import('./getStylelint').LinterResult;
type Formatter = import('./getStylelint').Formatter;
type FormatterType = import('./getStylelint').FormatterType;
type Options = import('./options').Options;
type GenerateReport = (compilation: Compilation) => Promise<void>;
type Report = {
errors?: StylelintError;
warnings?: StylelintError;
generateReportAsset?: GenerateReport;
};
type Reporter = () => Promise<Report>;
type Linter = (files: string | string[]) => void;
type LintResultMap = {
[files: string]: LintResult;
};
Expand Down