Skip to content

Commit

Permalink
feat(tooling)!: ✨ update & add many toolings
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Apr 12, 2023
1 parent 63492ba commit 1faebdc
Show file tree
Hide file tree
Showing 58 changed files with 6,028 additions and 2,812 deletions.
28 changes: 28 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-21bb42.svg\" />",
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"login": "navin-moorthy",
"name": "Navin Moorthy",
"avatar_url": "https://avatars.githubusercontent.com/u/39694575?v=4",
"profile": "https://navinmoorthy.me/",
"contributions": ["code", "a11y", "doc", "design", "ideas", "maintenance"]
},
{
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg",
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"profile": "http://www.joshuakgoldberg.com",
"contributions": ["tool"]
}
],
"contributorsPerLine": 7,
"files": ["README.md"],
"imageSize": 100,
"projectName": "node-ts-app",
"projectOwner": "timelessco",
"repoHost": "https:",
"repoType": "github"
}
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://editorconfig.org
root = true

[*]
# Non-configurable Prettier behaviors
charset = utf-8
insert_final_newline = true
# Caveat: Prettier won’t trim trailing whitespace inside template strings, but your editor might.
trim_trailing_whitespace = true

# Configurable Prettier behaviors
end_of_line = lf
indent_style = tab
indent_size = 2
max_line_length = 80
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_ENV="production"
# API_URL=""
19 changes: 15 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
# Optional tool caches
.eslintcache
.stylelintcache
.prettiercache
.cspellcache

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
# npm
.npm
.npmrc

# Yarn 2
.pnp/
Expand Down Expand Up @@ -62,12 +65,20 @@ jspm_packages
# Storybook Build
storybook-static

# Turbo Repo
.turbo

# Lock files
package-lock.json
yarn.lock
pnpm-lock.yaml

# local files
# Custom
release-it/**/*.hbs
release-it/remote-commits.json
release-it/conventionalChangelogWriterOptsTransform.cjs

## library folder
dist
CHANGELOG.md
lib
stats.html
public
146 changes: 116 additions & 30 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,32 +1,118 @@
/** @type {import('eslint').Linter.Config} */
const config = {
env: {
es6: true,
node: true,
},
parser: "@babel/eslint-parser",
parserOptions: {
requireConfigFile: false,
babelOptions: {
babelrc: false,
configFile: false,
presets: ["@babel/preset-env"],
},
},
extends: ["airbnb-base", "plugin:prettier/recommended"],
plugins: ["import"],
rules: {
"no-console": "off",
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["**/*.config.js"] },
],
"import/prefer-default-export": "off",
"no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
},
const commonIgnoredRules = {
"no-console": ["error", { allow: ["warn", "error"] }],
"arrow-body-style": ["error", "as-needed"],
"import/no-named-as-default": "off",
"import/no-unassigned-import": ["error", { allow: ["**/*.css"] }],
"import/no-extraneous-dependencies": ["off"],
"simple-import-sort/imports": "off",
"unicorn/no-array-reduce": "off",
"canonical/sort-keys": "off",
"canonical/import-specifier-newline": "off",
"canonical/destructuring-property-newline": "off",
"canonical/filename-match-exported": "off",
"canonical/filename-match-regex": "off",
"canonical/id-match": "off",
"zod/require-strict": "off",
};

module.exports = config;
const commonTypescriptIgnoredRules = {
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
"@typescript-eslint/naming-convention": ["off"],
};

const commonNodeIgnoredRules = {
...commonIgnoredRules,
"node/no-process-env": "off",
};

