代码拉取完成,页面将自动刷新
const prettierConfig = require('./.prettierrc.js');
module.exports = {
root: true,
parserOptions: { ecmaVersion: 2021 },
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['tsconfig.json'],
createDefaultProgram: true
},
plugins: ['@typescript-eslint', 'jsdoc', 'import', 'header'],
extends: [
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/template/process-inline-templates',
'plugin:prettier/recommended'
],
rules: {
'prettier/prettier': ['error', prettierConfig],
'header/header': [
2,
'block',
[
'*',
' * Use of this source code is governed by an MIT-style license that can be',
' * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE',
' '
],
2
],
'jsdoc/newline-after-description': 1,
'@angular-eslint/component-selector': [
'error',
{
type: ['element', 'attribute'],
prefix: ['nz', 'test'],
style: 'kebab-case'
}
],
'@angular-eslint/directive-class-suffix': [
'error',
{
suffixes: ['Directive', 'Component', 'Base']
}
],
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: ['nz']
}
],
'@angular-eslint/no-attribute-decorator': 'error',
'@angular-eslint/no-conflicting-lifecycle': 'off',
'@angular-eslint/no-forward-ref': 'off',
'@angular-eslint/no-host-metadata-property': 'off',
'@angular-eslint/no-lifecycle-call': 'off',
'@angular-eslint/no-pipe-impure': 'error',
'@angular-eslint/prefer-output-readonly': 'error',
'@angular-eslint/use-component-selector': 'off',
'@angular-eslint/use-component-view-encapsulation': 'off',
'@typescript-eslint/array-type': [
'error',
{
default: 'array-simple'
}
],
'@typescript-eslint/ban-types': [
'error',
{
types: {
Object: {
message: 'Use {} instead.'
},
String: {
message: 'Use string instead.'
},
Number: {
message: 'Use number instead.'
},
Boolean: {
message: 'Use boolean instead.'
},
Function: {
message: 'Use specific callable interface instead.'
}
}
}
],
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/explicit-member-accessibility': [
'off',
{
accessibility: 'explicit'
}
],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': [
'error',
{
ignoreParameters: true,
ignoreProperties: true
}
],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'prefer-arrow/prefer-arrow-functions': 'off',
'import/no-duplicates': 'error',
'import/no-unused-modules': 'error',
'import/no-unassigned-import': 'error',
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: false },
'newlines-between': 'always',
groups: ['external', 'builtin', 'internal', [ 'parent', 'sibling', 'index']],
pathGroups: [
{
pattern: '{@angular/**,rxjs,rxjs/operators}',
group: 'external',
position: 'before'
},
{
pattern: 'ng-zorro-antd/**',
group: 'internal',
position: 'before'
}
],
"pathGroupsExcludedImportTypes":[]
}
],
'no-bitwise': 'off',
'no-duplicate-imports': 'error',
'no-invalid-this': 'off',
'no-irregular-whitespace': 'error',
'no-magic-numbers': 'off',
'no-multiple-empty-lines': 'error',
'no-redeclare': 'off',
'no-underscore-dangle': 'off',
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'off',
'prefer-object-spread': 'error',
'prefer-template': 'error',
yoda: 'error'
}
},
{
files: ['**/demo/*.ts', '*.spec.ts'],
rules: {
'header/header': 'off'
}
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {}
},
{
files: ['*.html'],
excludedFiles: ['*inline-template-*.component.html'],
extends: ['plugin:prettier/recommended'],
rules: {
'prettier/prettier': ['error', { parser: 'angular' }]
}
}
]
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。