@ice/spec
v1.0.1
Published
eslint/stylelint/editorconfig
Downloads
260
Keywords
Readme
spec
Easy to use eslint/stylelint/prettier. And spec means specification.
Features
- [x] eslint
- [x] stylelint
- [x] eslint support TypeScript
- [x] commitlint
- [x] prettier
Install
$ npm i --save-dev @ice/spec eslint stylelint @commitlint/cli
Usage
eslint rules
Create a .eslintrc.js
const { eslint } = require('@ice/spec');
module.exports = eslint;
eslint support TypeScript rules
Create a .eslintrc.js
const { tslint } = require('@ice/spec');
module.exports = tslint;
stylelint rules
in .stylelintrc.js
const { stylelint } = require('@ice/spec');
module.exports = stylelint;
prettier rules
in .prettierrc.js
const { prettier } = require('@ice/spec');
module.exports = prettier;
commitlint rules
in .commitlintrc.js
const { commitlint } = require('@ice/spec');
module.exports = commitlint;
FAQ
Custom config
const { eslint, deepmerge } = require('@ice/spec');
module.exports = deepmerge(eslint, {
rules: {
// custom config
},
});
Error: Cannot find module 'eslint-plugin-foo'
Eslint is not yet supported having plugins as dependencies in shareable config. issue. As a temporary solution, you need add the plugin to devDependencies in your project, like npm i --save-dev eslint-plugin-jsx-a11y
.