1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-14 02:31:51 +00:00

Modify ESLint configuration

Fix minimatch patterns, disable no-unused-vars entirely, stop calling
tsc in the lint script.
This commit is contained in:
Даниїл Григор'єв 2024-06-19 12:25:13 +03:00
parent 60b2727b42
commit 6f1706aa23
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D
2 changed files with 5 additions and 6 deletions

View File

@ -41,9 +41,8 @@ const runtimeConfig = tseslint.config(...baseConfig, {
}, },
}, },
rules: { rules: {
// Mostly caused by JSDoc imports, so don't annoy with errors but keep // Mostly caused by JSDoc imports, disable for now
// a reminder! "@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
// FIXME: enforce when we're ready to // FIXME: enforce when we're ready to
"prefer-const": "warn", "prefer-const": "warn",
}, },
@ -56,11 +55,11 @@ export default [
}, },
...nodeConfig.map(config => ({ ...nodeConfig.map(config => ({
...config, ...config,
files: ["*.(ts|js)", "(gulp|electron)/**/*.(ts|js)"], files: ["*.{ts,js}", "{gulp,electron}/**/*.{ts,js}"],
ignores: ["gulp/preloader/*.js"], ignores: ["gulp/preloader/*.js"],
})), })),
...runtimeConfig.map(config => ({ ...runtimeConfig.map(config => ({
...config, ...config,
files: ["src/**/*.(ts|js)x?"], files: ["src/**/*.{ts,js,tsx,jsx}"],
})), })),
]; ];

View File

@ -9,7 +9,7 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"gulp": "gulp --cwd gulp", "gulp": "gulp --cwd gulp",
"lint": "(eslint . && tsc && tsc -p src) || (tsc && tsc -p src) || tsc -p src", "lint": "eslint .",
"prettier-all": "prettier --write src/**/*.* && prettier --write gulp/**/*.*", "prettier-all": "prettier --write src/**/*.* && prettier --write gulp/**/*.*",
"buildTypes": "tsc src/js/application.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --out types.js", "buildTypes": "tsc src/js/application.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --out types.js",
"package-win32-x64": "gulp --cwd gulp package.standalone-steam.win32-x64", "package-win32-x64": "gulp --cwd gulp package.standalone-steam.win32-x64",