Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Nov 29, 2024
1 parent 1f4a8c8 commit ed90eae
Show file tree
Hide file tree
Showing 22 changed files with 4,491 additions and 2,119 deletions.
36 changes: 0 additions & 36 deletions .eslintrc.json

This file was deleted.

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ updates:
- "🤖 Dependencies"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
labels:
- "🤖 Dependencies"
schedule:
interval: "daily"
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Installing dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
uses: actions/checkout@v4
with:
persist-credentials: false

Expand All @@ -18,7 +18,7 @@ jobs:
yarn build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@4.7.1
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# IDE
.idea

# dependencies
/node_modules
/.pnp
.pnp.js
.pnp.*
package-lock.json
.yarn
.yarnrc.yml

# testing
/coverage
Expand Down
4 changes: 2 additions & 2 deletions components/blocks/LowMemoryFootprint.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/mixins';
@use '../../styles/mixins';

.lmfBlock .mid {
align-items: flex-start;
Expand All @@ -8,7 +8,7 @@
text-align: right;
}

@include mobile-break {
@include mixins.mobile-break {
.lmfBlock .mid .left,
.lmfBlock .mid .right {
text-align: center;
Expand Down
4 changes: 2 additions & 2 deletions components/blocks/MainBlock.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/mixins';
@use '../../styles/mixins';

.mainBlock {
text-align: center;
Expand Down Expand Up @@ -38,7 +38,7 @@
color: #74818d;
}

@include mobile-break {
@include mixins.mobile-break {
.mainBlock {
padding: 2em 1em;

Expand Down
4 changes: 2 additions & 2 deletions components/blocks/MediaBlock.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/mixins';
@use '../../styles/mixins';

.mediaBlock {
border-top: 3px solid #E6ECF1;
Expand All @@ -17,7 +17,7 @@
width: 75%;
margin: 0 auto;

@include mobile-break {
@include mixins.mobile-break {
width: auto;
}
}
4 changes: 2 additions & 2 deletions components/blocks/SponsorsBlock.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/mixins';
@use '../../styles/mixins';

.sponsorsBlock {
.mid {
Expand All @@ -20,7 +20,7 @@
img {
height: 100px;

@include mobile-break {
@include mixins.mobile-break {
height: auto;
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/common/TheFooter.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@import '../../styles/colors';
@use '../../styles/colors';

.mainFooter {
text-align: center;
background: $accent-darker;
background: colors.$accent-darker;
padding: 2em 0.5em;
font-size: 0.8em;
color: #fff;
Expand Down
8 changes: 4 additions & 4 deletions components/common/TheHeader.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../../styles/colors';
@import '../../styles/mixins';
@use '../../styles/colors';
@use '../../styles/mixins';

.header {
padding: 1em;
Expand All @@ -25,7 +25,7 @@
}

&:hover {
background: $accent;
background: colors.$accent;
color: #fff;
text-decoration: none;
}
Expand All @@ -51,7 +51,7 @@
}
}

@include mobile-break {
@include mixins.mobile-break {
padding: 0;

.headerMid {
Expand Down
2 changes: 1 addition & 1 deletion components/common/TheHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TheHeader extends Component<{}, TheHeaderState> {

private readonly links: GenericLink[] = [
{ url: 'https://docs.gofiber.io', text: '📖 Docs' },
{ url: 'https://github.com/gofiber/recipes', text: '🍳 Examples' },
{ url: 'https://github.com/gofiber/recipes', text: '🍳 Recipes' },
{ url: 'https://github.com/gofiber/fiber', text: '📝 GitHub' },
{ url: 'https://www.buymeacoffee.com/fenny', text: '☕ Buy a Coffee' },
{ url: '/discord', text: '💬 Discord' },
Expand Down
3 changes: 2 additions & 1 deletion components/windows/BrowserWindow.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import styles from './BrowserWindow.module.scss';
import { Component } from 'react';
import {Component, ReactNode} from 'react';

interface BrowserWindowProps {
url: string;
children?: ReactNode;
}

class BrowserWindow extends Component<BrowserWindowProps> {
Expand Down
4 changes: 2 additions & 2 deletions components/windows/CodeBlock.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/colors';
@use '../../styles/colors';

.codeWindowContent {
pre {
Expand All @@ -7,7 +7,7 @@

code {
display: block;
background: $accent;
background: colors.$accent;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
line-height: 1.2;
Expand Down
16 changes: 11 additions & 5 deletions components/windows/CodeBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import styles from './CodeBlock.module.scss';
import { Component } from 'react';
import { findDOMNode } from 'react-dom';
import React, { Component, createRef } from 'react';
import hljs from 'highlight.js';

class CodeBlock extends Component {
interface CodeBlockProps {
children: React.ReactNode;
}

class CodeBlock extends Component<CodeBlockProps> {
codeRef = createRef<HTMLElement>();
componentDidMount() {
hljs.highlightBlock(findDOMNode(this.refs.code));
if (this.codeRef.current) {
hljs.highlightBlock(this.codeRef.current);
}
}

render() {
Expand All @@ -22,7 +28,7 @@ class CodeBlock extends Component {

<div className={`window-content ${styles.codeWindowContent}`}>
<pre>
<code className="go" ref="code">
<code className="go" ref={this.codeRef}>
{this.props.children}
</code>
</pre>
Expand Down
72 changes: 72 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import stylistic from '@stylistic/eslint-plugin';
import prettier from 'eslint-plugin-prettier';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import { includeIgnoreFile } from '@eslint/compat';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const gitignorePath = path.resolve(__dirname, '.gitignore');
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends('plugin:prettier/recommended'),
...compat.extends('plugin:@next/next/recommended'),
includeIgnoreFile(gitignorePath),
{
plugins: {
stylistic,
prettier,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: 'module',

parserOptions: {
project: 'tsconfig.json',
},
},

rules: {
'stylistic/indent': 'off',

'stylistic/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
requireLast: true,
},

singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],

'no-unused-expressions': 'error',
'stylistic/semi': ['error', 'always'],
curly: 'error',
eqeqeq: ['error', 'always'],
'no-redeclare': 'error',
'no-throw-literal': 'error',
},
ignores: ['node_modules/*', '.next/*', '.yarn/*', '*.config.*'],
},
];
3 changes: 1 addition & 2 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
sassOptions: {
silenceDeprecations: ['legacy-js-api'],
},
output: 'export',
};
18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.1",
"private": true,
"scripts": {
"build": "next build && next export",
"build": "next build",
"dev": "next dev",
"lint": "eslint . --ext .ts --ext .tsx",
"lint": "eslint .",
"start": "next start"
},
"dependencies": {
Expand All @@ -17,18 +17,24 @@
"next": "^15.0.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sass": "^1.81.0"
"sass": "^1.81.0",
"sass-loader": "^16.0.3"
},
"devDependencies": {
"@eslint/compat": "^1.2.3",
"@eslint/js": "^9.15.0",
"@next/eslint-plugin-next": "^15.0.3",
"@stylistic/eslint-plugin": "^2.11.0",
"@types/node": "^20.17.9",
"@types/react": "^18.3.12",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"eslint": "^9.15.0",
"eslint-config-next": "^15.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"prettier": "^3.4.1",
"typescript": "^5.7.2"
}
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit ed90eae

Please sign in to comment.