add prettier npm script, make eslint config prettier

This commit is contained in:
borb
2025-09-23 15:33:12 +03:00
parent 771c208d51
commit 6808d971c8
2 changed files with 22 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
import js from "@eslint/js"
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import { defineConfig } from 'eslint/config';
export default defineConfig([
// {
@@ -10,9 +10,13 @@ export default defineConfig([
// extends: ["js/recommended"],
// languageOptions: { globals: globals.node },
// },
{files: ["**/*.{ts,mts,cts}"], plugins: { tseslint }, extends: [tseslint.configs.recommended], languageOptions: { globals: globals.node },
{
files: ['**/*.{ts,mts,cts}'],
plugins: { tseslint },
extends: [tseslint.configs.recommended],
languageOptions: { globals: globals.node },
rules: {
"@typescript-eslint/no-unused-vars": "warn",
'@typescript-eslint/no-unused-vars': 'warn',
},
},
]);

View File

@@ -12,6 +12,8 @@
},
"scripts": {
"lint": "eslint .",
"lintfix": "eslint . --fix"
"lintfix": "eslint . --fix",
"prettier": "prettier . --check",
"prettierfix": "prettier . --write"
}
}