Socket
Socket
Sign inDemoInstall

eslint-plugin-kaizai

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-kaizai - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

8

dist/rules/no-chinese-character.js

@@ -9,7 +9,7 @@ "use strict";

exports.default = RuleCreator({
name: "no-console-log",
name: "no-chinese-character",
meta: {
type: "problem",
docs: {
description: "Disallow console.log",
description: "could not have chinese character",
recommended: "error"

@@ -19,3 +19,3 @@ },

messages: {
'noChineseCharacter': "console.log is not allowed"
'noChineseCharacter': "could not have chinese character"
}

@@ -34,3 +34,3 @@ },

Literal(node) {
if (isChineseCharacter(node.value.value)) {
if (typeof node.value === 'string' && isChineseCharacter(node.value)) {
report(node);

@@ -37,0 +37,0 @@ }

{
"name": "eslint-plugin-kaizai",
"version": "1.0.15",
"version": "1.0.16",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

import { ESLintUtils } from "@typescript-eslint/experimental-utils";
import { TSESTree } from "@typescript-eslint/experimental-utils";
import { isStringLiteral } from "typescript";

@@ -14,7 +15,7 @@ const RuleCreator = ESLintUtils.RuleCreator(name => name);

export default RuleCreator<Options, MessageIds>({
name: "no-console-log",
name: "no-chinese-character",
meta: {
type: "problem",
docs: {
description: "Disallow console.log",
description: "could not have chinese character",
recommended: "error"

@@ -24,3 +25,3 @@ },

messages: {
'noChineseCharacter': "console.log is not allowed"
'noChineseCharacter': "could not have chinese character"
}

@@ -40,4 +41,4 @@ },

return {
Literal(node) {
if (isChineseCharacter((node as any).value.value)) {
Literal(node: TSESTree.Literal) {
if (typeof node.value === 'string' && isChineseCharacter(node.value)) {
report(node);

@@ -44,0 +45,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc