RED-3800: fix eslint

This commit is contained in:
Dan Percic 2022-06-19 00:27:03 +03:00
parent cca7401d26
commit ceab57e1cd
7 changed files with 20 additions and 103 deletions

View File

@ -8,20 +8,11 @@
"overrides": [
{
"files": [
"*.ts"
],
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:@angular-eslint/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@angular-eslint/recommended--extra"
"**/*.ts"
],
"parserOptions": {
"project": [
"libs/common-ui/tsconfig.*?.json"
"libs/common-ui/tsconfig.json"
]
},
"rules": {
@ -50,7 +41,6 @@
"@angular-eslint/prefer-output-readonly": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/naming-convention": [
"error",
{
@ -61,7 +51,7 @@
"format": [
"camelCase"
],
"leadingUnderscore": "require"
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
@ -71,7 +61,7 @@
"format": [
"camelCase"
],
"leadingUnderscore": "require"
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
@ -82,35 +72,14 @@
"UPPER_CASE",
"camelCase"
],
"leadingUnderscore": "require"
"leadingUnderscore": "allow"
}
],
"import/prefer-default-export": "off",
"no-underscore-dangle": "off",
"no-param-reassign": "error",
"consistent-return": "off",
"class-methods-use-this": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/restrict-template-expressions": "off"
},
"plugins": [
"@angular-eslint/eslint-plugin",
"@typescript-eslint"
]
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@nrwl/nx/angular-template",
"plugin:@angular-eslint/template/recommended"
],
"plugins": [
"prettier"
],
"rules": {}
}
}
]
}

View File

@ -1,7 +1,3 @@
# common-ui
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test common-ui` to execute the unit tests.

View File

@ -1,22 +0,0 @@
/* eslint-disable */
export default {
displayName: 'common-ui',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
coverageDirectory: '../../coverage/libs/common-ui',
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
transform: {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
};

View File

@ -1,2 +0,0 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import 'jest-preset-angular/setup-jest';

View File

@ -1,21 +1,23 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
],
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"outDir": "../../dist/out-tsc",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"lib": [
"dom",
"es2020"
],
"allowSyntheticDefaultImports": true
},
"include": [
"**/*.ts"
],
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,

View File

@ -1,16 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"strict": true,
"types": [],
"lib": ["dom", "es2018"],
"allowSyntheticDefaultImports": true
},
"exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}

View File

@ -1,10 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
}