eslint-plugin-reiwa

0.0.5 • Public • Published

eslint-plugin-reiwa

GitHub license NPM Version NPM Downloads build:

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    0
    • latest

Version History

Package Sidebar

Install

npm i eslint-plugin-reiwa

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

8.08 kB

Total Files

9

Last publish

Collaborators

  • otofu-square