@ka1do/kit
Version:
59 lines (55 loc) • 1.9 kB
JavaScript
;
const find = require('ramda/src/find');
const createAstUtils = require('../util/ast');
module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Enforces consistent use of mocha interfaces'
},
schema: [
{
type: 'object',
properties: {
interface: {
type: 'string',
enum: [ 'BDD', 'TDD', 'Exports', 'QUnit' ],
default: 'BDD'
},
allowedAliases: {
type: 'object',
properties: {
suite: {
type: 'array',
items: {
type: 'string',
enum: [ 'describe', 'context' ]
},
default: [ 'describe', 'context' ]
},
testCase: {
type: 'array',
items: {
type: 'string',
enum: [ 'it', 'specify' ]
},
default: [ 'it', 'specify' ]
}
},
additionalProperties: false
}
},
additionalProperties: false
}
]
},
create(context) {
const astUtils = createAstUtils(context.settings);
const [ config = {} ] = context.options;
const { interface = 'BDD', allowedAliases = {} } = config;
return {
CallExpression(node) {
}
};
}
};