meiqia-fe-configs v1.0.0
meiqia-configs 🛠📦
meiqia前端通用规范设置
Table of Contents
Installation
$ npm install meiqia-fe-configs --save-dev
or
$ pnpm install meiqia-fe-configs -D
or
$ yarn install meiqia-fe-configs
Usage
This can be a very helpful way to make editor integration work for tools like ESLint,babel,prettier,commitlint which require project-based configuration to be present to work.
config prettier
if we were to do this for prettier, you could create an .prettierrc.js with the contents of
module.exports = require('meiqia-fe-configs/prettier');
config eslint
if we were to do this for eslint of typescript react project, you could create an .eslintrc.js with the contents of
module.exports = require('meiqia-fe-configs/eslint-ts');
create tsconfig.json with the contents of
{
"extends": "meiqia-fe-configs/shared-tsconfig",
"compilerOptions": {},
"exclude": [],
"include": []
}
config commitlint
if were to do this for commitlint, you could create an .commitlintrc.js with the contents of
module.exports = require('meiqia-fe-configs/commitlint');
config lintstaged
if were to do this for lintstaged, you could create an .lintstagedrc.js with the contents of
module.exports = require('meiqia-fe-configs/lintstaged');
config stylelint
if were to do this for stylelint, you could create an .stylelintrc.js with the contents of
module.exports = require('meiqia-fe-configs/stylelint');
config postcss
if were to do this for postcss, you could create an postcss.config.js with the contents of
module.exports = require('@sk/configs/postcss');
config babel
if were todo babel-loader to webpack configure to react, you could create an .babelrc.js with content of
module.exports = {
presets: [['meiqia-fe-configs/babel']],
};
8 months ago