Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Version 2 #19

Merged
merged 33 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e6fecd6
Change repo name
arifszn Mar 29, 2022
d64d7cf
Merge pull request #3 from arifszn/change-repo-name
arifszn Mar 29, 2022
0e7152f
Rename dev from dev.to
arifszn Mar 29, 2022
e7da8ff
Merge pull request #4 from arifszn/rename-devto
arifszn Mar 29, 2022
6427747
Move source files to src folder
arifszn Mar 29, 2022
d0780e1
Create dist version of the package
arifszn Mar 29, 2022
6ae791e
Update .gitignore
arifszn Mar 29, 2022
4cf2da5
Merge pull request #6 from arifszn/5-create-dist-version-of-the-package
arifszn Mar 29, 2022
444dc4c
Add dependencies for lint and prettier
arifszn Mar 29, 2022
b6bade3
Create .eslintignore
arifszn Mar 29, 2022
a562435
Create .eslintrc.js
arifszn Mar 29, 2022
a3cdef5
Create .prettierignore
arifszn Mar 29, 2022
a0cb90e
Create .prettierrc
arifszn Mar 29, 2022
43f7af7
Update .eslintrc.js
arifszn Mar 29, 2022
749afd6
Add scripts for lint and prettier
arifszn Mar 29, 2022
5205647
Merge pull request #8 from arifszn/7-add-lint-and-prettier
arifszn Mar 29, 2022
e42faf9
Add lint.yml
arifszn Mar 29, 2022
a4c177f
Merge pull request #10 from arifszn/9-create-cicd-for-automated-lint-…
arifszn Mar 29, 2022
677dff0
Update README.md
arifszn Mar 29, 2022
e5653d2
Add code of conduct
arifszn Mar 30, 2022
3227f34
Add contributing guide
arifszn Mar 30, 2022
d6fca1f
Merge pull request #13 from arifszn/11-add-code-of-conduct
arifszn Mar 30, 2022
2ea63e4
Merge pull request #14 from arifszn/12-add-contributing-guide
arifszn Mar 30, 2022
45d4f31
Move utils to separate folder
arifszn Mar 30, 2022
6897fb0
Remove rollup
arifszn Mar 30, 2022
aca4621
Create .npmignore
arifszn Mar 30, 2022
d38bcfe
Merge pull request #16 from arifszn/15-create-npmignore
arifszn Mar 30, 2022
cace46f
Fix export error on typescript
arifszn Mar 30, 2022
9409994
Add src to .npmignore
arifszn Mar 30, 2022
9842506
Merge pull request #18 from arifszn/17-fix-export-error-on-typescript
arifszn Mar 30, 2022
ea05f19
Update dependencies
arifszn Mar 30, 2022
ad05cf6
Add script for build dist
arifszn Mar 30, 2022
6f5d1f2
Use src for `main`
arifszn Mar 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build
/dist

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
stats.html
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// .eslintrc.js
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
};
60 changes: 0 additions & 60 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint

on:
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint

- name: Run prettier
run: npm run prettier
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
node_modules/*
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
stats.html
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.eslintignore
.eslintrc.js
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
CONTRIBUTING.md
stats.html
23 changes: 23 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build
/dist

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
stats.html
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"arrowParens": "always",
"bracketSpacing": true,
"printWidth": 80,
"singleQuote": true,
"tabWidth": 2
}
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, 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.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

If you have found an issue or would like to request a new feature, simply create a new issue detailing the request. We also welcome pull requests. See below for information on getting started with development and submitting pull requests.

Please note we have a [code of conduct](https://github.com/arifszn/blog-js/blob/main/CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.

## Found an Issue?

If you find a bug in the source code or a mistake in the documentation, you can help us by
submitting an issue to our [GitHub Repository](https://github.com/arifszn/blog-js/issues/new). Even better you can submit a Pull Request
with a fix.

## Submitting a Pull Request

- If applicable, update the `readme`
- Use `npm run lint` and `npm run prettier` before committing
- Example for a commit message

```
Fix type validation for typescript
```

### Developing

Fork, then clone the repo:

```sh
git clone https://github.com/your-username/blog-js.git
cd blog-js
```

Install dependencies:

```sh
npm install
```

### Building

Running the `build` task will create the `dist` version of the project.

```sh
npm run build
```

### Project Structure

```text
root
├── dist
└── src
└── types
```
Loading