@web-io/lint

1.0.1 • Public • Published

Web Lints Package

  • eslint & stylelint configurations
  • vue & react frameworks lint rules
  • eslint typescript lint rules

Usage

eslint

  • 方式1
const cfg = require("@web-io/lint/eslint");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;
  • 方式2
const {eslint: cfg} = require("@web-io/lint");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;

eslint-ts

  • 方式1
const cfg = require("@web-io/lint/eslint/eslint-ts");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;
  • 方式2
const {eslintTs: cfg} = require("@web-io/lint");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;

eslint-vue

  • 方式1
const cfg = require("@web-io/lint/eslint/eslint-vue");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;
  • 方式2
const {eslintVue: cfg} = require("@web-io/lint");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;

eslint-react

  • 方式1
const cfg = require("@web-io/lint/eslint/eslint-react");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;
  • 方式2
const {eslintReact: cfg} = require("@web-io/lint");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;

stylelint

  • 方式1
const cfg = require("@web-io/lint/stylelint");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;
  • 方式2
const {stylelint: cfg} = require("@web-io/lint");
cfg.rules = Object.assign(cfg.rules || {}, {
  // add or override rules
});
module.exports = cfg;

Status

see CHANGELOG

Package Sidebar

Install

npm i @web-io/lint

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

15.4 kB

Total Files

55

Last publish

Collaborators

  • leejefy