Skip to content

Commit

Permalink
🧹 format only JS/TS/TSX/ASTRO files
Browse files Browse the repository at this point in the history
  • Loading branch information
vnepogodin committed Aug 30, 2024
1 parent 7256e5b commit 0b8828e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@

# Directories
.changeset

**/*.md
**/*.mdx
16 changes: 1 addition & 15 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,5 @@
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": [".*", "*.json", "*.md", "*.toml", "*.yml"],
"options": {
"useTabs": false
}
},
{
"files": ["*.md", "*.mdx"],
"options": {
"printWidth": 80
}
}
]
"plugins": ["prettier-plugin-astro"]
}
2 changes: 1 addition & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export default defineConfig({
label: 'sched-ext Tutorial',
translations: {
sk: 'sched-ext návod',
cs: 'sched-ext Tutoriál',
cs: 'sched-ext Tutoriál',
},
link: 'configuration/sched-ext',
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
17 changes: 0 additions & 17 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import globals from 'globals';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import typescriptParser from '@typescript-eslint/parser';
import * as mdx from 'eslint-plugin-mdx';

export default [
js.configs.recommended,
Expand Down Expand Up @@ -54,22 +53,6 @@ export default [
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{
...mdx.flat,
// optional, if you want to lint code blocks at the same
processor: mdx.createRemarkProcessor({
lintCodeBlocks: true,
// optional, if you want to disable language mapper, set it to `false`
// if you want to override the default language mapper inside, you can provide your own
languageMapper: {},
}),
},
{
...mdx.flatCodeBlocks,
rules: {
...mdx.flatCodeBlocks.rules,
},
},
{
ignores: ['dist', 'node_modules', '.github', 'types.generated.d.ts', '.astro'],
},
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"@typescript-eslint/parser": "^8.3.0",
"eslint": "^9.9.1",
"eslint-plugin-astro": "^1.2.3",
"eslint-plugin-mdx": "^3.1.5",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"typescript-eslint": "^8.3.0"
Expand Down
7 changes: 5 additions & 2 deletions src/components/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export const getImgPath = async (img_input: string | object) => {
return img_input;
}

const promised_input = ('then' in img_input ? (await img_input).default : img_input) as ImageObject;
const promised_input = (
'then' in img_input ? (await img_input).default : img_input
) as ImageObject;

// for remote images, only validate the width and height props
if (typeof promised_input.src === 'string') {
Expand All @@ -23,7 +25,8 @@ export const getImgPath = async (img_input: string | object) => {
}

// resolve the metadata promise, usually when the ESM import is inlined
const metadata = 'then' in promised_input.src ? (await promised_input.src).default : promised_input.src;
const metadata =
'then' in promised_input.src ? (await promised_input.src).default : promised_input.src;
return metadata.src;
};

Expand Down
11 changes: 10 additions & 1 deletion tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ const starlightPlugin = require('@astrojs/starlight-tailwind');

// Generated color palettes
const accent = { 200: '#82dccc', 600: '#007d6f', 900: '#003c34', 950: '#002b25' };
const gray = { 100: '#f2f6ff', 200: '#e6eeff', 300: '#b8c2d7', 400: '#798bb2', 500: '#47577b', 700: '#283758', 800: '#182545', 900: '#111826' };
const gray = {
100: '#f2f6ff',
200: '#e6eeff',
300: '#b8c2d7',
400: '#798bb2',
500: '#47577b',
700: '#283758',
800: '#182545',
900: '#111826',
};

/** @type {import('tailwindcss').Config} */
module.exports = {
Expand Down

0 comments on commit 0b8828e

Please sign in to comment.