eslint-plugin-reiwa
v0.0.5
Published
ESLint rules to replace heisei with reiwa
Downloads
2
Readme
What's this?
This is the eslint plugin to replace 平成 with 令和 which is new era in Japan.
Examples
reiwa/no-heisei-in-literal
// incorrect
let str = "heisei";
str = "平成";
str = "Heisei will ended during the GW of 2019 this year.";
str = "平成の終わりは今年2019年のGW中になる見込みです。";
reiwa/no-heisei-in-variable-name
// incorrect
const theBeginningOfHeisei = 1989;
let heisei;
var 平成;
Getting started
Install
$ yarn add -D eslint-plugin-reiwa
# or
$ npm i -D eslint-plugin-reiwa
Edit .eslintrc.js
module.exports = {
plugins: [
...
"reiwa",
...
],
rules: {
"reiwa/no-heisei-in-literal": "error",
"reiwa/no-heisei-in-variable-name": "error",
...
}
}
or
module.exports = {
extends: ["plugin:reiwa/recommended"]
};
LICENSE
MIT