diff --git a/.eslintrc.js b/.eslintrc.js index c80d021..1d1c29d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ /** * MIT License * - * Copyright (c) 2024, Brion Mario + * Copyright (c) 2024, JavaScript Colombo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -22,6 +22,35 @@ * SOFTWARE. */ +const LICENSE_HEADER_DEFAULT_PATTERN = [ + '*', + ' * MIT License', + ' *', + { + pattern: ' Copyright \\(c\\) \\d{4}, JavaScript Colombo', + template: ` * Copyright (c) ${new Date().getFullYear()}, JavaScript Colombo`, + }, + ' *', + ' * Permission is hereby granted, free of charge, to any person obtaining a copy', + ' * of this software and associated documentation files (the "Software"), to deal', + ' * in the Software without restriction, including without limitation the rights', + ' * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell', + ' * copies of the Software, and to permit persons to whom the Software is', + ' * furnished to do so, subject to the following conditions:', + ' *', + ' * The above copyright notice and this permission notice shall be included in all', + ' * copies or substantial portions of the Software.', + ' *', + ' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR', + ' * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,', + ' * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE', + ' * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER', + ' * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,', + ' * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE', + ' * SOFTWARE.', + ' ', +]; + module.exports = { env: { es6: true, @@ -29,4 +58,9 @@ module.exports = { }, extends: ['turbo', 'plugin:@brionmario/internal', 'plugin:@brionmario/prettier'], plugins: ['@brionmario'], + rules: { + // Enforce JavaScript Colombo's license header. + // https://github.com/Stuk/eslint-plugin-header + 'header/header': ['warn', 'block', LICENSE_HEADER_DEFAULT_PATTERN, 2], + }, }; diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100644 index a78cc75..0000000 --- a/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -npx commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index e69de29..0000000 diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg deleted file mode 100644 index 17e2764..0000000 --- a/.husky/prepare-commit-msg +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -exec < /dev/tty && npx cz --hook || true diff --git a/apps/www/.eslintrc.cjs b/apps/www/.eslintrc.cjs index 0ec0501..589ac19 100644 --- a/apps/www/.eslintrc.cjs +++ b/apps/www/.eslintrc.cjs @@ -35,6 +35,7 @@ module.exports = { 'plugin:@brionmario/prettier', 'plugin:@brionmario/next', 'plugin:react/jsx-runtime', + '../../.eslintrc.js' ], parserOptions: { project: [path.resolve(__dirname, 'tsconfig.json')], diff --git a/apps/www/app/layout.tsx b/apps/www/app/layout.tsx index 1a3c00e..f874600 100644 --- a/apps/www/app/layout.tsx +++ b/apps/www/app/layout.tsx @@ -25,9 +25,10 @@ import type {Metadata} from 'next'; import {ReactElement} from 'react'; import ThemeProvider from '@/components/ThemeProvider'; -import './globals.scss'; -import './custom.scss'; import {inter, spaceGrotesk} from './fonts'; +import useMeetupConfig from '@/hooks/useMeetupConfig'; +import './custom.scss'; +import './globals.scss'; export const metadata: Metadata = { title: 'JavaScript Colombo', @@ -39,14 +40,23 @@ const RootLayout = ({ children, }: Readonly<{ children: React.ReactNode; -}>): ReactElement => ( - -