Skip to content

Commit

Permalink
feat: add intersection observer + latest articles
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuireu committed Dec 20, 2023
1 parent c5a7b3a commit ecc20f1
Show file tree
Hide file tree
Showing 68 changed files with 1,470 additions and 1,205 deletions.
95 changes: 48 additions & 47 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
const tsconfig = require('./scripts/get-tsconfig.cjs');

module.exports = {
parser: '@typescript-eslint/parser',
settings: {
react: {
version: 'detect',
parser: '@typescript-eslint/parser',
settings: {
react: {
version: 'detect',
},
},
},
env: {
browser: true,
es2023: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended', 'prettier'],
overrides: [
{
files: tsconfig.include,
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
extraFileExtensions: ['.astro', '.css'],
},
env: {
browser: true,
es2023: true,
},
{
files: ['*.astro'],
parser: 'astro-eslint-parser',
extends: ['plugin:astro/recommended', 'prettier'],
parserOptions: {
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended', 'prettier'],
overrides: [
{
files: tsconfig.include,
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
extraFileExtensions: ['.astro', '.css'],
},
},
{
files: ['*.astro'],
parser: 'astro-eslint-parser',
extends: ['plugin:astro/recommended', 'prettier'],
parserOptions: {
project: null,
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.astro', '.css'],
},
rules: {},
},
{
files: ['*.jsx', '*.tsx'],
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended', 'prettier'],
plugins: ['react'],
rules: {
'react/prop-types': 'off',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
extraFileExtensions: ['.astro', '.css'],
},
rules: {},
project: './tsconfig.json',
},
{
files: ['*.jsx', '*.tsx'],
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended', 'prettier'],
plugins: ['react'],
rules: {
plugins: ['@typescript-eslint'],
rules: {
'react/prop-types': 'off',
},
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-restricted-imports': ['error'],
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
extraFileExtensions: ['.astro', '.css'],
project: './tsconfig.json',
},
plugins: ['@typescript-eslint'],
rules: {
'react/prop-types': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-restricted-imports': ['error'],
},
};
12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: monthly
time: '16:30'
open-pull-requests-limit: 0
- package-ecosystem: npm
directory: '/'
schedule:
interval: monthly
time: '16:30'
open-pull-requests-limit: 0
6 changes: 3 additions & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", "schedule:monthly"],
"labels": ["dependencies", "renovate"]
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", "schedule:monthly"],
"labels": ["dependencies", "renovate"]
}
64 changes: 32 additions & 32 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
name: CodeQL Analysis
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['JavaScript', 'TypeScript']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
queries: security-extended, security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['JavaScript', 'TypeScript']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
queries: security-extended, security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
16 changes: 8 additions & 8 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Dependency Review
on: [pull_request]
permissions:
contents: read
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v1
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v1
6 changes: 3 additions & 3 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"src/**/*.{ts,tsx,css}": ["yarn format:all"],
"src/**/*.{ts,tsx}": ["yarn lint:ts"],
"src/**/*.{css}": ["yarn lint:styles"]
"src/**/*.{ts,tsx,css}": ["yarn format:all"],
"src/**/*.{ts,tsx}": ["yarn lint:ts"],
"src/**/*.{css}": ["yarn lint:styles"]
}
16 changes: 8 additions & 8 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
extends: 'stylelint-config-standard-scss',
plugins: ['stylelint-order'],
rules: {
'order/properties-alphabetical-order': true,
'selector-class-pattern': null,
'value-keyword-case': null,
'custom-property-pattern': null,
},
extends: 'stylelint-config-standard-scss',
plugins: ['stylelint-order'],
rules: {
'order/properties-alphabetical-order': true,
'selector-class-pattern': null,
'value-keyword-case': null,
'custom-property-pattern': null,
},
};
Binary file modified .yarn/install-state.gz
Binary file not shown.
38 changes: 19 additions & 19 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import react from '@astrojs/react';
import partytown from '@astrojs/partytown';
import netlify from '@astrojs/netlify/functions';
import netlify from '@astrojs/netlify';
import { astroImageTools } from 'astro-imagetools';

export default defineConfig({
site: 'https://biancafiore.me',
integrations: [
mdx(),
sitemap(),
react(),
astroImageTools,
partytown({
config: {
forward: ['dataLayer.push'],
},
}),
],
output: 'server',
adapter: netlify(),
vite: {
define: {
'import.meta.env.PUBLIC_GOOGLE_ANALYTICS_ID': process.env.PUBLIC_GOOGLE_ANALYTICS_ID,
site: 'https://biancafiore.me',
integrations: [
mdx(),
sitemap(),
react(),
astroImageTools,
partytown({
config: {
forward: ['dataLayer.push'],
},
}),
],
output: 'server',
adapter: netlify(),
vite: {
define: {
'import.meta.env.PUBLIC_GOOGLE_ANALYTICS_ID': process.env.PUBLIC_GOOGLE_ANALYTICS_ID,
},
},
},
});
12 changes: 6 additions & 6 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-case': [2, 'always', ['lower-case', 'pascal-case', 'camel-case']],
'scope-enum': [2, 'always', ['only-ui', 'deps', 'other']],
'header-max-length': [2, 'always', 130],
},
extends: ['@commitlint/config-conventional'],
rules: {
'scope-case': [2, 'always', ['lower-case', 'pascal-case', 'camel-case']],
'scope-enum': [2, 'always', ['only-ui', 'deps', 'other']],
'header-max-length': [2, 'always', 130],
},
};
Loading

0 comments on commit ecc20f1

Please sign in to comment.