Skip to content

Commit 650edc9

Browse files
committed
Improve internal naming
1 parent 8015768 commit 650edc9

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

rules/better-regex.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ const messages = {
1212
const create = context => {
1313
const {sortCharacterClasses} = context.options[0] || {};
1414

15-
const blacklist = [];
15+
const ignoreList = [];
1616

1717
if (sortCharacterClasses === false) {
18-
blacklist.push('charClassClassrangesMerge');
18+
ignoreList.push('charClassClassrangesMerge');
1919
}
2020

2121
return {
@@ -31,7 +31,7 @@ const create = context => {
3131
let optimized = original;
3232

3333
try {
34-
optimized = optimize(original, undefined, {blacklist}).toString();
34+
optimized = optimize(original, undefined, {blacklist: ignoreList}).toString();
3535
} catch {}
3636

3737
if (original === optimized) {

rules/no-fn-reference-in-iterator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const toSelector = name => {
7979
return `[callee.${'object.'.repeat(splitted.length)}name!="${splitted.shift()}"]`;
8080
};
8181

82-
// Select all the call expressions except the ones present in the blacklist
82+
// Select all the call expressions except the ones present in the ignore list.
8383
const ignoredCalleeSelector = [
8484
// `this.{map, filter, …}()`
8585
'[callee.object.type!="ThisExpression"]',

rules/prevent-abbreviations.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const defaultReplacements = {
225225
}
226226
};
227227

228-
const defaultWhitelist = {
228+
const defaultAllowList = {
229229
// React PropTypes
230230
// https://reactjs.org/docs/typechecking-with-proptypes.html
231231
propTypes: true,
@@ -272,7 +272,7 @@ const prepareOptions = ({
272272
replacements;
273273

274274
const mergedWhitelist = extendDefaultWhitelist ?
275-
defaultsDeep({}, whitelist, defaultWhitelist) :
275+
defaultsDeep({}, whitelist, defaultAllowList) :
276276
whitelist;
277277

278278
ignore = ignore.map(

test/no-fn-reference-in-iterator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ ruleTester.run('no-fn-reference-in-iterator', rule, {
8080
'foo.map(fn, extraArgument1, extraArgument2);',
8181
'foo.map(...argumentsArray)',
8282

83-
// Whitelisted
83+
// Allowed
8484
'Promise.map(fn)',
8585
'Promise.forEach(fn)',
8686
'lodash.map(fn)',

test/no-keyword-prefix.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const errorClass = {
88
messageId: 'noKeywordPrefix',
99
data: {keyword: 'class'}
1010
};
11-
const errorBlacklist = {
11+
const errorIgnoreList = {
1212
messageId: 'noKeywordPrefix',
1313
data: {keyword: 'old'}
1414
};
@@ -243,7 +243,7 @@ test({
243243
{
244244
code: 'const oldFoo = "foo"',
245245
options: [{blacklist: ['old']}],
246-
errors: [errorBlacklist]
246+
errors: [errorIgnoreList]
247247
},
248248
{
249249
code: 'const new_foo = "foo"',

test/prevent-abbreviations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ runTest({
16721672

16731673
runTest.babel({
16741674
valid: [
1675-
// Whitelisted names
1675+
// Allowed names
16761676
'Foo.defaultProps = {}',
16771677
outdent`
16781678
class Foo {

0 commit comments

Comments
 (0)