-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.cjs
110 lines (104 loc) · 3.24 KB
/
index.cjs
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
'use strict'
const terminology = require('textlint-rule-terminology')
const stopwords = require('textlint-rule-stop-words')
const misspellings = require('textlint-rule-common-misspellings')
const writegood = require('textlint-rule-write-good')
const titlecase = require('textlint-rule-title-case')
const apostrophe = require('textlint-rule-apostrophe')
module.exports = {
rules: {
terminology,
'stop-words': stopwords,
'common-misspellings': misspellings,
'write-good': writegood,
'title-case': titlecase,
apostrophe,
},
rulesConfig: {
terminology: {
defaultTerms: false,
skip: ['Blockquote', 'Header', 'Link', 'Emphasis', 'Strong'],
terms: [
// Brands
'Airbnb',
'AVA',
'Browsersync',
'ESLint',
'JavaScript',
'Lodash',
'Markdown',
'Sass',
'TypeScript',
'UglifyJS',
['JSDocs?', 'JSDoc'],
// Official is Node.js, but it’s way too complicated
['Node[ .]js', 'Node'],
['React[ .]js', 'React'],
['StackOverflow', 'Stack Overflow'],
['HTTP[ /]2(?:\\.0)?', 'HTTP/2'],
['OS X', 'macOS'],
['Mac ?OS', 'macOS'],
['a npm', 'an npm'],
'npm',
'styled-components',
'react-router',
'ECMAScript',
'Amazon',
'Facebook',
'AWS',
'Heroku',
'Netlify',
'STRV',
'InVision',
'Google',
'GitHub',
'Microsoft',
// Words and phrases
// http://stackoverflow.com/questions/1151338/id-or-id-on-user-interface
'ID',
["id['’]?s", 'IDs'],
['back[- ]end(\\w*)', 'backend$1'],
['front[- ]end(\\w*)', 'frontend$1'],
['end ?to ?end', 'end-to-end'],
['hot[- ]key', 'hotkey'],
['build system(s?)', 'build tool$1'],
['CLI tool(s?)', 'command line tool$1'],
['web[- ]?site(s?)', 'site$1'],
['repo\\b', 'repository'],
['style-?guide(s?)', 'style guide$1'],
['change-?log(s?)', 'change log$1'],
['source-?map(s?)', 'source map$1'],
['pre[- ]release(s?)', 'prerelease$1'],
['server ?side', 'server-side'],
['client ?side', 'client-side'],
['filetype(s?)', 'file type$1'],
['auto[- ]?complete', 'autocomplete'],
['auto[- ]?format', 'autoformat'],
['auto[- ]?fix', 'autofix'],
['auto[- ]?fixing', 'autofixing'],
['bug[- ]?fix(es?)', 'bugfix$1'],
['lock[- ]?file(s?)', 'lockfile$1'],
['name[- ]space(s?)', 'namespace$1'],
['tree-?shaking', 'tree shaking'],
['css-?in-?js', 'CSS in JS'],
['higher ?order', 'higher-order'],
// Starts from a lower case letter in the middle of a sentence
['(\\w+[^.?!]\\)? )internet', '$1internet'],
['(\\w+[^.?!]\\)? )stylelint', '$1stylelint'],
// ["(\\w+[^.?!]\\)? )webpack", "$1webpack"]
],
},
'stop-words': true,
'common-misspellings': true,
'write-good': {
adverb: false,
passive: false,
tooWordy: false,
weasel: false,
},
'title-case': {
exclusions: ['documentation.js', 'gh-lint', 'lint-staged', 'npm', 'webpack', 'size-limit'],
},
apostrophe: true,
},
}