Skip to content

Commit

Permalink
chore: add knip to validate included dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Aug 6, 2024
1 parent a777fd1 commit 5c2989f
Show file tree
Hide file tree
Showing 5 changed files with 1,107 additions and 4,623 deletions.
39 changes: 39 additions & 0 deletions .knip.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://unpkg.com/knip@5/schema-jsonc.json",
"entry": [
"bin/mocha.js!",
"bin/_mocha!",
"browser-entry.js!",
"index.js!",
"lib/cli/index.js!",
".eleventy.js",
"karma.conf.js"
],
"project": [
"{bin,lib,scripts,test}/**/*.{js,ts,mjs,cjs}"
],
"ignore": [
"test/integration/fixtures/esm/type-module/test-that-imports-non-existing-module.fixture.js",
"test/integration/fixtures/options/watch/test-with-dependency.fixture.js"
],
"ignoreDependencies": [
"@mocha/docdash",
"coffeescript",
"fake",
"jsdoc-ts-utils",
"karma-chrome-launcher",
"karma-mocha-reporter",
"karma-mocha",
"karma-sauce-launcher",
"non-existent-package"
],
"mocha": {
"entry": ["test/**/*.{js,ts,mjs,cjs}"]
},
"webpack": {
"config": "test/browser-specific/fixtures/webpack/webpack.config.js"
},
"rules": {
"exports": "off"
}
}
9 changes: 5 additions & 4 deletions lib/cli/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* @module
*/

exports.init = require('./init');

// default command
exports.run = require('./run');
module.exports = {
init: require('./init'),
// default command
run: require('./run'),
}
2 changes: 1 addition & 1 deletion lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const {
} = require('./run-helpers');
const {ONE_AND_DONES, ONE_AND_DONE_ARGS} = require('./one-and-dones');
const debug = require('debug')('mocha:cli:run');
const defaults = require('../mocharc');
const defaults = require('../mocharc.json');
const {types, aliases} = require('./run-option-metadata');

/**
Expand Down
Loading

0 comments on commit 5c2989f

Please sign in to comment.