acot uses a naming convention when referencing packages in acot's ecosystem. The naming convention is inspired by the ESLint rules.
This naming convention translates package names and their shorthands into each other.
The following three tokens are used for the naming convention format.
Token | Description |
---|---|
<context> |
The context used on the acot ecosystem. |
<name> |
The package identity. |
@<scope> |
The package scope name. |
Using these tokens, the package name and its shorthand are converted as follows:
Package Name | Shorthand |
---|---|
acot-<context>-<name> |
<name> |
@<scope>/acot-<context> |
@<scope> |
@<scope>/acot-<context>-<name> |
@<scope>/<name> |
The target contexts are as follows:
preset
config
runner
reporter
The following is an example used in the configuration file.
module.exports = {
presets: [
// acot-preset-foo
'foo',
// @example/acot-preset
'@example',
// @example/acot-preset-bar
'@example/bar',
],
extends: [
// acot-config-foo
'foo',
// @example/acot-config
'@example',
// @example/acot-config-bar
'@example/bar',
],
// acot-runner-baz
runner: 'baz',
// @example/acot-reporter-qux
reporters: ['@example/qux'],
};