mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-5290] create eslint rule to ensure components use none value for encapsulation (#8585)
* ACS-5290 Create rule which prevent using different encapsulation in components than None * ACS-5290 Added documentation * ACS-5290 Updated scripts * ACS-5290 Updated documentation * ACS-5290 Added autofix * ACS-5290 Formated code * ACS-5290 Fixed lint - removed redundant comma * ACS-5290 Renaming * ACS-5290 Renaming
This commit is contained in:
@@ -51,6 +51,7 @@ A few other pages of information are also available:
|
||||
- [Process Services Cloud API](#process-services-cloud-api)
|
||||
- [Extensions API](#extensions-api)
|
||||
- [Insights API](#insights-api)
|
||||
- [ESLint Angular API](#eslint-angular-api)
|
||||
|
||||
## User guide
|
||||
|
||||
@@ -596,3 +597,19 @@ for more information about installing and using the source code.
|
||||
<!--insights end-->
|
||||
|
||||
[(Back to Contents)](#contents)
|
||||
|
||||
## ESLint Angular API
|
||||
|
||||
Contains all custom rules used by ESLint.
|
||||
|
||||
<!--eslint-angular start-->
|
||||
|
||||
### Rules
|
||||
|
||||
| Name | Description | Source link |
|
||||
|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Use none component view encapsulation](eslint-angular/rules/use-none-component-view-encapsulation.md) | Enforces using ViewEncapsulation.None for components. | [Source](../lib/eslint-angular/src/rules/use-none-component-view-encapsulation/use-none-component-view-encapsulation.ts) |
|
||||
|
||||
<!--eslint-angular end-->
|
||||
|
||||
[(Back to Contents)](#contents)
|
||||
|
@@ -0,0 +1,22 @@
|
||||
---
|
||||
Title: Use none component view encapsulation
|
||||
Added: v6.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2023-05-23
|
||||
---
|
||||
|
||||
# [Use none component view encapsulation](../../../lib/eslint-angular/src/rules/use-none-component-view-encapsulation/use-none-component-view-encapsulation.ts "Defined in use-none-component-view-encapsulation.ts")
|
||||
|
||||
Custom ESLint rule which check if component uses ViewEncapsulation.None. It has been implemented because None encapsulation makes themes styling easier.
|
||||
It also allows to autofix.
|
||||
|
||||
## Basic Usage
|
||||
Put this rule in eslintrc.json in rules.
|
||||
|
||||
```json
|
||||
{
|
||||
"rules": {
|
||||
"@alfresco/eslint-angular/use-none-component-view-encapsulation": "error"
|
||||
}
|
||||
}
|
||||
```
|
@@ -41,7 +41,7 @@ backend services have been tested with each released version of ADF.
|
||||
- [v2.1.0](#v210)
|
||||
- [v2.0.0](#v200)
|
||||
|
||||
## v5.1.0
|
||||
## v6.0.0
|
||||
|
||||
<!--v600 start-->
|
||||
|
||||
@@ -54,6 +54,7 @@ backend services have been tested with each released version of ADF.
|
||||
- [Process user info component](process-services/components/process-user-info.component.md)
|
||||
- [Task comments service](content-services/services/task-comments.service.md)
|
||||
- [Viewer render component](core/components/viewer-render.component.md)
|
||||
- [Use none component view encapsulation](eslint-angular/rules/use-none-component-view-encapsulation.md)
|
||||
|
||||
<!--v600 end-->
|
||||
|
||||
|
Reference in New Issue
Block a user