Skip to content

Commit 3cb6588

Browse files
authored
Disable unicorn/prefer-node-protocol (#287)
1 parent 59680a9 commit 3cb6588

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.changeset/odd-owls-relate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/eslint-plugin': minor
3+
---
4+
5+
Disable unicorn/prefer-node-protocol

src/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ module.exports.configs = {
175175
// There isn't a good reason to force use of Number.POSITIVE_INFINITY instead of Infinity
176176
{ checkInfinity: false },
177177
],
178+
// The node: protocol for imports is supported for imports starting in node 12
179+
// and for require()'s starting in node 16.
180+
// Since for most projects, we are transpiling imports to requires,
181+
// This rule is not ready until we only support node 16+
182+
'unicorn/prefer-node-protocol': 'off',
178183
// This rule suggests incorrect code with the destructured object is modified
179184
// That is a fairly common case, and it is too annoying to always disable the rule on each line
180185
'unicorn/consistent-destructuring': 'off',

0 commit comments

Comments
 (0)