/**
* @type {import('@typescript-eslint/experimental-utils').TSESLint.Linter.Config}
*/
module.exports = {
ignorePatterns: ["!**/.*"],
overrides: [
{
files: ["*.js", "*.cjs"],
extends: [
"canonical",
"canonical/node",
"canonical/regexp",
"canonical/jsdoc",
"canonical/zod",
"prettier",
],
settings: {
jsdoc: {
mode: "typescript",
},
},
rules: {
...commonNodeIgnoredRules,
"import/extensions": [
"error",
"always",
{
ignorePackages: true,
},
],
},
overrides: [
{
files: ["*.js"],
extends: ["canonical/module"],
},
],
},
{
files: ["./*.ts", "src/**/*.ts"],
extends: [
"canonical",
"canonical/node",
"canonical/module",
"canonical/typescript",
"canonical/typescript-type-checking",
"canonical/jsdoc",
"canonical/regexp",
"canonical/zod",
"prettier",
],
parserOptions: {
project: "./tsconfig.json",
},
settings: {
jsdoc: {
mode: "typescript",
},
},
rules: {
...commonNodeIgnoredRules,
...commonTypescriptIgnoredRules,
},
},
{
files: ["*.json", ".all-contributorsrc"],
excludedFiles: [".vscode/**/*.json"],
parser: "jsonc-eslint-parser",
extends: ["plugin:jsonc/recommended-with-json", "plugin:jsonc/prettier"],
},
{
files: [".vscode/**"],
parser: "jsonc-eslint-parser",
extends: ["plugin:jsonc/recommended-with-jsonc", "plugin:jsonc/prettier"],
},
{
files: ["*.yaml", "*.yml"],
parser: "yaml-eslint-parser",
extends: ["plugin:yml/standard", "plugin:yml/prettier"],
},
{
files: ["*.toml"],
parser: "toml-eslint-parser",
extends: ["plugin:toml/standard"],
},
],
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
22 changes: 13 additions & 9 deletions .github/.kodiak.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require_automerge_label = false

# By default, Kodiak will only act on PRs that have this label. You can disable
# this requirement via `merge.require_automerge_label`.
automerge_label = ['automerge 🚀'] # default: "automerge"
automerge_label = [ 'automerge 🚀' ] # default: "automerge"

# Choose merge method for Kodiak to use.
#
Expand Down Expand Up @@ -83,6 +83,15 @@ strip_html_comments = true # default: false
# This setting only applies when merge.message.body = "pull_request" is set.
include_coauthors = true # default: false

[merge.automerge_dependencies]
# auto merge all PRs opened by "dependabot" that are "minor" or "patch" version upgrades. "major" version upgrades will be ignored.
versions = [
"major",
"minor",
"patch"
]
usernames = [ "renovate" ]


[update]

Expand All @@ -98,6 +107,7 @@ include_coauthors = true # default: false
# `master` _all_ of those PRs against `master` will update. For `N` PRs against
# a target you will see at least `N(N-1)/2` updates. If this configuration
# option was disabled you would only see at least `N-1` updates.

always = true # default: false

# When enabled, Kodiak will only update PRs that have an automerge label
Expand All @@ -113,18 +123,12 @@ autoupdate_label = 'autoupdate 🔁' # default: "null"
# dependabot to update and close stale dependency upgrades.
# ignored_usernames = ["renovate"]

[merge.automerge_dependencies]
# auto merge all PRs opened by "dependabot" that are "minor" or "patch" version upgrades. "major" version upgrades will be ignored.
versions = ["major", "minor", "patch"]
usernames = ["renovate"]


[approve]

# If a PR is opened by a user with a username in the `approve.auto_approve_usernames` list,
# Kodiak will automatically add an approval to the PR.
auto_approve_usernames = ["renovate"]
auto_approve_usernames = [ "renovate" ]

# If a PR has a label assigned which is in the `approve.auto_approve_labels` list,
# Kodiak will automatically add an approval to the PR.
auto_approve_labels = ["autoapprove ✅"] # default: []
auto_approve_labels = [ "autoapprove ✅" ] # default: []
44 changes: 32 additions & 12 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# Contributor Covenant Code of Conduct

## Table of Contents

- [Contributor Covenant Code of Conduct](#contributor-covenant-code-of-conduct)
- [Table of Contents](#table-of-contents)
- [Our Pledge](#our-pledge)
- [Our Standards](#our-standards)
- [Enforcement Responsibilities](#enforcement-responsibilities)
- [Scope](#scope)
- [Enforcement](#enforcement)
- [Enforcement Guidelines](#enforcement-guidelines)
- [1. Correction](#1-correction)
- [2. Warning](#2-warning)
- [3. Temporary Ban](#3-temporary-ban)
- [4. Permanent Ban](#4-permanent-ban)
- [Attribution](#attribution)

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Expand Down Expand Up @@ -60,8 +76,8 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[[email protected]](mailto:[email protected]). All complaints will be
reviewed and investigated promptly and fairly.
[Timeless](mailto:[email protected]). All complaints will be reviewed and
investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
Expand Down Expand Up @@ -115,14 +131,18 @@ community.
## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder](https:/mozilla/diversity).
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

[homepage]: https://www.contributor-covenant.org
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https:/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
Loading

0 comments on commit 1faebdc

Please sign in to comment.