Aliasing ajel
When picking a name for ajel
I made sure to pick a beautiful chord to type. However, I understand that some people may not like the name ajel
and may want to alias it to something else.
I may recommend the name blimpy (opens in a new tab) as it is also a beautiful chord to type. If you want to alias ajel
to a different name, you can do so by passing the ajelAlias
option to the rules you want to use.
This example .eslintrc.js
shows how to alias ajel
to a different name. Providing an alias to these rules will produce the proper in-editor hints and expected functionality from the linter.
module.exports = {
plugins: ['ajel-go'],
extends: [
'plugin:ajel/recommended',
],
rules: {
'ajel-go/ajel-const-tuples': [
'error',
{
ajelAlias: "blimpy",
sjelAlias: "limpyb",
},
],
'ajel-go/ajel-require-tuple-declaration': [
'error',
{
ajelAlias: 'blimpy',
sjelAlias: "limpyb",
},
],
'ajel-go/ajel-disable-try-catch': [
'error',
{
ajelAlias: 'blimpy',
sjelAlias: "limpyb",
},
'ajel/sjel-require-currying': [
'error',
{
sjelAlias: "limpyb",
},
//Use one of the two following rules
'ajel-go/ajel-require-error-handling': [
'error',
{
ajelAlias: 'blimpy',
sjelAlias: "limpyb",
},
],
//'ajel-go/ajel-strict-error-instanceof': [
// 'off',
// {
// ajelAlias: 'blimpy',
// sjelAlias: "limpyb",
// },
//],
},
}
Then use the rename function in the import statement.
import { ajel as blimpy, sjel as limpyb } from 'ajel-go';