Skip to content

Commit c6f129f

Browse files
fix: node 6 and node 7 support (#44)
1 parent 69ba52b commit c6f129f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

configs.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ function getJavascriptConfig() {
138138

139139
// https://node.green/
140140
switch (minVersion) {
141+
case 6: {
142+
const config = { ...configs["javascript/es2016"] };
143+
144+
config.rules["prefer-exponentiation-operator"] = "off";
145+
146+
return config;
147+
}
148+
case 7:
149+
return configs["javascript/es2016"];
141150
case 8:
142151
case 9:
143152
return configs["javascript/es2017"];

configs/javascript.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,10 @@ function getConfig(esVersion) {
12151215
config.rules["unicorn/prefer-spread"] = "off";
12161216
}
12171217

1218+
if (esVersion < 2018) {
1219+
config.rules["prefer-object-spread"] = "off";
1220+
}
1221+
12181222
if (esVersion < 2019) {
12191223
config.rules["unicorn/prefer-array-flat"] = "off";
12201224
config.rules["unicorn/prefer-array-flat-map"] = "off";

0 commit comments

Comments
 (0)