Skip to content

Commit

Permalink
feat: setup + require-icon-postfix-rule
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfaga committed Apr 30, 2023
0 parents commit 692591c
Show file tree
Hide file tree
Showing 31 changed files with 5,071 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
scripts/
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
extends: ['plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['filename-rules', 'only-warn'],
rules: {
'func-style': ['error', 'declaration'],
'@typescript-eslint/no-unused-vars': ['error', {varsIgnorePattern: '^_'}],
},
overrides: [
{
files: ['lib/**/*'],
rules: {
'filename-rules/match': ['error', 'kebab-case'],
},
},
],
};
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Report a bug to help us improve
title: ''
labels: ''
assignees: ''
---

## Description

Please provide a description of the problem.

## Expected Behaviour

Please describe what you expected would happen.

## Actual Behaviour

Please describe what happened instead.

## Affected Version

Please provide the version number where this issue was encountered.

## Steps to Reproduce

1. First step
1. Second step
1. etc.

## Checklist

- [ ] I have read the
[contributing guidelines](https://github.com/huntclub/eslint-plugin-hunt-club/blob/main/CONTRIBUTING.md)
- [ ] I have verified this does not duplicate an existing issue
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature Request
about: Suggest a feature for this project
title: ''
labels: ''
assignees: ''
---

## Problem Statement

Please describe the problem to be addressed by the proposed feature.

## Proposed Solution

Please describe what you envision the solution to this problem would look like.

## Alternatives Considered

Please briefly describe which alternatives, if any, have been considered,
including merits of alternate approaches and tradeoffs being made.

## Additional Context

Please provide any other information that may be relevant.
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Description

Please provide a meaningful description of what this change will do, or is for.
Bonus points for including links to related issues, other PRs, or technical
references.

Note that by _not_ including a description, you are asking reviewers to do extra
work to understand the context of this change, which may lead to your PR taking
much longer to review, or result in it not being reviewed at all.

## Type of Change

- [ ] Bug Fix
- [ ] New Feature
- [ ] Breaking Change
- [ ] Refactor
- [ ] Documentation
- [ ] Other (please describe)

## Checklist

- [ ] I have read the
[contributing guidelines](https://github.com/huntclub/eslint-plugin-hunt-club/blob/main/CONTRIBUTING.md)
- [ ] Existing issues have been referenced (where applicable)
- [ ] I have verified this change is not present in other open pull requests
- [ ] Functionality is documented
- [ ] All code style checks pass
- [ ] New code contribution is covered by automated tests
- [ ] All new and existing tests pass
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'publish to NPM'
on:
push:
tags: ['*']

jobs:
publish:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.tool-versions'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn prettier
- run: yarn test
- run: yarn build
- run: yarn build:post

- id: 'publish'
uses: JS-DevTools/npm-publish@v1
with:
access: 'public'
token: ${{ secrets.NPM_AUTH_TOKEN }}

- if: steps.publish.outputs.type != 'none'
run: |
echo "Published new version: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
27 changes: 27 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: stale

on:
schedule:
- cron: '0 0 * * 0'

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: 📆 mark stale PRs # Automatically marks inactive PRs as stale
uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60
stale-issue-label: 'stale'
stale-pr-label: 'stale'
stale-issue-message:
'Automatically marking issue as stale due to lack of activity'
stale-pr-message:
'Automatically marking pull request as stale due to lack of activity'
days-before-close: 7
close-issue-message: 'Automatically closing this issue as stale'
close-pr-message: 'Automatically closing this pull request as stale'
63 changes: 63 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: validate

on: # Rebuild any PRs and main branch changes
push:
branches:
- main
- develop
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.tool-versions'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn lint
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.tool-versions'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn prettier
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.tool-versions'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- name: run tests + publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: yarn test:coverage
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.tool-versions'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn build
renovate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 🧼 lint renovate config # Validates changes to renovate.json config file
uses: suzuki-shunsuke/[email protected]
with:
config_file_path: 'renovate.json'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
coverage
tsconfig.tsbuildinfo
dist
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
test-report.xml
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.github/ISSUE_TEMPLATE/*.md
.github/PULL_REQUEST_TEMPLATE.md
coverage/
dist/
package.json
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"bracketSpacing": false,
"proseWrap": "always",
"singleQuote": true,
"parser": "typescript",
"overrides": [
{"files": ["*.json", ".prettierrc"], "options": {"parser": "json"}},
{"files": "*.md", "options": {"parser": "markdown"}},
{"files": "*.html", "options": {"parser": "angular"}},
{"files": "*.css", "options": {"parser": "css"}},
{"files": ["*.yml", "*.yaml"], "options": {"parser": "yaml"}},
{"files": "*.mdx", "options": {"parser": "mdx"}},
{"files": ["*.graphql", "*.gql"], "options": {"parser": "graphql"}}
]
}
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.15.0
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.1.0] - 2023-04-30

### Added

- Add initial library setup
- `eslint` rules:
- `hunt-club/require-icon-postfix`: Require the `Icon` postfix for all Lucide icon components
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @huntclub/eslint-plugin
Loading

0 comments on commit 692591c

Please sign in to comment.