Setup eslint

This commit is contained in:
AkiraFukushima 2023-12-02 16:30:28 +09:00
parent 2124cc7516
commit a10ea0a081
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
3 changed files with 1245 additions and 23 deletions

44
.eslintrc.json Normal file
View File

@ -0,0 +1,44 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"overrides": [
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/display-name": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
]
},
"settings": {
"react": {
"version": "18.2"
}
}
}

View File

@ -9,7 +9,8 @@
"dev": "nextron",
"build": "nextron build",
"postinstall": "electron-builder install-app-deps",
"typecheck": "tsc -p renderer --noEmit && tsc -p main --noEmit"
"typecheck": "tsc -p renderer --noEmit && tsc -p main --noEmit",
"lint": "eslint renderer --ext ts,tsx"
},
"dependencies": {
"blurhash": "^2.0.5",
@ -32,9 +33,14 @@
"@types/node": "^18.11.18",
"@types/react": "^18.0.26",
"@types/sanitize-html": "^2.9.4",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"autoprefixer": "^10.4.16",
"electron": "^26.2.2",
"electron-builder": "^24.6.4",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-react": "^7.33.2",
"next": "^12.3.4",
"nextron": "^8.12.0",
"postcss": "^8.4.31",

1216
yarn.lock

File diff suppressed because it is too large Load Diff