Describe the bug
When linting .eslintrc.js
or .eslintrc.cjs
, the built in no-template-curly-in-string
rule reports a problem with the connections.transform
syntax with a dollar sign in a non-template string:
module.exports = {
plugins: ['@ts-safeql/eslint-plugin'],
rules: {
'@ts-safeql/check-sql': [
'error',
{
connections: [
{
databaseUrl: `postgres://postgres:[email protected]:5432/postgres`,
tagName: 'sql',
transform: '${type}[]', // 💥 Unexpected template string expression. (`no-template-curly-in-string`)
},
],
},
],
},
};
To Reproduce
Steps to reproduce the behavior:
no-template-curly-in-string
to be a warning or error.eslintrc.js
file with the connections.transform
option as specified in the code block aboveExpected behavior
The recommended connections.transform
configuration shouldn't cause an error with a built-in ESLint rule.
Maybe an alternative syntax that doesn't use the dollar?
Screenshots
--
Desktop (please complete the following information):
@ts-safeql/[email protected]
Additional context
--
Thanks for the fix in @ts-safeql/[email protected]
@Newbie012!
Owner Name | ts-safeql |
Repo Name | safeql |
Full Name | ts-safeql/safeql |
Language | TypeScript |
Created Date | 2022-09-08 |
Updated Date | 2023-03-16 |
Star Count | 795 |
Watcher Count | 5 |
Fork Count | 14 |
Issue Count | 7 |
Issue Title | Created Date | Updated Date |
---|