0.1.2 • Published 2 years ago

nrlint-plugin-rules-english-node-name v0.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

nrlint-plugin-rules-english-node-name

英語のノード名のみ許可するフローリンター用のカスタムルール

Node-REDフローエディタにインストールすると、以下のように英語のノード名でない場合に、警告を表示します。

npm.io

グローバルメンバでフロー開発を行うプロジェクトにて、日本メンバに日本語を使ってほしくない場合に便利です。

フローエディタへのインストール方法

  1. Node-REDのホームディレクトリへ移動
cd ~/.node-red
  1. フローリンターをインストール
npm install nrlint
  1. カスタムルールをインストール
npm install nrlint-plugin-rules-english-node-name
  1. Node-REDを起動
node-red

CLI版フローリンターでの利用方法

  1. フローリンターをインストール
npm install -g nrlint
  1. カスタムルールをインストール
npm install -g nrlint-plugin-rules-english-node-name
  1. 下記を設定ファイル.nrlintrc.jsに記載
module.exports = {
    "plugins": [
        "nrlint-plugin-rules-english-node-name"
    ],
    "rules": {
        "english-node-name": true
    }
}
  1. CLI版フローリンターを実行
nrlint flows.json

-> flows.json内のノードに日本語の名前を付けていると、以下の様な警告メッセージが出力される

╔══════════════════╤══════════╤══════════════════════════════════════════════════╤═══════════════════╗
║ Object ID        │ Severity │ Message                                          │ Rule              ║
╟──────────────────┼──────────┼──────────────────────────────────────────────────┼───────────────────╢
║ 33cf4f761bc66b31 │ warn     │ ノード名は英数字、または記号である必要があります         │ english-node-name ║
╚══════════════════╧══════════╧══════════════════════════════════════════════════╧═══════════════════╝
✖ 1 problems (0 errors, 1 warnings)
0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago