fix: eslint & prettier configuration

This commit is contained in:
abdou6666 2024-12-03 15:18:21 +01:00
parent acf3663bd5
commit 45898680a3
3 changed files with 17 additions and 16 deletions

View File

@ -1,16 +1,14 @@
{
"plugins": [
"@typescript-eslint/eslint-plugin",
"import",
"react",
"license-header"
],
"root": true,
"plugins": ["@typescript-eslint", "import", "license-header"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"rules": {
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
@ -24,19 +22,17 @@
"error",
{
"groups": [
"builtin", // Built-in imports (come from NodeJS native) go first
"external", // <- External imports
"unknown", // <- unknown
"index", // <- index imports
"internal", // <- Absolute imports
"parent", // <- Relative imports, the sibling and parent types they can be mingled together
"builtin",
"external",
"unknown",
"index",
"internal",
"parent",
"sibling"
],
"newlines-between": "always",
"alphabetize": {
/* sort in ascending order. Options: ["ignore", "asc", "desc"] */
"order": "asc",
/* ignore case. Options: [true, false] */
"caseInsensitive": true
}
}
@ -50,8 +46,8 @@
"error",
{ "blankLine": "never", "prev": ["const"], "next": "const" }
],
"react/jsx-curly-brace-presence": "warn",
"react/self-closing-comp": "error",
"react/jsx-curly-brace-presence": ["warn"],
"react/self-closing-comp": ["error"],
"license-header/header": [
"error",
[

4
widget/.prettierrc Normal file
View File

@ -0,0 +1,4 @@
{
"singleQuote": false,
"trailingComma": "all"
}

View File

@ -34,6 +34,7 @@
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"sass": "^1.77.8",