mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Forbid raw enums (no-changelog)
This commit is contained in:
@@ -397,6 +397,18 @@ const config = (module.exports = {
|
||||
},
|
||||
],
|
||||
|
||||
/**
|
||||
* https://www.typescriptlang.org/docs/handbook/enums.html#const-enums
|
||||
*/
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
{
|
||||
selector: 'TSEnumDeclaration:not([const=true])',
|
||||
message:
|
||||
'Do not declare raw enums as it leads to runtime overhead. Use const enum instead. See https://www.typescriptlang.org/docs/handbook/enums.html#const-enums',
|
||||
},
|
||||
],
|
||||
|
||||
// ----------------------------------
|
||||
// import
|
||||
// ----------------------------------
|
||||
|
||||
Reference in New Issue
Block a user