npm install --save-dev stylelint-config-prettier Then, appendstylelint-config-prettierto theextendsarrayin your.stylelintrc.*file. Make sure to put itlast,so it will override other configs. {"extends":[// other configs ..."stylelint-config-prettier"]} ...
npm install --save-dev stylelint-config-prettier Then addstylelint-config-prettierto the list of extended configs in your.stylelintrcthat you added in the prior section.stylelint-config-prettiershould go last in the array so that it will override other configs: ...
"stylelint-config-prettier": "^3.3.0", "stylelint-config-standard": "^18.2.0" }, "s": { 可以添加更多命令 "precommit": "npm run lint-staged", "prettier": "prettier --write "./**/*.{js,jsx,css,less,sass,scss,md,json}"", "eslint": "eslint .", "eslint:fix": "eslint ...
prettier --write "src/**/*.js" stylelint stylelint[12]一个强大的样式规则,可以让你强制执行样式规范,避免书写错误的样式代码 安装 yarn add stylelint stylelint-config-standard --dev 示例 创建.stylelintrc.js并加入配置 module.exports = { extends: "stylelint-config-standard", }; 执行lint 命令 ...
"prettier": "^1.17.0", "serverless-http": "^1.9.1", "slash2": "^2.0.0", "stylelint": "^9.10.1", "stylelint-config-css-modules": "^1.3.0", "stylelint-config-prettier": "^5.0.0", "stylelint-config-rational-order": "^0.0.4", ...
prettier --write "src/**/*.js" 1. 2. 3. stylelint stylelint[12]一个强大的样式规则,可以让你强制执行样式规范,避免书写错误的样式代码 安装 yarn add stylelint stylelint-config-standard --dev 1. 示例 创建.stylelintrc.js并加入配置 ...
2 changes: 1 addition & 1 deletion 2 stylelint.config.js Original file line numberDiff line numberDiff line change @@ -4,7 +4,7 @@ module.exports = { extends: ['stylelint-config-standard', 'stylelint-config-prettier'], customSyntax: 'postcss-html', rules: { 'selector-class-patter...
prettier --write "src/**/*.js" 1. 2. stylelint stylelint[12]一个强大的样式规则,可以让你强制执行样式规范,避免书写错误的样式代码 安装 yarn add stylelint stylelint-config-standard --dev 1. 示例 创建.stylelintrc.js并加入配置 ...
那Prettier 与 ESLint/StyleLint/TSLint 有什么区别? Prettier 仅仅作代码的格式化,如空格、是否添加分号之类。而 ESLint 之类对代码格式化外,还对代码进行「质量检查」,如 no-unused-vars, no-implicit-globals 等规则。 JS 与 TS 的质量检查,还是要看 eslint[8]。
🛡️EditorConfig[11] +ESLint[12] +Prettier[13] +Stylelint[14] - 代码规范 🔨Commitizen[15] +Commitlint[16] - 提交规范 💡GitHub Actions[17] - 自动部署 基础搭建构建项目雏形 确保你安装了最新版本的Node.js[18] ,然后在命令行中运行以下命令: ...