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

fix(commitlint): 🐛 repair commitlint configuration failures #103

Merged
merged 3 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 3 additions & 1 deletion src/lib/commitlint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
* @since 2020-04-28 14:37
* @author vivaxy
*/
import load from '@commitlint/load';
import load from '../modules/@commitlint/load/lib/load';
import rules from '@commitlint/rules';
import { RulesConfig, RuleConfigSeverity } from '@commitlint/types/lib/rules';
import { Commit } from '@commitlint/types/lib/parse';
import { appendLine } from './output';

class Commitlint {
private ruleConfigs: Partial<RulesConfig> = {};
Expand All @@ -17,6 +18,7 @@ class Commitlint {
return rules;
} catch (e) {
// catch if `Cannot find module "@commitlint/config-conventional"` happens.
appendLine(`[warning]: ${e.message}`);
return {};
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/modules/@commitlint/load/lib/load.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { UserConfig, LoadOptions, QualifiedConfig } from '@commitlint/types';
export default function load(
seed?: UserConfig,
options?: LoadOptions,
): Promise<QualifiedConfig>;
//# sourceMappingURL=load.d.ts.map
123 changes: 123 additions & 0 deletions src/modules/@commitlint/load/lib/load.js

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

7 changes: 7 additions & 0 deletions src/modules/@commitlint/load/lib/utils/load-plugin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { PluginRecords } from '@commitlint/types';
export default function loadPlugin(
plugins: PluginRecords,
pluginName: string,
debug?: boolean,
): PluginRecords;
//# sourceMappingURL=load-plugin.d.ts.map
73 changes: 73 additions & 0 deletions src/modules/@commitlint/load/lib/utils/load-plugin.js

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

134 changes: 134 additions & 0 deletions src/modules/@commitlint/resolve-extends/lib/index.js

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

28 changes: 28 additions & 0 deletions src/modules/import-fresh/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
Import a module while bypassing the cache.

@example
```
// foo.js
let i = 0;
module.exports = () => ++i;

// index.js
import importFresh = require('import-fresh');

require('./foo')();
//=> 1

require('./foo')();
//=> 2

importFresh('./foo')();
//=> 1

importFresh('./foo')();
//=> 1
```
*/
declare function importFresh(moduleId: string): unknown;

export = importFresh;
Loading