@3angletech/tslint 中文文档教程
tslintConfig
由 3angleTech 创建和维护的 TypeScript Linting 库。
Installation
# For Angular v11 projects.
npm install @3angletech/tslint@2 --save-dev
# For Angular v10 or non-Angular projects.
npm install @3angletech/tslint@1 --save-dev
Usage
这个库包含 TypeScript、Angular 和样式的 linting 规则。
要使用 TypeScript 规则,请更新 tslint.json
以包含:
{
"extends": [
"@3angletech/tslint/ts",
"@3angletech/tslint/angular"
]
}
要使用 StyleLint 规则,请更新 .stylelintrc
以包含:
{
"extends": [
"@3angletech/tslint/styles"
]
}
要发布新版本:
npm run build
npm publish dist/
tslintConfig
TypeScript Linting libraries created and maintained by 3angleTech.
Installation
# For Angular v11 projects.
npm install @3angletech/tslint@2 --save-dev
# For Angular v10 or non-Angular projects.
npm install @3angletech/tslint@1 --save-dev
Usage
This library contains linting rules for TypeScript, for Angular and for styling.
To use the TypeScript rules, update tslint.json
to include:
{
"extends": [
"@3angletech/tslint/ts",
"@3angletech/tslint/angular"
]
}
To use the StyleLint rules, update .stylelintrc
to include:
{
"extends": [
"@3angletech/tslint/styles"
]
}
To publish a new version:
npm run build
npm publish dist/