Skip to content

Commit

Permalink
check for forbidden properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ronny1982 committed Nov 24, 2024
1 parent b5969f3 commit be78e02
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ export default tseslint.config({
'no-multi-spaces': 'error',
'no-throw-literal': 'error',
'tsdoc/syntax': 'warn',
/**
* Use restricted properties as workaround to address a flaw in the typescript system of global declarations.
* Globally declared modules (such as @types/node::Buffer) should be declared for e.g., tests but must not be declared for the web-application (browsers do not have `Buffer`).
* Unfortunately, once included these are available everywhere in the workspace without exception.
* See also: https://github.com/microsoft/TypeScript/issues/50424
*/
'no-restricted-properties': [ 'error', {
"object": "Buffer",
"property": "from"
} ],
'@typescript-eslint/naming-convention': [ 'error', // See: https://typescript-eslint.io/rules/naming-convention/#options
/*
{
Expand Down

0 comments on commit be78e02

Please sign in to comment.