@web-io/lint
v1.0.1
Published
web lints package
Downloads
7
Readme
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