add prettier npm script, make eslint config prettier
This commit is contained in:
@@ -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',
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"lintfix": "eslint . --fix"
|
||||
"lintfix": "eslint . --fix",
|
||||
"prettier": "prettier . --check",
|
||||
"prettierfix": "prettier . --write"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user