improved eslint

This commit is contained in:
Fractal-Tess
2022-09-21 06:36:41 +03:00
parent 6e4e4bb37b
commit 3e7b460fc8
3 changed files with 47 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ module.exports = {
extends: [ extends: [
'eslint:recommended', 'eslint:recommended',
'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended',
'plugin:json/recommended',
'prettier' 'prettier'
], ],
rules: { rules: {

View File

@@ -25,7 +25,7 @@
"svelte:preview": "vite preview" "svelte:preview": "vite preview"
}, },
"lint-staged": { "lint-staged": {
"*": [ "*.{ts,svelte,cjs,js,json,postcss}": [
"prettier --write", "prettier --write",
"eslint" "eslint"
] ]
@@ -46,6 +46,7 @@
"daisyui": "^2.28.0", "daisyui": "^2.28.0",
"eslint": "^8.23.1", "eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-svelte3": "^4.0.0", "eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-unused-imports": "^2.0.0", "eslint-plugin-unused-imports": "^2.0.0",
"husky": "^8.0.1", "husky": "^8.0.1",

44
pnpm-lock.yaml generated
View File

@@ -16,6 +16,7 @@ specifiers:
daisyui: ^2.28.0 daisyui: ^2.28.0
eslint: ^8.23.1 eslint: ^8.23.1
eslint-config-prettier: ^8.5.0 eslint-config-prettier: ^8.5.0
eslint-plugin-json: ^3.1.0
eslint-plugin-svelte3: ^4.0.0 eslint-plugin-svelte3: ^4.0.0
eslint-plugin-unused-imports: ^2.0.0 eslint-plugin-unused-imports: ^2.0.0
husky: ^8.0.1 husky: ^8.0.1
@@ -50,6 +51,7 @@ devDependencies:
daisyui: 2.28.0_6b4luod745iryv24jvdbvzbbsa daisyui: 2.28.0_6b4luod745iryv24jvdbvzbbsa
eslint: 8.23.1 eslint: 8.23.1
eslint-config-prettier: 8.5.0_eslint@8.23.1 eslint-config-prettier: 8.5.0_eslint@8.23.1
eslint-plugin-json: 3.1.0
eslint-plugin-svelte3: 4.0.0_rhh4tpcyg7zwtq6pdnkzw5gxma eslint-plugin-svelte3: 4.0.0_rhh4tpcyg7zwtq6pdnkzw5gxma
eslint-plugin-unused-imports: 2.0.0_aycu25ebzxq3ptk7zxntnrmsdq eslint-plugin-unused-imports: 2.0.0_aycu25ebzxq3ptk7zxntnrmsdq
husky: 8.0.1 husky: 8.0.1
@@ -1114,6 +1116,14 @@ packages:
eslint: 8.23.1 eslint: 8.23.1
dev: true dev: true
/eslint-plugin-json/3.1.0:
resolution: {integrity: sha512-MrlG2ynFEHe7wDGwbUuFPsaT2b1uhuEFhJ+W1f1u+1C2EkXmTYJp4B1aAdQQ8M+CC3t//N/oRKiIVw14L2HR1g==}
engines: {node: '>=12.0'}
dependencies:
lodash: 4.17.21
vscode-json-languageservice: 4.2.1
dev: true
/eslint-plugin-svelte3/4.0.0_rhh4tpcyg7zwtq6pdnkzw5gxma: /eslint-plugin-svelte3/4.0.0_rhh4tpcyg7zwtq6pdnkzw5gxma:
resolution: {integrity: sha512-OIx9lgaNzD02+MDFNLw0GEUbuovNcglg+wnd/UY0fbZmlQSz7GlQiQ1f+yX0XvC07XPcDOnFcichqI3xCwp71g==} resolution: {integrity: sha512-OIx9lgaNzD02+MDFNLw0GEUbuovNcglg+wnd/UY0fbZmlQSz7GlQiQ1f+yX0XvC07XPcDOnFcichqI3xCwp71g==}
peerDependencies: peerDependencies:
@@ -1562,6 +1572,10 @@ packages:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
dev: true dev: true
/jsonc-parser/3.2.0:
resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
dev: true
/kleur/4.1.5: /kleur/4.1.5:
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
engines: {node: '>=6'} engines: {node: '>=6'}
@@ -1638,6 +1652,10 @@ packages:
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
dev: true dev: true
/lodash/4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
dev: true
/log-update/4.0.0: /log-update/4.0.0:
resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==}
engines: {node: '>=10'} engines: {node: '>=10'}
@@ -2478,6 +2496,32 @@ packages:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true
/vscode-json-languageservice/4.2.1:
resolution: {integrity: sha512-xGmv9QIWs2H8obGbWg+sIPI/3/pFgj/5OWBhNzs00BkYQ9UaB2F6JJaGB/2/YOZJ3BvLXQTC4Q7muqU25QgAhA==}
dependencies:
jsonc-parser: 3.2.0
vscode-languageserver-textdocument: 1.0.7
vscode-languageserver-types: 3.17.2
vscode-nls: 5.2.0
vscode-uri: 3.0.6
dev: true
/vscode-languageserver-textdocument/1.0.7:
resolution: {integrity: sha512-bFJH7UQxlXT8kKeyiyu41r22jCZXG8kuuVVA33OEJn1diWOZK5n8zBSPZFHVBOu8kXZ6h0LIRhf5UnCo61J4Hg==}
dev: true
/vscode-languageserver-types/3.17.2:
resolution: {integrity: sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==}
dev: true
/vscode-nls/5.2.0:
resolution: {integrity: sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==}
dev: true
/vscode-uri/3.0.6:
resolution: {integrity: sha512-fmL7V1eiDBFRRnu+gfRWTzyPpNIHJTc4mWnFkwBUmO9U3KPgJAmTx7oxi2bl/Rh6HLdU7+4C9wlj0k2E4AdKFQ==}
dev: true
/which/2.0.2: /which/2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'} engines: {node: '>= 8'}