eslint config

This commit is contained in:
Joseph HENRY 2025-11-18 11:10:37 +01:00
parent fa9e544fdf
commit 6f7dba42ca
6 changed files with 1433 additions and 3 deletions

30
eslint.config.mjs Normal file
View File

@ -0,0 +1,30 @@
import eslint from "@eslint/js";
import { defineConfig, globalIgnores } from "eslint/config";
import tseslint from "typescript-eslint";
export default defineConfig(
globalIgnores(["dist"]),
eslint.configs.recommended,
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
project: [
"./tsconfig.json",
"./tsconfig.webpack.json",
"./tsconfig.eslint.json",
],
},
},
},
{
rules: {
"@typescript-eslint/restrict-template-expressions": [
"error",
{ allowNumber: true, allowBoolean: true },
],
},
},
);

1380
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,8 @@
"scripts": {
"build": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack",
"type-check": "tsc",
"dev": "npm run build -- --watch"
"dev": "npm run build -- --watch",
"lint": "eslint"
},
"keywords": [],
"author": "Joseph HENRY <joseph@autourdeminuit.com> (Autour du Volcan)",
@ -15,15 +16,18 @@
"@babel/core": "^7.28.5",
"@babel/preset-env": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@eslint/js": "^9.39.1",
"@types/node": "^24.10.1",
"@types/webpack": "^5.28.5",
"babel-loader": "^10.0.0",
"core-js": "^3.46.0",
"cross-env": "^10.1.0",
"eslint": "^9.39.1",
"tba-types": "github:bryab/tba-types",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.47.0",
"webpack": "^5.102.1",
"webpack-cli": "^6.0.1"
}

View File

@ -1,2 +1,5 @@
const hello = (name: string) => MessageLog.trace(`Hello, ${name}!`);
const hello = (name: string) => {
MessageLog.trace(`Hello, ${name}!`);
};
hello("Alice");

14
tsconfig.eslint.json Normal file
View File

@ -0,0 +1,14 @@
// TypeScript config for ESLint configuration (eslint.config.mjs)
{
"compilerOptions": {
"strict": true,
"noEmit": true,
"allowJs": true,
"strictNullChecks": true,
"moduleResolution": "nodenext",
"module": "nodenext",
"lib": ["esnext"],
"types": ["node"]
},
"include": ["./eslint.config.mjs"]
}

View File

@ -40,7 +40,6 @@ class FindReplacePlugin {
const matches = replaced.match(from);
if (matches) {
matches[0];
logger.info(`${from} | Found ${matches.length} matches`);
}