mirror of
https://github.com/NickKaramoff/toot
synced 2025-02-28 09:27:39 +01:00
Update lint configurations (#91)
This commit is contained in:
commit
71ea203883
@ -1,10 +0,0 @@
|
||||
# This ESLint ignore file is part of Share₂Fedi
|
||||
# https://github.com/kytta/share2fedi
|
||||
#
|
||||
# SPDX-FileCopyrightText: © 2023 Nikita Karamov <me@kytta.dev>
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
.vercel/
|
||||
/dist/
|
||||
node_modules/
|
||||
script/
|
@ -1,30 +0,0 @@
|
||||
// This ESLint config is part of Share₂Fedi
|
||||
// https://github.com/kytta/share2fedi
|
||||
//
|
||||
// SPDX-FileCopyrightText: © 2023 Nikita Karamov <me@kytta.dev>
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:unicorn/recommended",
|
||||
"plugin:astro/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.astro"],
|
||||
"parser": "astro-eslint-parser",
|
||||
"parserOptions": {
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"extraFileExtensions": [".astro"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
30
eslint.config.js
Normal file
30
eslint.config.js
Normal file
@ -0,0 +1,30 @@
|
||||
// This ESLint config is part of Share₂Fedi
|
||||
// https://github.com/kytta/share2fedi
|
||||
//
|
||||
// SPDX-FileCopyrightText: © 2023 Nikita Karamov <me@kytta.dev>
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
import globals from "globals";
|
||||
import js from "@eslint/js";
|
||||
import ts from "typescript-eslint";
|
||||
import astro from "eslint-plugin-astro";
|
||||
import unicorn from "eslint-plugin-unicorn";
|
||||
import prettier from "eslint-config-prettier";
|
||||
|
||||
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
|
||||
export default [
|
||||
{
|
||||
ignores: [".astro", ".vercel/", "dist/", "script/"],
|
||||
},
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
},
|
||||
},
|
||||
},
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommended,
|
||||
unicorn.configs["flat/recommended"],
|
||||
...astro.configs["jsx-a11y-strict"],
|
||||
prettier,
|
||||
];
|
23
package.json
23
package.json
@ -43,24 +43,30 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@eslint/js": "^9.19.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
||||
"@typescript-eslint/parser": "^7.18.0",
|
||||
"@typescript-eslint/parser": "^8.21.0",
|
||||
"browserslist": "^4.24.4",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint": "^9.19.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-astro": "^1.3.1",
|
||||
"eslint-plugin-unicorn": "^55.0.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||
"eslint-plugin-unicorn": "^56.0.1",
|
||||
"globals": "^15.14.0",
|
||||
"husky": "^9.1.7",
|
||||
"lightningcss": "^1.29.1",
|
||||
"lint-staged": "^15.4.2",
|
||||
"postcss-html": "^1.8.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"sass": "^1.83.4",
|
||||
"sharp": "^0.33.5",
|
||||
"stylelint": "^16.14.0",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"svgo": "^3.3.2"
|
||||
"stylelint-config-html": "^1.1.0",
|
||||
"stylelint-config-standard-scss": "^14.0.0",
|
||||
"svgo": "^3.3.2",
|
||||
"typescript": "^5.7.3",
|
||||
"typescript-eslint": "^8.21.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "pnpm run fix:prettier",
|
||||
@ -71,9 +77,6 @@
|
||||
"prettier": {
|
||||
"singleAttributePerLine": true
|
||||
},
|
||||
"stylelint": {
|
||||
"extends": "stylelint-config-standard-scss"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.1 || ^20.3.0 || ^22.0.0"
|
||||
}
|
||||
|
1653
pnpm-lock.yaml
generated
1653
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,7 @@ const { instance, errors } = Astro.props;
|
||||
:global(span.link) {
|
||||
color: var(--s2f-accent-color-contrast);
|
||||
cursor: pointer;
|
||||
text-decoration: 1px solid underline currentColor;
|
||||
text-decoration: 1px solid underline currentcolor;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -21,9 +21,9 @@ export function useTranslations(language: string) {
|
||||
}
|
||||
|
||||
export function findBestLanguage(): string {
|
||||
const urlLanguage = new URLSearchParams(window.location.search).get("lang");
|
||||
if (urlLanguage && urlLanguage in languages) {
|
||||
return urlLanguage;
|
||||
const urlLang = new URLSearchParams(globalThis.location.search).get("lang");
|
||||
if (urlLang && urlLang in languages) {
|
||||
return urlLang;
|
||||
}
|
||||
|
||||
let browserLanguages = navigator.languages;
|
||||
|
17
stylelint.config.js
Normal file
17
stylelint.config.js
Normal file
@ -0,0 +1,17 @@
|
||||
// This Stylelint config is part of Share₂Fedi
|
||||
// https://github.com/kytta/share2fedi
|
||||
//
|
||||
// SPDX-FileCopyrightText: © 2023 Nikita Karamov <me@kytta.dev>
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
/** @type {import('stylelint').Config} */
|
||||
export default {
|
||||
extends: ["stylelint-config-standard-scss", "stylelint-config-html/astro"],
|
||||
rules: {
|
||||
"selector-pseudo-class-no-unknown": [
|
||||
true,
|
||||
{
|
||||
ignorePseudoClasses: ["global"],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user