See the default config here
Configuration for finding all the instances where modules are executed.
List of scripts in your package.json
used only for development.
Passed to string.match
Example:
executedModules:
npmScripts:
dev:
- test
Shell scripts used only for development. Uses minimatch
Example:
executedModules:
shellScripts:
dev:
- bin/test
Shell scripts that should be ignored. Uses minimatch
Example:
executedModules:
shellScripts:
ignore:
- node_modules/**/*
All shell scripts. Uses minimatch
This is the starting point, executedModules.shellScripts.dev
and executedModules.shellScripts.ignore
should be
subsets of this pattern.
Example:
executedModules:
shellScripts:
root: 'bin/*'
Mapping from error to a list of modules that will be ignored.
Passed to string.match
Please create an issue anytime you need to use this
Example:
ignoreErrors:
missing: []
shouldBeDependency: []
shouldBeDevDependency: []
unused:
- mocha
Configuration for finding all the instances where modules are required.
Options passed to detective which is passes onto acorn
default:
requiredModules:
acornParseProps:
ecmaVersion: 6
Files used only for development. Uses minimatch
Example:
requiredModules:
files:
dev:
- '**/*_test.js'
Files that should be ignored. Uses minimatch
Example:
requiredModules:
files:
ignore:
- 'dist/**/*'
All source files. Uses minimatch
This is the starting point, requiredModules.files.dev
and requiredModules.files.ignore
should be
subsets of this pattern.
default:
requiredModules:
files:
root: '**/*.js'
Whether or not to ignore anything before a !
in require statements
Useful for webpack loaders and RequireJS loader plugins
Example:
requiredModules:
stripLoaders: true
Transpiles code to javascript based on its extension.
Each transpiler should specify an extension
and a module
and optionally a fnName
(which defaults to compile
) and a resultKey
.
For each file with extension
, the following will be called:
var result = require(module)[fnName](fileContents, {filename: filePath});
if (resultKey) {
result = result[resultKey]
}
If the transpiler you're using doesn't fit into this pattern, please open an issue
Example:
requiredModules:
transpilers:
- extension: .coffee
module: coffee-script # 1.9.0
- extension: .js
fnName: transformSync
module: @babel/core # 7.2.2
resultKey: code
- extension: .ls
module: livescript # 1.5.0