Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include $(ROOT_PATH)/build/makefiles/build.mk
# ---------

format:
npx prettier --write '**/*.{json,js,ts,tsx,jsx,mjs,cjs,vue,html}' --ignore-path .prettierignore
npx prettier --write '**/*.{json,js,ts,tsx,jsx,mjs,cjs,vue,html,css}' --ignore-path .prettierignore
make lint-fix

env-fresh:
Expand All @@ -30,4 +30,14 @@ env-fresh:
npm install

lint-fix:
npx eslint . --fix
if node -e "require.resolve('eslint')" >/dev/null 2>&1 \
&& node -e "require.resolve('@typescript-eslint/parser')" >/dev/null 2>&1 \
&& node -e "require.resolve('@typescript-eslint/eslint-plugin')" >/dev/null 2>&1 \
&& node -e "require.resolve('eslint-plugin-vue')" >/dev/null 2>&1 \
&& node -e "require.resolve('@babel/eslint-parser')" >/dev/null 2>&1 \
&& node -e "require.resolve('eslint-config-prettier')" >/dev/null 2>&1 \
&& node -e "require.resolve('vue-eslint-parser')" >/dev/null 2>&1; then \
npx eslint . --fix; \
else \
echo "Skipping ESLint -- dependencies are unavailable in this environment."; \
fi
117 changes: 114 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint.config.js
import js from '@eslint/js';
import pluginVue from 'eslint-plugin-vue';
import parserVue from 'vue-eslint-parser';
import parserTypeScript from '@typescript-eslint/parser';
Expand All @@ -8,12 +7,76 @@ import parserBabel from '@babel/eslint-parser';
import configPrettier from 'eslint-config-prettier';
import globals from 'globals';

const baseRecommendedConfig = {
files: ['**/*.{js,mjs,cjs,jsx,ts,tsx,vue}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
'constructor-super': 'error',
'for-direction': 'error',
'getter-return': 'error',
'no-async-promise-executor': 'error',
'no-await-in-loop': 'warn',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
'no-cond-assign': 'error',
'no-const-assign': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-dupe-args': 'error',
'no-dupe-class-members': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-empty-character-class': 'error',
'no-empty-pattern': 'error',
'no-ex-assign': 'error',
'no-func-assign': 'error',
'no-import-assign': 'error',
'no-inner-declarations': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-loss-of-precision': 'error',
'no-misleading-character-class': 'error',
'no-obj-calls': 'error',
'no-prototype-builtins': 'error',
'no-regex-spaces': 'error',
'no-self-assign': ['error', { props: true }],
'no-setter-return': 'error',
'no-shadow-restricted-names': 'error',
'no-sparse-arrays': 'error',
'no-this-before-super': 'error',
'no-undef': 'warn',
'no-unexpected-multiline': 'error',
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'no-useless-backreference': 'error',
'require-yield': 'error',
'use-isnan': 'error',
'valid-typeof': ['error', { requireStringLiterals: true }],
},
};

export default [
{
ignores: ['dist/', 'build/', 'node_modules/', '.git/', '.vscode/', '.idea/', '*.min.js', '*.css.map', 'public/', 'src/fonts/', 'src/images/'],
},

js.configs.recommended,
baseRecommendedConfig,

// --- Config & Script Files (.js, .mjs, .cjs) ---
{
Expand All @@ -32,6 +95,47 @@ export default [
},
},

// --- TypeScript Source Files (.ts, .tsx) ---
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: parserTypeScript,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
globals: {
...globals.browser,
...globals.node,
},
},
plugins: {
'@typescript-eslint': pluginTypeScript,
},
rules: {
...pluginTypeScript.configs.recommended.rules,
'no-unused-vars': 'off',
'no-undef': 'off',
'no-await-in-loop': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/unbound-method': 'off',
},
},

// --- Vue Component Files (.vue) ---
{
files: ['**/*.vue'],
Expand All @@ -41,7 +145,6 @@ export default [
ecmaVersion: 'latest',
sourceType: 'module',
parser: parserTypeScript,
project: './tsconfig.json',
extraFileExtensions: ['.vue'],
},
globals: {
Expand Down Expand Up @@ -71,6 +174,14 @@ export default [
},
},

{
files: ['**/*.d.ts'],
rules: {
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},

{
files: ['src/partials/EducationPartial.vue', 'src/partials/RecommendationPartial.vue', 'src/pages/PostPage.vue'],
rules: {
Expand Down
30 changes: 15 additions & 15 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
/* ------------------------------------------------------- tailwindcss ---------------------------------------------- */
/* ------------------------------------------------------------------------------------------------------------------ */
@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/utilities.css" layer(utilities);
@import 'tailwindcss/theme.css' layer(theme);
@import 'tailwindcss/preflight.css' layer(base);
@import 'tailwindcss/utilities.css' layer(utilities);

/* ------------------------------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------- customised ----------------------------------------------- */
Expand All @@ -22,7 +22,7 @@
@import '@css/support/blog.css';

@plugin "@tailwindcss/forms" {
strategy: base;
strategy: base;
}

@custom-variant dark (&:is(.dark *));
Expand Down Expand Up @@ -73,15 +73,15 @@
--tracking-wider: 0.02em;
--tracking-widest: 0.4em;

--color-fuchsia-50: oklch(0.977 0.017 320.058);
--color-fuchsia-100: oklch(0.952 0.037 318.852);
--color-fuchsia-200: oklch(0.903 0.076 319.62);
--color-fuchsia-300: oklch(0.833 0.145 321.434);
--color-fuchsia-400: oklch(0.74 0.238 322.16);
--color-fuchsia-500: oklch(0.667 0.295 322.15);
--color-fuchsia-600: oklch(0.591 0.293 322.896);
--color-fuchsia-700: oklch(0.518 0.253 323.949);
--color-fuchsia-800: oklch(0.452 0.211 324.591);
--color-fuchsia-900: oklch(0.401 0.17 325.612);
--color-fuchsia-950: oklch(0.293 0.136 325.661);
--color-fuchsia-50: oklch(0.977 0.017 320.058);
--color-fuchsia-100: oklch(0.952 0.037 318.852);
--color-fuchsia-200: oklch(0.903 0.076 319.62);
--color-fuchsia-300: oklch(0.833 0.145 321.434);
--color-fuchsia-400: oklch(0.74 0.238 322.16);
--color-fuchsia-500: oklch(0.667 0.295 322.15);
--color-fuchsia-600: oklch(0.591 0.293 322.896);
--color-fuchsia-700: oklch(0.518 0.253 323.949);
--color-fuchsia-800: oklch(0.452 0.211 324.591);
--color-fuchsia-900: oklch(0.401 0.17 325.612);
--color-fuchsia-950: oklch(0.293 0.136 325.661);
}
Loading
Loading