Repository: go-gitea/gitea
File: eslint.config.ts (TypeScript)

Code before:
import arrayFunc from 'eslint-plugin-array-func';
import comments from '@eslint-community/eslint-plugin-eslint-comments';
import github from 'eslint-plugin-github';
import globals from 'globals';
import importPlugin from 'eslint-plugin-import-x';
import playwright from 'eslint-plugin-playwright';
import regexp from 'eslint-plugin-regexp';
import sonarjs from 'eslint-plugin-sonarjs';
import stylistic from '@stylistic/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import typescriptPlugin from 'typescript-eslint';
import unicorn from 'eslint-plugin-unicorn';
import vitest from '@vitest/eslint-plugin';
import vue from 'eslint-plugin-vue';
import vueScopedCss from 'eslint-plugin-vue-scoped-css';
import wc from 'eslint-plugin-wc';
import {defineConfig, globalIgnores} from 'eslint/config';

const jsExts = ['js', 'mjs', 'cjs'] as const;
const tsExts = ['ts', 'mts', 'cts'] as const;

const restrictedSyntax = ['WithStatement', 'ForInStatement', 'LabeledStatement', 'SequenceExpression'];
const restrictedFetchSyntax = [
  {selector: 'CallExpression[callee.name="fetch"]', message: 'use `modules/fetch.ts` instead'},
];
const restrictedGlobals = [
  'addEventListener', 'blur', 'close', 'closed', 'confirm', 'defaultStatus', 'defaultstatus', 'error', 'event', 'external', 'find', 'focus', 'frameElement', 'frames', 'history', 'innerHeight', 'innerWidth', 'isFinite', 'isNaN', 'length', 'locationbar', 'menubar', 'moveBy', 'moveTo', 'name', 'onblur', 'onerror', 'onfocus', 'onload', 'onresize', 'onunload', 'open', 'opener', 'opera', 'outerHeight', 'outerWidth', 'pageXOffset', 'pageYOffset', 'parent', 'print', 'removeEventListener', 'resizeBy', 'resizeTo', 'screen', 'screenLeft', 'screenTop', 'screenX', 'screenY', 'scroll', 'scrollbars', 'scrollBy', 'scrollTo', 'scrollX', 'scrollY', 'status', 'statusbar', 'stop', 'toolbar', 'top',
];
const restrictedLocalStorageGlobals = [
  {name: 'localStorage', message: 'Use `modules/user-settings.ts` instead.'},
];
const restrictedProperties = [
  {object: 'window', property: 'localStorage', message: 'Use `modules/user-settings.ts` instead.'},
  {object: 'globalThis', property: 'localStorage', message: 'Use `modules/user-settings.ts` instead.'},
];

export default defineConfig([
  globalIgnores([
    'web_src/js/vendor',
    'web_src/fomantic',
    'public/assets/js',
  ]),
  {
    files: [`**/*.{${[...jsExts, ...tsExts].join(',')}}`],
    ignores: ['dist/*'],
    languageOptions: {
      ecmaVersion: 'latest',
      sourceType: 'module',
      parser: typescriptParser,

Review comment (suggestion):
```suggestion
  {selector: 'CallExpression[callee.name="fetch"]', message: 'use `modules/fetch.ts` instead.'},
```

Code after:
import arrayFunc from 'eslint-plugin-array-func';
import comments from '@eslint-community/eslint-plugin-eslint-comments';
import github from 'eslint-plugin-github';
import globals from 'globals';
import importPlugin from 'eslint-plugin-import-x';
import playwright from 'eslint-plugin-playwright';
import regexp from 'eslint-plugin-regexp';
import sonarjs from 'eslint-plugin-sonarjs';
import stylistic from '@stylistic/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import typescriptPlugin from 'typescript-eslint';
import unicorn from 'eslint-plugin-unicorn';
import vitest from '@vitest/eslint-plugin';
import vue from 'eslint-plugin-vue';
import vueScopedCss from 'eslint-plugin-vue-scoped-css';
import wc from 'eslint-plugin-wc';
import {defineConfig, globalIgnores} from 'eslint/config';

const jsExts = ['js', 'mjs', 'cjs'] as const;
const tsExts = ['ts', 'mts', 'cts'] as const;

const restrictedGlobals = [
  {name: 'localStorage', message: 'Use `modules/user-settings.ts` instead.'},
  {name: 'fetch', message: 'Use `modules/fetch.ts` instead.'},
];

const restrictedProperties = [
  {object: 'window', property: 'localStorage', message: 'Use `modules/user-settings.ts` instead.'},
  {object: 'globalThis', property: 'localStorage', message: 'Use `modules/user-settings.ts` instead.'},
  {object: 'window', property: 'fetch', message: 'Use `modules/fetch.ts` instead.'},
  {object: 'globalThis', property: 'fetch', message: 'Use `modules/fetch.ts` instead.'},
];

export default defineConfig([
  globalIgnores([
    'web_src/js/vendor',
    'web_src/fomantic',
    'public/assets/js',
  ]),
  {
    files: [`**/*.{${[...jsExts, ...tsExts].join(',')}}`],
    ignores: ['dist/*'],
    languageOptions: {
      ecmaVersion: 'latest',
      sourceType: 'module',
      parser: typescriptParser,
      parserOptions: {
        sourceType: 'module',
        ecmaVersion: 'latest',