Skip to content

My personal shareable configurations with fully automated package publishing to NPM Registry.

License

Notifications You must be signed in to change notification settings

waldronmatt/shareable-configs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b022902 · Dec 3, 2023
Dec 3, 2023
Jun 5, 2022
Nov 5, 2022
Nov 3, 2023
Jun 4, 2022
Jun 12, 2022
Jun 8, 2022
Jun 12, 2022
Sep 16, 2022
Apr 7, 2022
Sep 17, 2022
Sep 19, 2022
Jun 12, 2022
Sep 19, 2022
Nov 26, 2022
May 24, 2022
Nov 5, 2022
Nov 10, 2022
Sep 1, 2023
Oct 1, 2023

Repository files navigation

Shareable Configs

My personal shareable configurations with fully automated package publishing to the NPM Registry.

Features

  • Automated publishing to the NPM Registry for changed packages
  • Automated CHANGELOG.md generation and GitHub releases using conventional commits
  • Automated merging of Dependabot pull requests of dependency updates.

Usage

Installation

Install all configs and associated packages as development dependencies (excludes Webpack):

yarn add -D auto @waldronmatt/auto-config @waldronmatt/browserslist-config @commitlint/cli @waldronmatt/commitlint-config eslint @waldronmatt/eslint-config htmlhint @waldronmatt/htmlhint-config jest @waldronmatt/jest-config lint-staged @waldronmatt/lint-staged-config markdownlint @waldronmatt/markdownlint-config postcss @waldronmatt/postcss-config prettier @waldronmatt/prettier-config secretlint @waldronmatt/secretlint-config semantic-release @waldronmatt/semantic-release-config stylelint @waldronmatt/stylelint-config typescript @waldronmatt/tsconfig-config

Set up Husky

Follow the directions found here.

Set up Commitizen

Follow the directions found here.

Create Config Files

Follow the Usage section via the README.md in each package.

Some packages have examples of extended configurations to better support other packages and/or constitute a complete working configuration for projects.

See eslint, jest, lint-staged, semantic-release, stylelint, and tsconfig.

Add NPM Scripts

npm set-script lint:md "markdownlint --fix **/*.md --ignore node_modules --ignore **/CHANGELOG.md" && npm set-script lint:js "eslint --fix **/*.{js,jsx,ts,tsx}" && npm set-script lint:css "stylelint --fix **/*.{css,scss}" && npm set-script lint:html "htmlhint --config ./node_modules/@waldronmatt/htmlhint-config/index.json **/*.html" && npm set-script lint:secrets "npx secretlint **/*" && npm set-script lint "yarn lint:md && yarn lint:js && yarn lint:css && yarn lint:html && yarn lint:secrets" && npm set-script test "jest"

Install Git Hooks

Install husky and all hooks and npm scripts associated with configs:

npx husky add .husky/commit-msg 'npx --no-install commitlint --edit' && npx husky add .husky/pre-commit 'npx --no-install lint-staged'

Webpack

For Webpack, follow the directions in the README.md.

Other Awesome Monorepos

  • lerna-release-workflow - A basic Lerna monorepo with Yarn Workspaces, Conventional Commits and GitHub Actions.
  • base-configs - A collection of base configs for code quality and linting tools.
  • threepio - Shareable configurations that are used within the Galaxy.
  • medly - Share common configurations across different projects.
  • code-quality-tools - Shareable configurations for various coding-style/best practices/lint tools.
  • frontend-configs - NPM-Published front-end shareable configurations.

License

MIT