Skip to content

Commit 8afa3d8

Browse files
committed
start of work
1 parent 1430a97 commit 8afa3d8

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

plugins/eslint-plugin-aws-toolkits/lib/rules/no-json-stringify-in-log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function isTemplateWithStringifyCall(node: TSESTree.CallExpressionArgument): boo
3333
* Check if node is representing syntax of the form getLogger().f(msg) for some f and msg or
3434
* if it is doing so indirectly via a logger variable.
3535
*/
36-
function isLoggerCall(node: TSESTree.CallExpression): boolean {
36+
export function isLoggerCall(node: TSESTree.CallExpression): boolean {
3737
return (
3838
(node.callee.type === AST_NODE_TYPES.MemberExpression &&
3939
node.callee.object.type === AST_NODE_TYPES.CallExpression &&
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*!
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
import { ESLintUtils, TSESTree } from '@typescript-eslint/utils'
6+
7+
export default ESLintUtils.RuleCreator.withoutDocs({
8+
meta: {
9+
docs: {
10+
description: 'ensure string substitution args and templates match',
11+
recommended: 'recommended',
12+
},
13+
messages: {},
14+
type: 'problem',
15+
fixable: 'code',
16+
schema: [],
17+
},
18+
defaultOptions: [],
19+
create(context) {
20+
return {}
21+
},
22+
})

0 commit comments

Comments
 (0)