mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
eslint: add github/array-foreach rule
This commit is contained in:
21 files changed
+59
-51
No files matched your search
@@ -27,7 +27,7 @@ export interface LangConfig {
|
||||
export function parseLang(config: string): Record<string, LangConfig> {
|
||||
const file = yaml.load(config) as Record<string, LangConfig>;
|
||||
if (typeof file === 'undefined' || typeof file === 'string' || typeof file === 'number') throw new Error();
|
||||
Object.keys(file).filter((i) => i.startsWith('_')).forEach((k) => delete file[k]);
|
||||
for (const key of Object.keys(file)) if (key.startsWith('_')) delete file[key];
|
||||
for (const key in file) {
|
||||
const entry = file[key];
|
||||
if (key.includes('.')) {
|
||||
|
||||
Reference in new issue
Block a user