Helps the team(you) stick to English throuout the codebase. In other words, it helps the team(you) not rely on Japanese🇯🇵)
- with Yarn
yarn add -D eslint-plugin-no-jp
- with npm
npm install eslint-plugin-no-jp --save-dev
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
]
}
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"
}
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"
MIT