diff --git a/.husky/commit-msg b/.husky/commit-msg index 34eed8b..0a4b97d 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1 @@ -npx --no -- commitlint --edit $1 \ No newline at end of file +npx --no -- commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit index 7758677..3867a0f 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npm run lint -npm typecheck diff --git a/eslint.config.js b/eslint.config.js index 690b8fa..e040162 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,25 +1,16 @@ import globals from "globals"; import tseslint from "typescript-eslint"; -import path from "path"; -import { fileURLToPath } from "url"; -import { FlatCompat } from "@eslint/eslintrc"; -import pluginJs from "@eslint/js"; - -// mimic CommonJS variables -- not needed if using CommonJS -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended}); - export default [ {languageOptions: { globals: globals.browser }}, - ...compat.extends("standard-with-typescript"), ...tseslint.configs.recommended, { ignores: [ "**/.giignore", "**/templates", - "coverage" + "coverage", + "eslint.config.js", + "ship.config.cjs", ] } ]; diff --git a/generators/app/index.js b/generators/app/index.js index f21ffd0..8c2a13d 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -1,4 +1,3 @@ -import chalk from "chalk"; import Generator from "yeoman-generator"; import FastifyPluginGenerator from "../fastify-plugin/index.js"; diff --git a/generators/fastify-plugin/index.js b/generators/fastify-plugin/index.js index 7fd17a8..3f9e3bd 100644 --- a/generators/fastify-plugin/index.js +++ b/generators/fastify-plugin/index.js @@ -1,4 +1,3 @@ -import chalk from "chalk"; import Generator from "yeoman-generator"; export default class FastifyPluginGenerator extends Generator { diff --git a/package.json b/package.json index 3745dd8..0f643a3 100644 --- a/package.json +++ b/package.json @@ -24,10 +24,10 @@ "lint": "eslint", "lint:fix": "eslint --fix", "prepare": "husky", + "release": "shipjs prepare", "sort-package": "npx sort-package-json", "pretest": "eslint .", - "test": "jest", - "release": "shipjs prepare" + "test": "jest" }, "jest": { "testEnvironment": "node" diff --git a/ship.config.cjs b/ship.config.cjs index a6a9700..7d1c473 100644 --- a/ship.config.cjs +++ b/ship.config.cjs @@ -1,7 +1,7 @@ module.exports = { appname: "@dzangolab/generator-package-monorepo", buildCommand: () => null, - publishCommand: ({ isYarn, tag, defaultCommand, dir }) => { + publishCommand: () => { return "npm publish --access public"; }, };