chore(lint): ensure that linting+formatting applies to functions as well
This commit is contained in:
parent
55e88e6ebf
commit
fd291378a9
6 changed files with 29 additions and 28 deletions
|
@ -3,6 +3,9 @@
|
||||||
"organizeImports": {
|
"organizeImports": {
|
||||||
"enabled": false
|
"enabled": false
|
||||||
},
|
},
|
||||||
|
"files": {
|
||||||
|
"ignore": ["node_modules/**/*", ".netlify/**/*", "dist/**/*"]
|
||||||
|
},
|
||||||
"linter": {
|
"linter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"rules": {
|
"rules": {
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
* follow.
|
* follow.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import axios from 'axios'
|
import axios from "axios";
|
||||||
import { parseFeed } from 'htmlparser2'
|
import { parseFeed } from "htmlparser2";
|
||||||
|
|
||||||
function processFeedXML(feed) {
|
function processFeedXML(feed) {
|
||||||
return {
|
return {
|
||||||
|
@ -31,8 +31,8 @@ function processFeedXML(feed) {
|
||||||
|
|
||||||
const handler = async (event) => {
|
const handler = async (event) => {
|
||||||
try {
|
try {
|
||||||
const url = event.queryStringParameters.url
|
const url = event.queryStringParameters.url;
|
||||||
const responseData = await axios.get(url)
|
const responseData = await axios.get(url);
|
||||||
const newFeedData = parseFeed(responseData.data);
|
const newFeedData = parseFeed(responseData.data);
|
||||||
const newFeed = processFeedXML(newFeedData);
|
const newFeed = processFeedXML(newFeedData);
|
||||||
const mergedFeeds = newFeed;
|
const mergedFeeds = newFeed;
|
||||||
|
@ -40,10 +40,10 @@ const handler = async (event) => {
|
||||||
return {
|
return {
|
||||||
statusCode: 200,
|
statusCode: 200,
|
||||||
body: JSON.stringify(mergedFeeds),
|
body: JSON.stringify(mergedFeeds),
|
||||||
}
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return { statusCode: 500, body: error.toString() }
|
return { statusCode: 500, body: error.toString() };
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = { handler }
|
module.exports = { handler };
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"packageManager": "yarn@4.1.0",
|
"packageManager": "yarn@4.1.0",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "yarn biome format src/**/*.ts src/**/*.tsx && yarn biome check src/**/*.ts src/**/*.tsx",
|
"lint": "yarn biome format --config-path=. . && yarn biome check --config-path=. .",
|
||||||
"lint:fix": "yarn biome format src/**/*.ts src/**/*.tsx --write && yarn biome check src/**/*.ts src/**/*.tsx --apply",
|
"lint:fix": "yarn biome format --config-path=. . --write && yarn biome check --config-path=. . --apply",
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"start": "netlify dev",
|
"start": "netlify dev",
|
||||||
"start:app": "vite ./src --config ./vite.config.js --port 8080",
|
"start:app": "vite ./src --config ./vite.config.js --port 8080",
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"schedule": ["on friday"],
|
"schedule": ["on friday"],
|
||||||
"extends": [
|
"extends": ["config:base"]
|
||||||
"config:base"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,5 @@
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"rootDir": "."
|
"rootDir": "."
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"]
|
"include": ["src/**/*", "netlify/**/*"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import legacy from "@vitejs/plugin-legacy"
|
import legacy from "@vitejs/plugin-legacy";
|
||||||
import basicSSL from "@vitejs/plugin-basic-ssl"
|
import basicSSL from "@vitejs/plugin-basic-ssl";
|
||||||
import path from "node:path"
|
import path from "node:path";
|
||||||
import { defineConfig } from "vite"
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [legacy(), basicSSL()],
|
plugins: [legacy(), basicSSL()],
|
||||||
|
@ -30,4 +30,4 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
|
|
Loading…
Reference in a new issue