Skip to content

Commit

Permalink
feat: Enable Nextcloud plugin for ESLint
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Feb 16, 2025
1 parent 4a0af18 commit a01e6a2
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions lib/configs/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Linter } from 'eslint'
import eslintRules from '@eslint/js'
import { GLOB_FILES_JAVASCRIPT, GLOB_FILES_TESTING, GLOB_FILES_TYPESCRIPT, GLOB_FILES_VUE } from '../globs'
import globals from 'globals'
// import nextcloudPlugin from '@nextcloud/eslint-plugin'
import nextcloudPlugin from '../plugins/nextcloud/index.ts'

/**
* This config provides the base rules for code quality,
Expand Down Expand Up @@ -56,7 +56,22 @@ export const javascript: Linter.Config[] = [
...eslintRules.configs.recommended,
},

// nextcloudPlugin.configs.recommended,
// The Nextcloud plugin for detecting deprecated and removed global API
{
name: 'nextcloud/javascript/plugin',
plugins: {
'@nextcloud': nextcloudPlugin,
},
rules: {
'@nextcloud/no-deprecations': ['warn'],
'@nextcloud/no-removed-apis': ['error'],
},
files: [
...GLOB_FILES_JAVASCRIPT,
...GLOB_FILES_TYPESCRIPT,
...GLOB_FILES_VUE,
],
},

// Nextcloud specific overwrite
{
Expand Down

0 comments on commit a01e6a2

Please sign in to comment.