Skip to content

Commit

Permalink
core: eslint and prettier supoort configured
Browse files Browse the repository at this point in the history
  • Loading branch information
vgseven committed Aug 16, 2024
1 parent 79a97c0 commit 7c7f490
Show file tree
Hide file tree
Showing 13 changed files with 840 additions and 148 deletions.
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ignore Files for Prettier Formatting

node_modules
.next
dist
build
.github
.husky
public
pnpm-lock.yaml
11 changes: 6 additions & 5 deletions .vscode/extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"biomejs.biome",
"redhat.vscode-yaml"
]
}
"recommendations": [
"prettier.prettier-vscode",
"dbaeumer.vscode-eslint",
"redhat.vscode-yaml"
]
}
42 changes: 21 additions & 21 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ React.js Essential - An Essential Template to build an modern react.js applicati
```bash
radium init --with
```

```bash
enter the name of project and url of this template
```

> `radium` cli will initialize your project with this template and install dependencies, initialize as git repository and prepare your project for development.
## Features
Expand All @@ -31,4 +33,4 @@ enter the name of project and url of this template

## Contribute.

Contributions are always welcome! Please submit a pull request or open an issue to discuss your ideas.
Contributions are always welcome! Please submit a pull request or open an issue to discuss your ideas.
99 changes: 0 additions & 99 deletions biome.json

This file was deleted.

12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { default as eslint } from "@eslint/js";
import { default as tslint } from "typescript-eslint";

export default tslint.config(
eslint.configs.recommended,
...tslint.configs.recommended,
...tslint.configs.stylistic,
{
name: "next-essential-eslint",
ignores: ["node_modules", "build", "dist", ".next"],
},
);
22 changes: 10 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "biome lint --write .",
"format": "biome format --write .",
"lint": "eslint src/**/*",
"lint:check": "pnpm dlx eslint --inspect-config",
"type-check": "tsc --noEmit",
"format": "prettier --write .",
"clean": "pnpm rimraf node_modules && pnpm rimraf dist",
"prepare": "husky",
"build:prepare": "pnpm run type-check && pnpm run lint && pnpm run format && pnpm run build"
Expand All @@ -28,18 +29,25 @@
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@changesets/cli": "^2.27.7",
"@eslint/js": "^9.9.0",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@tanstack/router-plugin": "^1.47.0",
"@tanstack/router-vite-plugin": "^1.47.0",
"@types/eslint__js": "^8.42.3",
"@types/node": "^22.3.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.20",
"eslint": "^9.9.0",
"husky": "^9.1.4",
"postcss": "^8.4.41",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
"rimraf": "^6.0.1",
"tailwindcss": "^3.4.10",
"typescript": "^5.5.4",
"typescript-eslint": "^8.1.0",
"vite": "^5.4.1"
},
"packageManager": "[email protected]"
Expand Down
Loading

0 comments on commit 7c7f490

Please sign in to comment.