Socket
Socket
Sign inDemoInstall

eslint-plugin-no-jp

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-no-jp

Make sure nothing is written in Japanese


Version published
Maintainers
1
Install size
18.1 kB
Created

Readme

Source

eslint-plugin-no-jp

npm CI npm bundle size

Overview

Helps the team(you) stick to English throuout the codebase. In other words, it helps the team(you) not rely on Japanese🇯🇵)

Installation

  • with Yarn
yarn add -D eslint-plugin-no-jp
  • with npm
npm install eslint-plugin-no-jp --save-dev

Usage

Add eslint-plugin-no-jp to the plugins section and add the rules to the rules section of your .eslintrc configuration file. (You can also omit the eslint-plugin- prefix.)

{
    "plugins": [
        "eslint-plugin-no-jp"
    ],
    "rules": [
        "no-jp/no-jp-identifier": 2,
        "no-jp/no-jp-comment": 2
    ]
}

📖 Rule Details

no-jp/no-jp-comment

Examples of 👎 incorrect code for this rule:

// 日本語のコメントを書いているとLintに怒られる
const greeting = () => {
    return "Hello"
}

Examples of 👍 correct code for this rule:

// Gotta stick to English
const greeting = () => {
    return "Hello"
}

no-jp/no-jp-identifiers

Examples of 👎 incorrect code for this rule:

const 日本語の関数名 = () => {
    return "Hello"
}

const 日本語の変数 = "Konnichiha"

Examples of 👍 correct code for this rule:

const stickToEnglish = () => {
    return "Hello"
}

const englishVar = "Hello World"

📜LICENCE

MIT

Keywords

FAQs

Last updated on 25 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc