Skip to content

Commit

Permalink
fix(cli): remove no-any warning from model template
Browse files Browse the repository at this point in the history
Disabling the no-any warning that happens when a model allows additional properties
  • Loading branch information
nabdelgadir committed Jun 21, 2019
1 parent fedb6a7 commit 264aa28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/cli/generators/model/templates/model.ts.ejs
Expand Up @@ -26,6 +26,7 @@ export class <%= className %> extends <%= modelBaseClass %> {
// Define well-known properties here
// Indexer property to allow additional data
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[prop: string]: any;
<% } -%>
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/test/integration/generators/model.integration.js
Expand Up @@ -198,6 +198,10 @@ describe('lb4 model integration', () => {
expectedModelFile,
/export class Test extends Entity {/,
);
assert.fileContent(
expectedModelFile,
/eslint-disable-next-line \@typescript-eslint\/no-explicit-any/,
);
assert.fileContent(expectedModelFile, /\[prop: string\]: any;/);
});

Expand Down

0 comments on commit 264aa28

Please sign in to comment.