Skip to content

Commit

Permalink
Ban Buffer in favor of Uint8Array
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 30, 2023
1 parent 5f45eda commit d7fff2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ module.exports = {
message: 'Use `undefined` instead. See: https://github.com/sindresorhus/meta/issues/7',
fixWith: 'undefined'
},
Buffer: {
message: 'Use Uint8Array instead. See: https://sindresorhus.com/blog/goodbye-nodejs-buffer',
suggest: [
'Uint8Array'
]
},
'[]': 'Don\'t use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.',
'[[]]': 'Don\'t use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.',
'[[[]]]': 'Don\'t use `[[[]]]`. Use `SomeType[][][]` instead.',
Expand Down

0 comments on commit d7fff2e

Please sign in to comment.