@ackmann-dickenson/stylelint-config 中文文档教程
@ackmann-dickenson/stylelint-config
扩展 stylelint-config -标准
。 打开附加规则以强制执行 A&D 样式约定。
Installation
$ npm install --save-dev stylelint @ackmann-dickenson/stylelint-config
Usage
安装 stylelint 和配置包后,将您的 .stylelintrc.js
配置文件设置为:
module.exports = {
extends: '@ackmann-dickenson/stylelint-config'
};
您的构建过程将根据项目中使用的工具而有所不同。
NPM
{
"scripts": {
"lint:styles": "stylelint '**/*.{css,scss}'"
}
}
$ npm run lint:styles
Gulp
$ npm install --save-dev gulp gulp-stylelint
var gulp = require('gulp');
var gulpStylelint = require('gulp-stylelint');
gulp.task('lint:styles', function() {
return gulp
.src('**/*.scss')
.pipe(
gulpStylelint({
reporters: [{ formatter: 'string', console: true }]
})
);
});
$ gulp lint:styles
Rules
要查看此配置添加的所有内容,请参阅规则文档。
@ackmann-dickenson/stylelint-config
Extends stylelint-config-standard
. Turns on additional rules to enforce A&D style conventions.
Installation
$ npm install --save-dev stylelint @ackmann-dickenson/stylelint-config
Usage
After installing both stylelint and the configuration packages set your .stylelintrc.js
config file to:
module.exports = {
extends: '@ackmann-dickenson/stylelint-config'
};
Your build process will vary based on the tools used in your project.
NPM
{
"scripts": {
"lint:styles": "stylelint '**/*.{css,scss}'"
}
}
$ npm run lint:styles
Gulp
$ npm install --save-dev gulp gulp-stylelint
var gulp = require('gulp');
var gulpStylelint = require('gulp-stylelint');
gulp.task('lint:styles', function() {
return gulp
.src('**/*.scss')
.pipe(
gulpStylelint({
reporters: [{ formatter: 'string', console: true }]
})
);
});
$ gulp lint:styles
Rules
To see everything that this config adds please refer to the rules documentation.
更多
你可能也喜欢
- 2create-task-runner-package 中文文档教程
- 3id-provider 中文文档教程
- @100mslive/react-native-hms 中文文档教程
- @1057405bcltd/compute-orders-addon 中文文档教程
- @5ire/rpc-provider 中文文档教程
- @7stack.io/snippets-helpers 中文文档教程
- @aabao/webpack-panorama 中文文档教程
- @aacgn/atomic 中文文档教程
- @aaronpowell/apollo-server-logger-appinsights 中文文档教程
- @aaronshaf/bs-js 中文文档教程