2021-04-19 13:45:12 +00:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
2021-04-20 14:24:55 +00:00
|
|
|
parser: '@typescript-eslint/parser',
|
2021-04-19 13:45:12 +00:00
|
|
|
ignorePatterns: ['**/openapi-codegen/**/*.ts', '**/swagger-codegen/**/*.ts'],
|
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['*.ts'],
|
|
|
|
parserOptions: {
|
|
|
|
project: ['tsconfig.json', 'e2e/tsconfig.json'],
|
|
|
|
createDefaultProgram: true,
|
|
|
|
},
|
|
|
|
extends: [
|
2021-04-27 08:04:16 +00:00
|
|
|
'plugin:@rbkmoney/typescript',
|
|
|
|
'plugin:@rbkmoney/angular',
|
|
|
|
'plugin:@rbkmoney/lodash',
|
|
|
|
'plugin:@rbkmoney/prettier',
|
2021-04-19 13:45:12 +00:00
|
|
|
],
|
|
|
|
rules: {
|
|
|
|
'@angular-eslint/directive-selector': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
type: 'attribute',
|
|
|
|
prefix: 'dsh',
|
|
|
|
style: 'camelCase',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'@angular-eslint/component-selector': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
type: 'element',
|
|
|
|
prefix: 'dsh',
|
|
|
|
style: 'kebab-case',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
// TODO: pretenders for error
|
|
|
|
'@typescript-eslint/no-floating-promises': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
|
|
'@typescript-eslint/no-misused-promises': 'warn',
|
|
|
|
'@typescript-eslint/unbound-method': 'warn',
|
|
|
|
'@typescript-eslint/restrict-plus-operands': 'warn',
|
|
|
|
'@typescript-eslint/restrict-template-expressions': 'warn',
|
|
|
|
},
|
|
|
|
},
|
2021-04-27 08:04:16 +00:00
|
|
|
{
|
|
|
|
files: ['*.spec.ts'],
|
|
|
|
parserOptions: {
|
|
|
|
project: ['tsconfig.json', 'e2e/tsconfig.json'],
|
|
|
|
createDefaultProgram: true,
|
|
|
|
},
|
|
|
|
extends: [
|
|
|
|
'plugin:@rbkmoney/typescript',
|
|
|
|
'plugin:@rbkmoney/angular',
|
|
|
|
'plugin:@rbkmoney/jasmine',
|
|
|
|
'plugin:@rbkmoney/lodash',
|
|
|
|
'plugin:@rbkmoney/prettier',
|
|
|
|
],
|
|
|
|
rules: {
|
|
|
|
// TODO: pretenders for error
|
|
|
|
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
|
|
'@typescript-eslint/no-misused-promises': 'warn',
|
|
|
|
'@typescript-eslint/unbound-method': 'warn',
|
|
|
|
'@typescript-eslint/restrict-plus-operands': 'warn',
|
|
|
|
'@typescript-eslint/restrict-template-expressions': 'warn',
|
|
|
|
},
|
|
|
|
},
|
2021-04-19 13:45:12 +00:00
|
|
|
{
|
|
|
|
files: ['*.html'],
|
|
|
|
extends: ['plugin:@angular-eslint/template/recommended'],
|
|
|
|
rules: {
|
|
|
|
// TODO: pretenders for error
|
|
|
|
'@angular-eslint/template/no-negated-async': 'warn',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|