Skip to content

Commit 12c3d04

Browse files
committed
feat: initial commit
0 parents  commit 12c3d04

18 files changed

+574
-0
lines changed

.commitlintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ["@commitlint/config-conventional"],
3+
};

.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
env: {
3+
commonjs: true,
4+
es6: true,
5+
node: true,
6+
},
7+
extends: ["airbnb", "plugin:prettier/recommended"],
8+
plugins: ["prettier"],
9+
globals: {
10+
Atomics: "readonly",
11+
SharedArrayBuffer: "readonly",
12+
},
13+
parserOptions: {
14+
ecmaVersion: 2018,
15+
},
16+
rules: {
17+
"prettier/prettier": "error",
18+
},
19+
};

.github/CODE_OF_CONDUCT.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
26+
* Trolling, insulting/derogatory comments, and personal or political attacks
27+
* Public or private harassment
28+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
29+
* Other conduct which could reasonably be considered inappropriate in a professional setting
30+
31+
## Our Responsibilities
32+
33+
Project maintainers are responsible for clarifying the standards of acceptable
34+
behavior and are expected to take appropriate and fair corrective action in
35+
response to any instances of unacceptable behavior.
36+
37+
Project maintainers have the right and responsibility to remove, edit, or
38+
reject comments, commits, code, wiki edits, issues, and other contributions
39+
that are not aligned to this Code of Conduct, or to ban temporarily or
40+
permanently any contributor for other behaviors that they deem inappropriate,
41+
threatening, offensive, or harmful.
42+
43+
## Scope
44+
45+
This Code of Conduct applies both within project spaces and in public spaces
46+
when an individual is representing the project or its community. Examples of
47+
representing a project or community include using an official project e-mail
48+
address, posting via an official social media account, or acting as an appointed
49+
representative at an online or offline event. Representation of a project may be
50+
further defined and clarified by project maintainers.
51+
52+
## Enforcement
53+
54+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
55+
reported by contacting the project team at [email protected]. All
56+
complaints will be reviewed and investigated and will result in a response that
57+
is deemed necessary and appropriate to the circumstances. The project team is
58+
obligated to maintain confidentiality with regard to the reporter of an incident.
59+
Further details of specific enforcement policies may be posted separately.
60+
61+
Project maintainers who do not follow or enforce the Code of Conduct in good
62+
faith may face temporary or permanent repercussions as determined by other
63+
members of the project's leadership.
64+
65+
## Attribution
66+
67+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
68+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
69+
70+
[homepage]: https://www.contributor-covenant.org
71+
72+
For answers to common questions about this code of conduct, see
73+
https://www.contributor-covenant.org/faq

