mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Simplify linter & formatter config
This commit is contained in:
parent
dd23b65c80
commit
7aa64366c0
4 changed files with 26 additions and 51 deletions
|
|
@ -1,24 +1,11 @@
|
|||
import eslintConfigStandard from 'eslint-config-standard'
|
||||
import eslintConfigPrettier from 'eslint-config-prettier'
|
||||
|
||||
import eslintPluginAstro from 'eslint-plugin-astro'
|
||||
|
||||
/** @type {import("eslint").Linter.Config} */
|
||||
module.exports = {
|
||||
extends: ['plugin:astro/recommended'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 'latest'
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.astro'],
|
||||
parser: 'astro-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
extraFileExtensions: ['.astro']
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
'no-multiple-empty-lines': [2, { max: 1 }]
|
||||
}
|
||||
}
|
||||
module.exports = [
|
||||
eslintConfigStandard,
|
||||
eslintConfigPrettier,
|
||||
eslintPluginAstro.configs.recommended
|
||||
]
|
||||
|
|
|
|||
23
package.json
23
package.json
|
|
@ -28,29 +28,24 @@
|
|||
"@inlang/paraglide-astro": "^0.2.2",
|
||||
"@sequelize/core": "^7.0.0-alpha.37",
|
||||
"@sequelize/mysql": "^7.0.0-alpha.41",
|
||||
"astro": "^4.13.1",
|
||||
"astro-icon": "^1.1.1",
|
||||
"auth-astro": "^4.1.2",
|
||||
"lodash": "^4.17.21",
|
||||
"bcrypt": "^5.1.1",
|
||||
"graphql-scalars": "^1.23.0",
|
||||
"sharp": "0.32.6",
|
||||
"tailwindcss": "^3.4.8"
|
||||
"tailwindcss": "^3.4.12",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@inlang/paraglide-js": "1.11.2",
|
||||
"@parcel/watcher": "^2.4.1",
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^8.6.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-astro": "^1.2.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.9.0",
|
||||
"eslint": "^9.10.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-astro": "^1.2.4",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.0",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-config-standard": "^7.0.0",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"typescript": "^5.5.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-linux-x64-gnu": "4.9.5"
|
||||
"prettier-plugin-astro": "^0.14.1"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
/** @type {import("prettier").Config} */
|
||||
module.exports = {
|
||||
...require('prettier-config-standard'),
|
||||
const merge = require('lodash/merge')
|
||||
const prettierConfigStandard = require('prettier-config-standard')
|
||||
|
||||
pluginSearchDirs: [__dirname],
|
||||
/** @type {import("prettier").Config} */
|
||||
const config = merge(prettierConfigStandard, {
|
||||
plugins: [require.resolve('prettier-plugin-astro')],
|
||||
overrides: [
|
||||
{
|
||||
|
|
@ -12,4 +12,6 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = config
|
||||
|
|
|
|||
|
|
@ -1,17 +1,8 @@
|
|||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "Bundler",
|
||||
"allowJs": true,
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"*"
|
||||
],
|
||||
"@/root/*": [
|
||||
"../*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue