@kontent-ai/eslint-config 0.1.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODEOWNERS +1 -1
- package/.github/workflows/release.yml +5 -10
- package/LICENSE.md +1 -1
- package/README.md +38 -14
- package/jest.js +1 -1
- package/package.json +6 -6
- package/react.js +1 -1
- package/CODE_OF_CONDUCT.md +0 -46
- package/CONTRIBUTING.md +0 -68
package/.github/CODEOWNERS
CHANGED
|
@@ -7,23 +7,18 @@ jobs:
|
|
|
7
7
|
publish:
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
steps:
|
|
12
11
|
- uses: actions/checkout@v3
|
|
13
|
-
|
|
14
12
|
- name: Use Node.js
|
|
15
13
|
uses: actions/setup-node@v3
|
|
16
14
|
with:
|
|
17
15
|
node-version-file: '.nvmrc'
|
|
18
16
|
registry-url: 'https://registry.npmjs.org'
|
|
19
|
-
- name: Extract version from tag
|
|
20
|
-
id: get_version
|
|
21
|
-
uses: battila7/get-version-action@v2
|
|
22
|
-
- run: npm --no-git-tag-version version ${{ steps.get_version.outputs.version-without-v }}
|
|
23
17
|
- run: npm publish --access=public
|
|
18
|
+
if: ${{!github.event.release.prerelease}}
|
|
24
19
|
env:
|
|
25
20
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
- run: npm publish --tag prerelease
|
|
22
|
+
if: ${{github.event.release.prerelease}}
|
|
23
|
+
env:
|
|
24
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
[![Contributors][contributors-shield]][contributors-url]
|
|
2
|
+
[![npm][npm-shield]](https://www.npmjs.com/package/@kontent-ai/eslint-config)
|
|
2
3
|
[![Forks][forks-shield]][forks-url]
|
|
3
4
|
[![Stargazers][stars-shield]][stars-url]
|
|
4
5
|
[![Issues][issues-shield]][issues-url]
|
|
@@ -13,27 +14,50 @@ This is the eslint configuration that Kontent.ai uses for its TypeScript package
|
|
|
13
14
|
|
|
14
15
|
# Getting Started
|
|
15
16
|
|
|
16
|
-
Install the package
|
|
17
|
+
1. Install the package the eslint configuration.
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
# optionaly install eslint if you don't already have it
|
|
21
|
+
# npm i --save-dev eslint
|
|
22
|
+
npm i --save-dev @kontent-ai/eslint-config
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
1. [Extend](https://eslint.org/docs/latest/use/configure/configuration-files#extending-configuration-files) your eslint configuration
|
|
26
|
+
|
|
27
|
+
```jsonc
|
|
28
|
+
// showcase of .eslintrc.json
|
|
29
|
+
{
|
|
30
|
+
// ...
|
|
31
|
+
"extends": [
|
|
32
|
+
// ...
|
|
33
|
+
"@kontent-ai",
|
|
34
|
+
"@kontent-ai/eslint-config/react"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
1. Run the lint process based on your project configuration
|
|
17
40
|
|
|
18
41
|
Available configurations are:
|
|
19
|
-
* kontent-ai (default configuration for any TypeScript file)
|
|
20
|
-
* kontent-ai/react (react specific, extends default)
|
|
21
|
-
* kontent-ai/jest (jest specific, extends default)
|
|
42
|
+
* `@kontent-ai` (default configuration for any TypeScript file)
|
|
43
|
+
* `@kontent-ai/eslint-config/react` (react specific, extends default)
|
|
44
|
+
* `@kontent-ai/eslint-config/jest` (jest specific, extends default)
|
|
22
45
|
|
|
23
46
|
# License
|
|
24
47
|
|
|
25
48
|
Distributed under the MIT License. See [`LICENSE.md`](./LICENSE.md) for more information.
|
|
26
49
|
|
|
27
50
|
|
|
28
|
-
[contributors-shield]: https://img.shields.io/github/contributors/
|
|
29
|
-
[contributors-url]: https://github.com/
|
|
30
|
-
[
|
|
31
|
-
[forks-
|
|
32
|
-
[
|
|
33
|
-
[stars-
|
|
34
|
-
[
|
|
35
|
-
[issues-
|
|
36
|
-
[
|
|
37
|
-
[license-
|
|
51
|
+
[contributors-shield]: https://img.shields.io/github/contributors/kontent-ai/eslint-config.svg?style=for-the-badge
|
|
52
|
+
[contributors-url]: https://github.com/kontent-ai/eslint-config/graphs/contributors
|
|
53
|
+
[npm-shield]: https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge&logo=npm&logoColor=white
|
|
54
|
+
[forks-shield]: https://img.shields.io/github/forks/kontent-ai/eslint-config.svg?style=for-the-badge
|
|
55
|
+
[forks-url]: https://github.com/kontent-ai/eslint-config/network/members
|
|
56
|
+
[stars-shield]: https://img.shields.io/github/stars/kontent-ai/eslint-config.svg?style=for-the-badge
|
|
57
|
+
[stars-url]: https://github.com/kontent-ai/eslint-config/stargazers
|
|
58
|
+
[issues-shield]: https://img.shields.io/github/issues/kontent-ai/eslint-config.svg?style=for-the-badge
|
|
59
|
+
[issues-url]:https://github.com/kontent-ai/eslint-config/issues
|
|
60
|
+
[license-shield]: https://img.shields.io/github/license/kontent-ai/eslint-config.svg?style=for-the-badge
|
|
61
|
+
[license-url]:https://github.com/kontent-ai/eslint-config/blob/master/LICENSE.md
|
|
38
62
|
[discord-shield]: https://img.shields.io/discord/821885171984891914?color=%237289DA&label=Kontent.ai%20Discord&logo=discord&style=for-the-badge
|
|
39
63
|
[discord-url]: https://discord.com/invite/SKCxwPtevJ
|
package/jest.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kontent-ai/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Eslint configuration used for packages in Kontent.ai",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"private": false,
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"author": "Jiri Lojda",
|
|
9
9
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@typescript-eslint/parser": "^
|
|
11
|
+
"@typescript-eslint/parser": "^6.19.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
15
15
|
"eslint": "^8.0.0",
|
|
16
|
-
"eslint-plugin-
|
|
17
|
-
"eslint-plugin-
|
|
16
|
+
"eslint-plugin-import": "^2.29.0",
|
|
17
|
+
"eslint-plugin-jest": "^27.0.0",
|
|
18
18
|
"eslint-plugin-react": "^7.0.0",
|
|
19
19
|
"eslint-plugin-react-hooks": "^4.0.0",
|
|
20
|
-
"eslint-plugin-simple-import-sort": "^
|
|
20
|
+
"eslint-plugin-simple-import-sort": "^10.0.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/react.js
CHANGED
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
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, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
-
|
|
7
|
-
## Our Standards
|
|
8
|
-
|
|
9
|
-
Examples of behavior that contributes to creating a positive environment include:
|
|
10
|
-
|
|
11
|
-
* Using welcoming and inclusive language
|
|
12
|
-
* Being respectful of differing viewpoints and experiences
|
|
13
|
-
* Gracefully accepting constructive criticism
|
|
14
|
-
* Focusing on what is best for the community
|
|
15
|
-
* Showing empathy towards other community members
|
|
16
|
-
|
|
17
|
-
Examples of unacceptable behavior by participants include:
|
|
18
|
-
|
|
19
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
|
20
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
21
|
-
* Public or private harassment
|
|
22
|
-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
|
23
|
-
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
24
|
-
|
|
25
|
-
## Our Responsibilities
|
|
26
|
-
|
|
27
|
-
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.
|
|
28
|
-
|
|
29
|
-
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.
|
|
30
|
-
|
|
31
|
-
## Scope
|
|
32
|
-
|
|
33
|
-
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.
|
|
34
|
-
|
|
35
|
-
## Enforcement
|
|
36
|
-
|
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at devrel@kontent.ai. The project team will review and investigate all complaints, and will respond in a way that it deems 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.
|
|
38
|
-
|
|
39
|
-
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.
|
|
40
|
-
|
|
41
|
-
## Attribution
|
|
42
|
-
|
|
43
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
|
|
44
|
-
|
|
45
|
-
[homepage]: https://contributor-covenant.org
|
|
46
|
-
[version]: https://contributor-covenant.org/version/1/4/
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Ways to contribute
|
|
2
|
-
<img align="right" width="100" height="100" src="https://i.imgur.com/PYTV0jP.png">
|
|
3
|
-
|
|
4
|
-
There are many different ways in which you can contribute. One of the easiest ways is simply to use our software and provide us with your feedback through the right channel. You can also help us improve the open-source projects by submitting pull requests with code and documentation changes.
|
|
5
|
-
|
|
6
|
-
## Where to get support
|
|
7
|
-
Please note that **level of provided support is always determined by the [LICENSE](LICENSE.md)** of a given open-source project. Also, always make sure you use the **[latest version](../../releases)** of any given OS project. We can't provide any help for older versions. We don't want to make things complicated so we try to take the same approach in all our repositories.
|
|
8
|
-
|
|
9
|
-
### I found a bug in a Kontent.ai open-source project
|
|
10
|
-
<img align="right" width="100" height="100" src="https://i.imgur.com/TYIQdpv.png">
|
|
11
|
-
|
|
12
|
-
Sorry to hear that. Just log a new [GitHub issue](../../issues) and someone will take a look at it. Remember, the more information you provide, the easier it will be to fix the issue. If you feel like it, you can also fix the bug on your own and submit a new pull request.
|
|
13
|
-
|
|
14
|
-
### I need help with using the projects and/or coding
|
|
15
|
-
<img align="right" width="100" height="100" src="https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.svg">
|
|
16
|
-
|
|
17
|
-
To get help with coding and structuring your projects, use [StackOverflow](https://stackoverflow.com/) and tag your questions with [`kontent-ai`](https://stackoverflow.com/questions/tagged/kontent-ai) tag.
|
|
18
|
-
|
|
19
|
-
Our team members and the community monitor these channels on a regular basis.
|
|
20
|
-
|
|
21
|
-
### I want to report a security bug
|
|
22
|
-
<img align="right" width="100" height="100" src="https://i.imgur.com/z82nnJB.png">
|
|
23
|
-
|
|
24
|
-
Security issues and bugs should be reported privately, via email, to Kontent.ai Developer Relations Team devrel@kontent.ai. You should receive a response within 24 hours. If for some reason you do not, send us a follow up email to ensure we received your original message.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
### I have an idea for a new feature (or feedback on existing functionality)
|
|
28
|
-
<img align="right" width="100" height="100" src="https://i.imgur.com/rUFkyPy.png">
|
|
29
|
-
|
|
30
|
-
Everybody loves new features! You can submit a new [feature request](../../issues) or you can code it on your own and [send us a pull request](#submitting-pull-requests). In either case, don't forget to mention what's the use case and what's the expected output.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Submitting pull requests
|
|
34
|
-
<img align="right" width="100" height="100" src="https://i.imgur.com/aSeiliy.png">
|
|
35
|
-
|
|
36
|
-
Unless you're fixing a typo, it's usually a good idea to discuss the feature before you submit a pull request with code changes, so let's start with submitting a new [GitHub issue](../../issues) and discussing the whether it fits the vision of a given project.
|
|
37
|
-
You might also read these two blogs posts on contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. Note that all code submissions will be rigorously reviewed and tested by Kontent.ai maintainer teams, and only those that meet an high bar for both quality and design/roadmap appropriateness will be merged into the source.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### Example - process of contribution
|
|
41
|
-
If not stated otherwise, we use [feature branch workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow).
|
|
42
|
-
|
|
43
|
-
To start with coding, fork the repository you want to contribute to, create a new branch, and start coding. Once the functionality is [done](#Definition-of-Done), you can submit a [pull request](https://help.github.com/articles/about-pull-requests/).
|
|
44
|
-
|
|
45
|
-
### Definition of Done
|
|
46
|
-
<img align="right" width="100" height="100" src="https://i.imgur.com/g82Ohdv.png">
|
|
47
|
-
|
|
48
|
-
- New/fixed code is covered with tests
|
|
49
|
-
- CI can build the code
|
|
50
|
-
- All tests are pass
|
|
51
|
-
- New version number follows [semantic versioning](https://semver.org/)
|
|
52
|
-
- Coding style (spaces, indentation) is in line with the rest of the code in a given repository
|
|
53
|
-
- Documentation is updated (e.g. code examples in README, Wiki pages, etc.)
|
|
54
|
-
- All `public` members are documented (using XML doc, phpdoc, etc.)
|
|
55
|
-
- Code doesn't contain any secrets (private keys, etc.)
|
|
56
|
-
- Commit messages are clear. Please read these articles: [Writing good commit messages](https://github.com/erlang/otp/wiki/Writing-good-commit-messages), [A Note About Git Commit Messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), [On commit messages](https://who-t.blogspot.com/2009/12/on-commit-messages.html)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### Feedback
|
|
60
|
-
<img align="right" width="100" height="100" src="https://i.imgur.com/ZQfNzJJ.png">
|
|
61
|
-
|
|
62
|
-
Your pull request will now go through extensive checks by the subject matter experts on our team. Please be patient. Update your pull request according to feedback until it is approved by one of Kontent.ai maintainers. After that, one of our team members may adjust the branch you merge into based on the expected release schedule.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## Code of Conduct
|
|
66
|
-
<img align="right" width="100" height="100" src="https://i.imgur.com/cObdKQy.png">
|
|
67
|
-
|
|
68
|
-
The Kontent.ai team is committed to fostering a welcoming community, therefore this project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). If you have any additional questions or comments, you can contact us directly at devrel@kontent.ai.
|