Migrate to ESLint 9 flat config (#239)

* eslint 9

* fix lint errors

* update package-lock.json
This commit is contained in:
tmshv authored and GitHub committed 2026-02-08 01:29:39 +07:00
1 parent d9d8bbebe1
commit a4b3068850
9 files changed
+5830 -5854

No files matched your search

+12 -12
View File
@@ -1,15 +1,15 @@
const { Feed } = require('feed')
const axios = require('axios')
const fs = require('fs').promises
const { Feed } = require("feed")
const axios = require("axios")
const fs = require("fs").promises
const api = axios.create({
baseURL: 'https://api.tmshv.com/hudozka',
baseURL: "https://api.tmshv.com/hudozka",
})
async function getArticles(limit) {
const query = ['post', 'event', 'album']
const query = ["post", "event", "album"]
.map(t => `tag=${t}`)
.join('&')
.join("&")
const url = `/api/pages/tags?${query}&sortBy=-date&skip=0&pageSize=${limit}`
const res = await api.get(url)
@@ -19,15 +19,15 @@ async function getArticles(limit) {
(async () => {
const articles = await getArticles(30)
const url = 'https://art.shlisselburg.org'
const url = "https://art.shlisselburg.org"
const feed = new Feed({
title: 'Шлиссельбургская ДХШ',
title: "Шлиссельбургская ДХШ",
id: url,
link: url,
feedLinks: {
atom: 'https://art.shlisselburg.org/feed.xml',
atom: "https://art.shlisselburg.org/feed.xml",
},
});
})
articles.forEach(article => {
feed.addItem({
@@ -41,6 +41,6 @@ async function getArticles(limit) {
const content = feed.atom1()
await fs.writeFile('dist/feed.xml', content, { encoding: 'utf-8' })
await fs.writeFile("dist/feed.xml", content, { encoding: "utf-8" })
})()