Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add eslint rule to warn about deprecated substr() usage
Signed-off-by: Tobias Speicher <[email protected]>
  • Loading branch information
CommanderRoot committed Nov 7, 2023
commit a47789940c3670648b32ff845f41415274cee976
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ module.exports = {
// allows custom xxxx:xxx events formats
ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'],
}],
'no-restricted-syntax': [
'warn',
'WithStatement',
{
'message': 'substr() is deprecated, use slice() or substring() instead',
'selector': "MemberExpression > Identifier[name='substr']"
}
],
},
settings: {
jsdoc: {
Expand Down