Update eslint config (#9457)

* Update eslint config

* Switch off max classes restriction
* Enforce tab indent, semicolon
* Warn when there exists unused vars

* Update change note

* Update change note

* Update change note
This commit is contained in:
XLBilly 2025-11-28 21:16:43 +08:00 committed by GitHub
parent 6cb333b65b
commit 4c27c09b4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 4 deletions

View file

@ -0,0 +1,12 @@
title: $:/changenotes/5.4.0/#9457
description: Update eslint configuration
release: 5.4.0
tags: $:/tags/ChangeNote
change-type: enhancement
change-category: developer
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9457
github-contributors: Leilei332
* Enforce tab indentation, semicolon
* Switch off `max-classes-per-file`
* Show warning for unused variables

View file

@ -100,7 +100,7 @@ js.configs.recommended,
"id-length": "off",
"id-match": "error",
"@stylistic/implicit-arrow-linebreak": "error",
"@stylistic/indent": "off",
"@stylistic/indent": ["error", "tab"],
"init-declarations": "off",
"@stylistic/jsx-quotes": "error",
"@stylistic/key-spacing": "off",
@ -121,7 +121,7 @@ js.configs.recommended,
"@stylistic/lines-around-comment": "off",
"@stylistic/lines-around-directive": "off",
"@stylistic/lines-between-class-members": "error",
"max-classes-per-file": "error",
"max-classes-per-file": "off",
"max-depth": "off",
"@stylistic/max-len": "off",
"max-lines": "off",
@ -266,7 +266,7 @@ js.configs.recommended,
"require-jsdoc": "off",
"require-unicode-regexp": "off",
"@stylistic/rest-spread-spacing": "error",
"@stylistic/semi": "off",
"@stylistic/semi": ["error", "always"],
"@stylistic/semi-spacing": "off",
"@stylistic/semi-style": "off",
"sort-imports": "error",
@ -293,7 +293,7 @@ js.configs.recommended,
yoda: "off",
// temporary rules
"no-useless-escape": "off",
"no-unused-vars": "off",
"no-unused-vars": "warn",
"no-empty": "off",
"@stylistic/no-extra-semi": "off",
"no-redeclare": "off",