forked from rowanmanning/joblint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbro-culture.js
37 lines (32 loc) · 1.01 KB
/
bro-culture.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
module.exports = defineRules;
var broWords = [
/bros?/,
/brogramm(?:er|ers|ing)/,
'crank',
'crush',
/dude(?:bro)?s?/,
/hard[\s\-]*core/,
'hella',
'skillz'
];
function defineRules (linter) {
// Bro terminology
linter.addRule({
name: 'Bro Terminology',
desc: 'Bro culture terminology can really reduce the number of people likely to show ' +
'interest, both male and female. It discriminates against anyone who doesn\'t fit ' +
'into a single gender-specific archetype.',
test: function (spec, result) {
var broMentions = spec.containsAnyOf(broWords);
var amount = (broMentions.length > 2 ? 'Lots of' : 'Some');
if (broMentions.length > 0) {
result.addWarning(
amount + ' "bro culture" terminology is used',
broMentions
);
result.addCultureFailPoints(broMentions.length);
}
}
});
}