This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
/
.textlintrc.js
132 lines (126 loc) · 3.87 KB
/
.textlintrc.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// https://github.com/survivejs/maintenance-book/blob/master/.textlintrc
module.exports = {
rules: {
terminology: {
defaultTerms: false,
skip: ['Blockquote', 'Header', 'Link', 'Emphasis', 'Strong'],
terms: [
// Brands
'Airbnb',
'AVA',
'Browsersync',
'ESLint',
'JavaScript',
'Lodash',
'Markdown',
'Sass',
'TypeScript',
'UglifyJS',
['JSDocs?', 'JSDoc'],
['Node[ .]js', 'Node'], // Official is Node.js, but it’s way too complicated
['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',
// Simplify
// ['transpile', 'compile'],
// ['In addition,', 'Also,'],
// ['is able to', 'can'],
// ['probably', ''],
// ['known as', ''],
// ['Angular', 'AngularJS'],
// ['with minimal effort', ''],
// ['typically', 'usually'],
// ['really', ''],
// ['just', ''],
// ['simple', ''],
// ['simply', ''],
// ['obvious', ''],
// ['straightforward', ''],
// ['very', ''],
// ['basically', ''],
// ['pretty', ''],
// ['easy', ''],
// ['useful', ''],
// ['interesting', ''],
// ['In order to', 'To'],
// ['in order to', 'to'],
// ['us', ''],
// ["I['’]ll", ''],
// ["I['’]ve", ''],
// ["we['’]ll", ''],
// ["they['’]ll", ''],
// ['it is', 'it’s'],
// ['It is', 'It’s'],
// ["I", ""], // This should be skipped for foreword/preface
// ["may", ""], // This should be a warning
// ECMAScript
'ECMAScript',
// ["ES2015", "ES6"],
// ["ES7", "ES2016"],
// Words and phrases
'ID', // http://stackoverflow.com/questions/1151338/id-or-id-on-user-interface
["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"]
// Typos
['environemnt(s?)', 'environment$1'],
['pacakge(s?)', 'package$1'],
],
},
'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,
},
filters: {
comments: true,
},
}