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
1 change: 1 addition & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ASTRO_BASE_URL=http://localhost:4321
53 changes: 0 additions & 53 deletions .eslintrc.cjs

This file was deleted.

4 changes: 0 additions & 4 deletions eslint.config.cjs

This file was deleted.

66 changes: 66 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import jseslint from '@eslint/js'
import tsEslintParser from '@typescript-eslint/parser'
import eslintAstroPlugin from 'eslint-plugin-astro'
import eslintSimpleImportSortPlugin from 'eslint-plugin-simple-import-sort'
import globals from 'globals'
import tseslint from 'typescript-eslint'

const sharedConfigs = {
quotes: 'single',
semicolon: false,
}

export default [
{
ignores: ['.gitignore', '.astro/**'],
plugins: {
'simple-import-sort': eslintSimpleImportSortPlugin,
},
languageOptions: {
sourceType: 'module',
ecmaVersion: 2023,
globals: {
...globals.browser,
...globals.node
}
},
rules: {
'comma-spacing': [
'error',
{
'before': false,
'after': true
}
],
'quotes': ['error', sharedConfigs.quotes],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
{
files: ['src/**/*.astro'],
plugins: {
'astro': eslintAstroPlugin,
},
...tseslint.configs.eslintRecommended,
...{ rules: eslintAstroPlugin.configs.recommended.rules },
languageOptions: {
parser: tsEslintParser,
},
rules: {
'astro/semi': ['error', sharedConfigs.semicolon ? 'always' : 'never'],
}
},
{
files: ['*.ts'],
...jseslint.configs.recommended,
...tseslint.configs.eslintRecommended,
languageOptions: {
parser: tsEslintParser,
}
},
{
files: ['*.mjs'],
...jseslint.configs.recommended,
},
]
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"preview": "astro preview",
"astro": "astro",
"prepare": "astro telemetry disable && husky install",
"lint:js": "eslint --ext .cjs,.mjs,.ts,.astro --ignore-path .gitignore .",
"lint:js": "eslint .",
"lint:ts": "astro check && tsc --noEmit",
"lint": "pnpm run lint:js && pnpm run lint:ts"
},
"dependencies": {
"@astrojs/check": "^0.5.5",
"@astrojs/partytown": "^2.0.2",
"@astrojs/rss": "^4.0.0",
"@astrojs/sitemap": "^3.0.3",
Expand All @@ -38,15 +39,15 @@
"@types/lodash.kebabcase": "^4.1.8",
"@types/mustache": "^4.2.4",
"@types/node": "^20.9.3",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@typescript-eslint/parser": "^7.0.2",
"commander": "^11.1.0",
"commitizen": "^4.3.0",
"dayjs": "^1.11.10",
"dotenv": "^16.3.1",
"eslint": "^8.52.0",
"eslint-plugin-astro": "^0.31.0",
"eslint": "^8.57.0",
"eslint-plugin-astro": "^0.31.4",
"eslint-plugin-simple-import-sort": "^12.0.0",
"globals": "^14.0.0",
"husky": "^9.0.0",
"lodash.get": "^4.4.2",
"lodash.kebabcase": "^4.1.1",
Expand All @@ -56,6 +57,7 @@
"satori-html": "^0.3.2",
"tailwindcss-themer": "^4.0.0",
"tsx": "^4.2.0",
"typescript": "^5.2.2"
"typescript": "^5.3.3",
"typescript-eslint": "^7.0.2"
}
}
Loading