mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-4695] Fix saving screenshots for E2Es, add nx eslint plugin (#3148)
* [ACA-4695] Fix saving screenshots for E2Es, add nx eslint plugin * [ACA-4695] Improve eslint rules
This commit is contained in:
@@ -95,7 +95,7 @@ export const isContentServiceEnabled = (): boolean => localStorage && localStora
|
||||
* JSON ref: `app.isSearchSupported`
|
||||
*/
|
||||
export const isSearchSupported = (context: RuleContext): boolean =>
|
||||
[navigation.isNotSearchResults(context) /*, !hasSelection(context)*/].every(Boolean);
|
||||
[navigation.isNotSearchResults(context) /* , !hasSelection(context)*/].every(Boolean);
|
||||
|
||||
/**
|
||||
* Checks if upload action is supported for the given context
|
||||
@@ -617,6 +617,7 @@ export function canOpenWithOffice(context: RuleContext): boolean {
|
||||
|
||||
// workaround for Shared files
|
||||
if (context.navigation && context.navigation.url && context.navigation.url.startsWith('/shared')) {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (file.entry.hasOwnProperty('allowableOperationsOnTarget')) {
|
||||
return context.permissions.check(file, ['update'], {
|
||||
target: 'allowableOperationsOnTarget'
|
||||
|
@@ -136,8 +136,8 @@ export const isNotRecentFiles = (context: RuleContext): boolean => !isRecentFile
|
||||
* JSON ref: `app.navigation.isSearchResults`
|
||||
*/
|
||||
export function isSearchResults(
|
||||
context: RuleContext /*,
|
||||
...args: RuleParameter[]*/
|
||||
context: RuleContext
|
||||
// ...args: RuleParameter[]
|
||||
): boolean {
|
||||
const { url } = context.navigation;
|
||||
return url && url.startsWith('/search');
|
||||
|
Reference in New Issue
Block a user