mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-04-16 22:24:49 +00:00
* Refactor enums to const objects and update ESLint rules - Converted several TypeScript enums to const objects for better type inference and immutability. - Updated ESLint configuration to disable 'no-redeclare' rule and added new restrictions on schema usage. - Adjusted package-lock.json to mark several dependencies as peer dependencies. * Refactor enums to const objects in site-dropdown and new-version-uploader models - Converted TypeScript enums to const objects for improved type safety and immutability in `sites-dropdown.component.ts` and `new-version-uploader.model.ts`. - Updated related types to reflect the changes in both files. - Enhanced error handling in the `DropdownSitesComponent` by using the `subscribe` method with an object for better readability. * Refactor TypeScript types and improve error handling in component tests - Updated type annotations in `upload.service.ts` and `node-actions.service.ts` for better type safety. - Enhanced error handling in various component tests by using more descriptive error messages in `task-attachment-list.component.spec.ts`, `attach-file-widget-dialog.component.spec.ts`, and `task-form.component.spec.ts`. - Removed unnecessary schemas from test configurations in several component spec files to streamline the testing setup. * Refactor TypeScript enums to const objects for improved type safety - Converted multiple TypeScript enums to const objects across various models, including `AppConfigValues`, `Status`, `ShowHeaderMode`, `WidgetTypeEnum`, and others. - Updated related type definitions to enhance type inference and immutability. - Adjusted ESLint configurations by removing the 'no-redeclare' rule to streamline code quality checks. * Refactor TypeScript types for improved type safety and consistency - Updated type annotations in `document-list.component.ts`, `document-actions.service.ts`, and `node-actions.service.ts` to use `Observable` instead of `Subject` for better reactive programming practices. - Enhanced type definitions in `search-date-range.component.ts` and related spec files to allow `inLastValue` to be either a string or a number, improving flexibility in handling date range inputs. - Adjusted test cases to reflect these type changes, ensuring consistency across the application. * Enhance type safety in ViewerComponent by specifying type for closeButtonPosition - Updated the type annotation for `closeButtonPosition` in `viewer.component.ts` to explicitly define it as `CloseButtonPosition`, improving type safety and clarity. * Enhance type safety in DataTableComponent by specifying type for showHeader - Updated the type annotation for `showHeader` in `datatable.component.ts` to explicitly define it as `ShowHeaderMode`, improving type safety and clarity. * Update PDF viewer test to accommodate varying date formats - Modified the test for the annotation popup in `pdf-viewer.component.spec.ts` to check for the presence of date components instead of a specific date format, enhancing test robustness across different locales.
107 lines
3.2 KiB
JSON
107 lines
3.2 KiB
JSON
{
|
|
"extends": ["../../.eslintrc.js"],
|
|
"ignorePatterns": ["!**/*"],
|
|
"overrides": [
|
|
{
|
|
"files": ["*.ts"],
|
|
"extends": ["plugin:@nx/angular"],
|
|
"parserOptions": {
|
|
"project": ["lib/process-services-cloud/tsconfig.lib.json", "lib/process-services-cloud/tsconfig.spec.json", "lib/process-services-cloud/.storybook/tsconfig.json"],
|
|
"createDefaultProgram": true
|
|
},
|
|
"rules": {
|
|
"jsdoc/tag-lines": [
|
|
"error",
|
|
"any",
|
|
{
|
|
"startLines": 1
|
|
}
|
|
],
|
|
"@typescript-eslint/naming-convention": "warn",
|
|
"@typescript-eslint/consistent-type-assertions": "warn",
|
|
"@typescript-eslint/prefer-for-of": "warn",
|
|
"@typescript-eslint/member-ordering": "off",
|
|
"no-underscore-dangle": [
|
|
"error",
|
|
{
|
|
"allowAfterThis": true
|
|
}
|
|
],
|
|
"no-shadow": "warn",
|
|
"quote-props": "off",
|
|
"object-shorthand": "warn",
|
|
"prefer-const": "warn",
|
|
"arrow-body-style": "warn",
|
|
"@angular-eslint/no-output-native": "off",
|
|
"space-before-function-paren": "off",
|
|
"@angular-eslint/component-selector": [
|
|
"error",
|
|
{
|
|
"type": "element",
|
|
"prefix": "adf-cloud",
|
|
"style": "kebab-case"
|
|
}
|
|
],
|
|
"@angular-eslint/directive-selector": [
|
|
"error",
|
|
{
|
|
"type": "attribute",
|
|
"prefix": "adf-cloud",
|
|
"style": "camelCase"
|
|
}
|
|
],
|
|
"@angular-eslint/no-input-prefix": "error",
|
|
"@typescript-eslint/consistent-type-definitions": "error",
|
|
"@typescript-eslint/dot-notation": "off",
|
|
"@typescript-eslint/explicit-member-accessibility": [
|
|
"off",
|
|
{
|
|
"accessibility": "explicit"
|
|
}
|
|
],
|
|
"@typescript-eslint/no-inferrable-types": "off",
|
|
"@typescript-eslint/no-require-imports": "off",
|
|
"@typescript-eslint/no-var-requires": "error",
|
|
"comma-dangle": "error",
|
|
"default-case": "error",
|
|
"import/order": "off",
|
|
"max-len": [
|
|
"error",
|
|
{
|
|
"code": 240
|
|
}
|
|
],
|
|
"no-bitwise": "off",
|
|
"no-duplicate-imports": "error",
|
|
"no-multiple-empty-lines": "error",
|
|
"no-return-await": "error",
|
|
"rxjs/no-create": "error",
|
|
"rxjs/no-subject-unsubscribe": "error",
|
|
"rxjs/no-subject-value": "error",
|
|
"rxjs/no-unsafe-takeuntil": "error",
|
|
"unicorn/filename-case": "error",
|
|
"@angular-eslint/prefer-standalone": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["*.spec.ts"],
|
|
"plugins": ["@alfresco/eslint-angular"],
|
|
"rules": {
|
|
"@angular-eslint/component-class-suffix": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["*.html"],
|
|
"extends": ["plugin:@nx/angular-template"],
|
|
"parserOptions": {
|
|
"project": ["lib/process-services-cloud/tsconfig.lib.json", "lib/process-services-cloud/tsconfig.spec.json"],
|
|
"createDefaultProgram": true
|
|
},
|
|
"rules": {
|
|
"@angular-eslint/template/no-autofocus": "error",
|
|
"@angular-eslint/template/no-positive-tabindex": "error"
|
|
}
|
|
}
|
|
]
|
|
}
|