Skip to content

Commit 80c592e

Browse files
pvdlgsindresorhus
authored andcommitted
Enable unicorn/prefer-flat-map only for Node.js >= 11 (#403)
1 parent 223db40 commit 80c592e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

config/plugins.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ module.exports = {
245245
// 'eslint-comments/no-unlimited-disable': 'error',
246246

247247
'eslint-comments/no-unused-disable': 'error',
248-
'eslint-comments/no-unused-enable': 'error'
248+
'eslint-comments/no-unused-enable': 'error',
249+
250+
// Disabled by default, enabled only in Node.js >= 11 in option-manager.js
251+
'unicorn/prefer-flat-map': 'off'
249252
}
250253
};

lib/options-manager.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ const ENGINE_RULES = {
107107
},
108108
'prefer-named-capture-group': {
109109
'10.0.0': 'error'
110+
},
111+
'unicorn/prefer-flat-map': {
112+
'11.0.0': 'error'
110113
}
111114
};
112115

0 commit comments

Comments
 (0)