You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i: false,// Do it at some point, but not ready for it yet. Maybe 2025.
71
+
72
+
// Not part of `eslint-plugin-unicorn`. Upstream them at some point.
73
+
bin: {
74
+
binary: true,
71
75
},
72
-
e: {
73
-
error: true,
74
-
event: true,
76
+
eof: {
77
+
endOfFile: true,
75
78
},
76
-
el: {
77
-
element: true,
79
+
impl: {
80
+
implement: true,
81
+
implementation: true,
78
82
},
79
-
elem: {
80
-
element: true,
83
+
anim: {
84
+
animation: true,
81
85
},
82
-
len: {
83
-
length: true,
86
+
calc: {
87
+
calculate: true,
84
88
},
85
-
msg: {
86
-
message: true,
89
+
dict: {
90
+
dictionary: true,
87
91
},
88
-
num: {
89
-
number: true,
92
+
dup: {
93
+
duplicate: true,
90
94
},
91
-
obj: {
92
-
object: true,
95
+
enc: {
96
+
encode: true,
97
+
encryption: true,
93
98
},
94
-
opts: {
95
-
options: true,
99
+
gen: {
100
+
generate: true,
101
+
general: true,
96
102
},
97
-
param: {
98
-
parameter: true,
103
+
gfx: {
104
+
graphics: true,
99
105
},
100
-
params: {
101
-
parameters: true,
106
+
inc: {
107
+
increment: true,
102
108
},
103
-
prev: {
104
-
previous: true,
109
+
iter: {
110
+
iterate: true,
111
+
iterator: true,
105
112
},
106
-
req: {
107
-
request: true,
113
+
nav: {
114
+
navigate: true,
115
+
navigation: true,
108
116
},
109
-
res: {
110
-
response: true,
111
-
result: true,
117
+
norm: {
118
+
normalize: true,
112
119
},
113
-
ret: {
114
-
returnValue: true,
120
+
notif: {
121
+
notification: true,
115
122
},
116
-
str: {
117
-
string: true,
123
+
perf: {
124
+
performance: true,
118
125
},
119
-
temp: {
120
-
temporary: true,
126
+
proc: {
127
+
process: true,
121
128
},
122
-
tmp: {
123
-
temporary: true,
129
+
rand: {
130
+
random: true,
124
131
},
125
-
val: {
126
-
value: true,
132
+
sys: {
133
+
system: true,
127
134
},
128
-
err: {
129
-
error: true,
135
+
temp: {
136
+
temporary: true,
130
137
},
131
138
},
132
139
},
@@ -153,13 +160,10 @@ module.exports = {
153
160
},
154
161
],
155
162
156
-
// Temporarily disabled because it's buggy with TypeScript: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2175
163
+
// Temporarily disabled because of https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2218
157
164
'unicorn/no-empty-file': 'off',
158
165
159
-
// TODO: Disabled for now until it becomes more stable: https://github.com/sindresorhus/eslint-plugin-unicorn/search?q=consistent-destructuring+is:issue&state=open&type=issues
160
-
'unicorn/consistent-destructuring': 'off',
161
-
162
-
// TODO: Disabled for now as I don't have time to deal with the backslash that might come from this. Try to enable this rule in 2021.
166
+
// TODO: Disabled for now as I don't have time to deal with the backslash that might come from this. Try to enable this rule in 2025.
163
167
'unicorn/no-null': 'off',
164
168
165
169
// We only enforce it for single-line statements to not be too opinionated.
@@ -355,10 +359,13 @@ module.exports = {
355
359
// 'n/shebang': 'error',
356
360
357
361
'n/no-deprecated-api': 'error',
358
-
'n/prefer-global/buffer': [
359
-
'error',
360
-
'never',
361
-
],
362
+
363
+
// We no longer enforce this as we don't want to use Buffer at all, but sometimes we need to conditionally use the `Buffer` global, but we then don't want the import so the module works cross-platform.
Copy file name to clipboardExpand all lines: readme.md
+7-5
Original file line number
Diff line number
Diff line change
@@ -384,7 +384,7 @@ If some files in your project are transpiled in order to support an older Node.j
384
384
385
385
For example, if your project targets Node.js 8 but you want to use the latest JavaScript syntax as supported in Node.js 12:
386
386
1. Set the `engines.node` property of your `package.json` to `>=8`
387
-
2. Configure [Babel](https://babeljs.io) to transpile your source files (in `src` directory in this example)
387
+
2. Configure [Babel](https://babeljs.io) to transpile your source files (in `source` directory in this example)
388
388
3. Make sure to include the transpiled files in your published package with the [`files`](https://docs.npmjs.com/files/package.json#files) and [`main`](https://docs.npmjs.com/files/package.json#main) properties of your `package.json`
389
389
4. Configure the XO `overrides` option to set `nodeVersion` to `>=12` for your source files directory
390
390
@@ -394,14 +394,16 @@ For example, if your project targets Node.js 8 but you want to use the latest Ja
0 commit comments