Files
gitea/eslint.json.config.ts
silverwind b3b9c4903e chore(deps): update eslint, remove eslint-plugin-sonarjs (#38536)
- update eslint and related dependencies, `eslint-plugin-unicorn` to v72
with new rules enabled
- remove `eslint-plugin-sonarjs` (mostly obsolete or slow rules)
- extract shared eslint args into `ESLINT_ARGS` make variable
- rewrite ignore patterns in `eslint.json.config.ts` as explicit
root-relative paths: add `data` (local server data failed `lint-json`),
drop `node_modules` (ignored by default)
- fix a broken link in `CONTRIBUTING.md` (discovered during markdown
linting with eslint, but decided to not add that yet)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-07-20 10:08:34 +02:00

38 lines
745 B
TypeScript

import {defineConfig, globalIgnores} from 'eslint/config';
import json from '@eslint/json';
export default defineConfig([
globalIgnores([
'public',
'custom/public',
'data',
'.venv',
]),
{
files: ['**/*.json'],
plugins: {json},
language: 'json/json',
extends: ['json/recommended'],
},
{
files: ['**/*.json5'],
plugins: {json},
language: 'json/json5',
extends: ['json/recommended'],
},
{
files: [
'tsconfig.json',
'.devcontainer/*.json',
'.vscode/*.json',
'contrib/development/vscode/*.json',
],
plugins: {json},
language: 'json/jsonc',
languageOptions: {
allowTrailingCommas: true,
},
extends: ['json/recommended'],
},
]);