mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Set up eslint and prettier
This commit is contained in:
parent
8c9c148733
commit
ec77cb1d24
6 changed files with 4670 additions and 674 deletions
|
|
@ -1,15 +1,21 @@
|
|||
/** @type {import("eslint").Linter.Config} */
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
node: true,
|
||||
},
|
||||
extends: ["plugin:react/recommended", "standard-with-typescript", "prettier"],
|
||||
overrides: [],
|
||||
extends: ["plugin:astro/recommended"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
tsconfigRootDir: __dirname,
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.astro"],
|
||||
parser: "astro-eslint-parser",
|
||||
parserOptions: {
|
||||
parser: "@typescript-eslint/parser",
|
||||
extraFileExtensions: [".astro"],
|
||||
},
|
||||
plugins: ["react"],
|
||||
rules: {},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
"prettier-config-standard"
|
||||
5283
package-lock.json
generated
5283
package-lock.json
generated
File diff suppressed because it is too large
Load diff
13
package.json
13
package.json
|
|
@ -19,16 +19,15 @@
|
|||
"tailwindcss": "^3.4.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@eddeee888/gcg-typescript-resolver-files": "^0.10.4",
|
||||
"@graphql-codegen/cli": "^5.0.2",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-standard-with-typescript": "^43.0.1",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-n": "^16.6.2",
|
||||
"eslint-plugin-promise": "^6.6.0",
|
||||
"eslint-plugin-react": "^7.35.0",
|
||||
"eslint-plugin-astro": "^1.2.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.9.0",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-config-standard": "^7.0.0",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
14
prettier.config.cjs
Normal file
14
prettier.config.cjs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/** @type {import("prettier").Config} */
|
||||
module.exports = {
|
||||
...require("prettier-config-standard"),
|
||||
pluginSearchDirs: [__dirname],
|
||||
plugins: [require.resolve("prettier-plugin-astro")],
|
||||
overrides: [
|
||||
{
|
||||
files: "*.astro",
|
||||
options: {
|
||||
parser: "astro",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [
|
||||
".eslintrc.cjs"
|
||||
]
|
||||
"extends": "astro/tsconfigs/strict"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue