mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-22 09:01:25 +00:00
- 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>
38 lines
745 B
TypeScript
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'],
|
|
},
|
|
]);
|