From 6808d971c8f3302d500968d9469f53504cd3a046 Mon Sep 17 00:00:00 2001 From: borb Date: Tue, 23 Sep 2025 15:33:12 +0300 Subject: [PATCH] add prettier npm script, make eslint config prettier --- eslint.config.mjs | 34 +++++++++++++++++++--------------- package.json | 4 +++- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 2244091..8d70aa9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,18 +1,22 @@ -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([ - // { - // files: ["**/*.{js,mjs,cjs}"], - // plugins: { js }, - // extends: ["js/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", - }, - }, + // { + // files: ["**/*.{js,mjs,cjs}"], + // plugins: { js }, + // extends: ["js/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', + }, + }, ]); diff --git a/package.json b/package.json index 5897f3e..93f0c77 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,8 @@ }, "scripts": { "lint": "eslint .", - "lintfix": "eslint . --fix" + "lintfix": "eslint . --fix", + "prettier": "prettier . --check", + "prettierfix": "prettier . --write" } }