chore(tools): add linting, fomatting and other tools

This commit is contained in:
Mrugesh Mohapatra
2018-06-11 19:24:25 +05:30
committed by mrugesh mohapatra
parent 5e2c24e3b8
commit 46e40f5aba
9 changed files with 3390 additions and 61 deletions

24
commitlint.config.js Normal file
View File

@ -0,0 +1,24 @@
/* eslint-env node */
const { types, scopes, allowCustomScopes } = require('./commitizen.config');
const validTypes = types.map(type => type.value);
const validScopes = scopes.map(scope => scope.name);
const scopeValidationLevel = allowCustomScopes ? 0 : 2;
module.exports = {
extends: ['@commitlint/config-conventional'],
// Add your own rules. See http://marionebl.github.io/commitlint
rules: {
// Apply valid scopes and types
'scope-enum': [scopeValidationLevel, 'always', validScopes],
'type-enum': [2, 'always', validTypes],
// Disable subject-case rule
'subject-case': [0, 'always'],
// Disable language rule
lang: [0, 'always', 'eng']
}
};