.github/COMMIT_CONVENTION.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Git Commit Convention
2+
3+
This project uses the conventional commit standard, which means your commits should follow a basic template of:
4+
5+
> \<type>[optional scope]: \<description>
6+
>
7+
> [optional body]
8+
>
9+
> [optional footer(s)]
10+
11+
For more detailed information about available types, scopes, breaking changes, etc. please see the [official documentation](https://www.conventionalcommits.org/en/v1.0.0/).
12+
13+
This project also provides a command to assist you in formatting commit messages using [commitizen](https://commitizen.github.io/cz-cli/):
14+
15+
```shell
16+
npm run commit
17+
```

.github/CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Contributing to eslint-plugin-drupal-contrib
2+
3+
Whether you want to add a feature or simply report a bug or issue, please have a quick read through these guidelines before contributing.
4+
5+
## Developed with Github
6+
7+
We use github to host code, to track issues and feature requests, as well as accept pull requests. All other forms of communication with maintainers is not considered "official".
8+
9+
## [Github Flow](https://guides.github.com/introduction/flow/index.html) is the Way to Go
10+
11+
All code changes happen through pull requests.
12+
13+
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
14+
15+
1. Fork the repo and create your branch from dev.
16+
2. Link your pull request to any relavent open issues.
17+
3. If you've added or changed functionality, update the documentation.
18+
4. Make sure your code functions. Write a test if you have to!
19+
5. Make sure your code lints.
20+
6. Issue the pull request!
21+
22+
## Any contribution you make will be under the ISC License
23+
24+
In short, when you submit code changes, your submissions are understood to be under the same ISC License that covers the project. Feel free to contact the maintainers if that's a concern.
25+
26+
## Report bugs using Github's [issues](https://github.com/coldfrontlabs/eslint-plugin-drupal-contrib/issues)
27+
28+
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/coldfrontlabs/eslint-plugin-drupal-contrib/issues/new).
29+
30+
## Write bug reports with detail, background, and sample code
31+
32+
**Great Bug Reports** tend to have:
33+
34+
- A quick summary and/or background
35+
- Steps to reproduce
36+
- Be specific!
37+
- Give sample code if you can
38+
- What you expected would happen
39+
- What actually happens
40+
- Notes
41+
- why you think this might be happening
42+
- stuff you tried that didn't work
43+
44+
Everybody loves a thorough bug report!
45+
46+
## Keep Your Code Consistent
47+
48+
- Run `npm install` to ensure you have all the tools needed.
49+
- Use the coding standards provided.
50+
51+
This project follows a set of coding standards combining [Airbnb](https://github.com/airbnb/javascript) and [Prettier](https://prettier.io/).
52+
53+
To check your code, you can use [ESLint](https://eslint.org/) with the provided script:
54+
55+
```shell
56+
npm run lint
57+
```
58+
59+
You can also fix some violations automatically using:
60+
61+
```shell
62+
npm run fix
63+
```
64+
65+
Code that does not follow the linting standards _will not_ be merged.
66+
67+
## Commit Guidelines
68+
69+
This project uses the conventional commit standard, which means your commits should follow a basic template of:
70+
71+
> \<type>[optional scope]: \<description>
72+
>
73+
> [optional body]
74+
>
75+
> [optional footer(s)]
76+
77+
For more detailed information about available types, scopes, breaking changes, etc. please see the [official documentation](https://www.conventionalcommits.org/en/v1.0.0/).
78+
79+
This project also provides a command to assist you in formatting commit messages using [commitizen](https://commitizen.github.io/cz-cli/):
80+
81+
```shell
82+
npm run commit
83+
```
84+
85+
Commits that do not follow this format _will not_ be merged.
86+
87+
## References
88+
89+
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: 'Bug: [Brief Description]'
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Summary
11+
12+
*What is the issue you are experiencing?*
13+
14+
## Steps
15+
16+
*What are the steps to reproduce this issue?*
17+
1. Go to '...'
18+
2. Click on '....'
19+
3. Scroll down to '....'
20+
4. See error
21+
22+
## Expected Behaviour
23+
24+
*What is the expected behaviour?*
25+
26+
## Screenshots
27+
28+
*If applicable, add screenshots to help explain your problem.*
29+
30+
## Additional context
31+
32+
*Is there anything else that would give context about the problem?*
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: 'Feat: [Brief Description]'
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Related Issues
11+
12+
*Is your feature request related to a problem? Please describe.*
13+
14+
*A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]*
15+
16+
## Solution
17+
*Describe the solution you'd like*
18+
19+
## Alternatives
20+
*Describe alternatives you've considered*

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Description
2+
3+
*Why are you making this pull request?*
4+
5+
## Related Issues
6+
7+
*Please provide links to any related issues.*

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Mac file
2+
.DS_Store
3+
4+
# Auto-generated directories.
5+
**/node_modules/*
6+
7+
# Lock files.
8+
package-lock.json

.huskyrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const tasks = list => list.join(" && ");
2+
3+
module.exports = {
4+
hooks: {
5+
"pre-commit": tasks([
6+
"echo committing as $(git config user.name)",
7+
"npm run lint",
8+
]),
9+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
10+
},
11+
};

0 commit comments

Comments
 (0)