Skip to content

Commit

Permalink
Eslint configuration for dApp
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Nov 13, 2023
1 parent 17e37fe commit 4b7ac3f
Show file tree
Hide file tree
Showing 10 changed files with 1,354 additions and 35 deletions.
1 change: 1 addition & 0 deletions dapp/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
4 changes: 4 additions & 0 deletions dapp/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"root": true,
"extends": ["@thesis-co"]
}
18 changes: 0 additions & 18 deletions dapp/.eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions dapp/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
3 changes: 3 additions & 0 deletions dapp/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require("@thesis-co/prettier-config"),
}
1 change: 1 addition & 0 deletions dapp/.tsconfig-eslint.json
16 changes: 12 additions & 4 deletions dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,33 @@
"private": true,
"version": "1.0.0",
"type": "module",
"prettier": "@thesis/prettier-config",
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"lint:eslint": "eslint .",
"lint:fix:eslint": "eslint . --fix",
"lint:config": "prettier -c '**/*.@(json|yaml|toml)'",
"lint:config:fix": "prettier -w '**/*.@(json|yaml|toml)'"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@thesis-co/eslint-config": "^0.6.1",
"@thesis/prettier-config": "github:thesis/prettier-config",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"eslint": "^8.53.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"prettier": "^3.1.0",
"typescript": "^5.2.2",
"vite": "^4.4.5"
}
Expand Down
1 change: 0 additions & 1 deletion dapp/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
Expand Down
8 changes: 5 additions & 3 deletions dapp/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// Unfortunately, the Vite React package structure does not play nice with no-extraneous-dependencies.
/* eslint-disable import/no-extraneous-dependencies */
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"

export default defineConfig({
plugins: [react()],
});
})
Loading

0 comments on commit 4b7ac3f

Please sign in to comment.