mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:10:42 +00:00
configures eslint
This commit is contained in:
@@ -78,10 +78,22 @@ npm run start:server-dev
|
||||
## 🛠️ Development Tools
|
||||
|
||||
- **Format code**:
|
||||
|
||||
```bash
|
||||
npm run format
|
||||
```
|
||||
|
||||
- **Lint code**:
|
||||
|
||||
```bash
|
||||
npm run lint
|
||||
```
|
||||
|
||||
- **Lint and fix code**:
|
||||
```bash
|
||||
npm run lint:fix
|
||||
```
|
||||
|
||||
## 🏗️ Project Structure
|
||||
|
||||
- `/src/client` - Frontend game client
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import pluginJs from "@eslint/js";
|
||||
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
||||
import globals from "globals";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
{ files: ["**/*.{js,mjs,cjs,ts}"] },
|
||||
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
|
||||
pluginJs.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
eslintConfigPrettier,
|
||||
];
|
||||
Generated
+927
-10
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,8 @@
|
||||
"tunnel": "npm run build-prod && npm run start:server",
|
||||
"test": "jest",
|
||||
"format": "prettier --ignore-unknown --write .",
|
||||
"lint": "eslint",
|
||||
"lint:fix": "eslint --fix",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"lint-staged": {
|
||||
@@ -22,6 +24,7 @@
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@types/chai": "^4.3.17",
|
||||
"@types/d3": "^7.4.3",
|
||||
"@types/jest": "^29.5.12",
|
||||
@@ -40,7 +43,10 @@
|
||||
"concurrently": "^8.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^7.1.2",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-config-prettier": "^10.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"globals": "^16.0.0",
|
||||
"html-inline-script-webpack-plugin": "^3.2.1",
|
||||
"html-loader": "^5.1.0",
|
||||
"husky": "^9.1.7",
|
||||
@@ -63,6 +69,7 @@
|
||||
"tsconfig-paths": "^4.2.0",
|
||||
"tsx": "^4.17.0",
|
||||
"typescript": "^5.7.2",
|
||||
"typescript-eslint": "^8.26.0",
|
||||
"worker-loader": "^3.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user