glin-profanity 0.0.1

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.
Files changed (53) hide show
  1. package/.babelrc +3 -0
  2. package/.eslintrc.json +31 -0
  3. package/.gitattributes +1 -0
  4. package/.github/workflows/dependency-review.yml +39 -0
  5. package/.github/workflows/publish.yml +31 -0
  6. package/.husky/commit-msg +5 -0
  7. package/.husky/post-commit +4 -0
  8. package/.husky/pre-commit +5 -0
  9. package/.nvmrc +1 -0
  10. package/.prettierignore +13 -0
  11. package/.prettierrc +15 -0
  12. package/CODE_OF_CONDUCT.md +80 -0
  13. package/LICENSE +21 -0
  14. package/README.md +136 -0
  15. package/SECURITY.md +14 -0
  16. package/changelog.config.cjs +89 -0
  17. package/commitlint.config.cjs +138 -0
  18. package/dist/bundle.js +2 -0
  19. package/dist/bundle.js.LICENSE.txt +9 -0
  20. package/dist/index.html +1 -0
  21. package/package.json +55 -0
  22. package/public/index.html +11 -0
  23. package/src/App.tsx +46 -0
  24. package/src/data/Norwegian.json +17 -0
  25. package/src/data/arabic.json +157 -0
  26. package/src/data/chinese.json +298 -0
  27. package/src/data/czech.json +45 -0
  28. package/src/data/danish.json +24 -0
  29. package/src/data/dictionary.ts +46 -0
  30. package/src/data/english.json +382 -0
  31. package/src/data/esperanto.json +41 -0
  32. package/src/data/finnish.json +134 -0
  33. package/src/data/french.json +99 -0
  34. package/src/data/german.json +69 -0
  35. package/src/data/hindi.json +100 -0
  36. package/src/data/hungarian.json +100 -0
  37. package/src/data/italian.json +184 -0
  38. package/src/data/japanese.json +189 -0
  39. package/src/data/korean.json +76 -0
  40. package/src/data/persian.json +49 -0
  41. package/src/data/polish.json +57 -0
  42. package/src/data/portuguese.json +78 -0
  43. package/src/data/russian.json +156 -0
  44. package/src/data/spanish.json +72 -0
  45. package/src/data/swedish.json +47 -0
  46. package/src/data/thai.json +35 -0
  47. package/src/data/turkish.json +195 -0
  48. package/src/filters/Filter.ts +58 -0
  49. package/src/hooks/useProfanityChecker.ts +22 -0
  50. package/src/index.ts +3 -0
  51. package/src/types/Language.ts +23 -0
  52. package/tsconfig.json +26 -0
  53. package/webpack.config.js +36 -0
package/.babelrc ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
3
+ }
package/.eslintrc.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "parser": "@typescript-eslint/parser",
3
+ "extends": [
4
+ "eslint:recommended",
5
+ "plugin:react/recommended",
6
+ "plugin:@typescript-eslint/recommended",
7
+ "plugin:prettier/recommended"
8
+ ],
9
+ "plugins": ["react", "@typescript-eslint"],
10
+ "env": {
11
+ "browser": true,
12
+ "node": true,
13
+ "es6": true
14
+ },
15
+ "parserOptions": {
16
+ "ecmaFeatures": {
17
+ "jsx": true
18
+ },
19
+ "ecmaVersion": 2020,
20
+ "sourceType": "module"
21
+ },
22
+ "settings": {
23
+ "react": {
24
+ "version": "detect"
25
+ }
26
+ },
27
+ "rules": {
28
+ "prettier/prettier": "error"
29
+ }
30
+ }
31
+
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ * text=auto
@@ -0,0 +1,39 @@
1
+ # Dependency Review Action
2
+ #
3
+ # This Action will scan dependency manifest files that change as part of a Pull Request,
4
+ # surfacing known-vulnerable versions of the packages declared or updated in the PR.
5
+ # Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
6
+ # packages will be blocked from merging.
7
+ #
8
+ # Source repository: https://github.com/actions/dependency-review-action
9
+ # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
10
+ name: 'Dependency review'
11
+ on:
12
+ pull_request:
13
+ branches: [ "develop" ]
14
+
15
+ # If using a dependency submission action in this workflow this permission will need to be set to:
16
+ #
17
+ # permissions:
18
+ # contents: write
19
+ #
20
+ # https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
21
+ permissions:
22
+ contents: read
23
+ # Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
24
+ pull-requests: write
25
+
26
+ jobs:
27
+ dependency-review:
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - name: 'Checkout repository'
31
+ uses: actions/checkout@v4
32
+ - name: 'Dependency Review'
33
+ uses: actions/dependency-review-action@v4
34
+ # Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
35
+ with:
36
+ comment-summary-in-pr: always
37
+ # fail-on-severity: moderate
38
+ # deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
39
+ # retry-on-snapshot-warnings: true
@@ -0,0 +1,31 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - release
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout repository
14
+ uses: actions/checkout@v2
15
+
16
+ - name: Setup Node.js
17
+ uses: actions/setup-node@v2
18
+ with:
19
+ node-version: '18'
20
+ registry-url: 'https://registry.npmjs.org'
21
+
22
+ - name: Install dependencies
23
+ run: npm install
24
+
25
+ - name: Build project
26
+ run: npm run build
27
+
28
+ - name: Publish to npm
29
+ run: npm publish
30
+ env:
31
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ npx --no -- commitlint --edit ${1}
5
+ npx --no-install commitlint --edit "$1"
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ git push
@@ -0,0 +1,5 @@
1
+
2
+ #!/usr/bin/env sh
3
+ . "$(dirname -- "$0")/_/husky.sh"
4
+
5
+ yarn lint-staged
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v18.20.1
@@ -0,0 +1,13 @@
1
+ # Files to ingore prettier to format
2
+
3
+ /dist
4
+ /build
5
+
6
+ # Eslint files
7
+ .eslintignore
8
+ .eslintrc.js
9
+
10
+ #commit files
11
+ changelog.config.js
12
+ commitlint.config.js
13
+ /.husky
package/.prettierrc ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "singleQuote": true,
3
+ "doubleQuote": true,
4
+ "useTabs": false,
5
+ "overrides": [
6
+ {
7
+ "files": "*.yaml",
8
+ "options": {
9
+ "tadWidth": 2,
10
+ "printWidth": 40,
11
+ "singleQuote": true
12
+ }
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,80 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ 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.
7
+
8
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
9
+
10
+ ## Our Standards
11
+
12
+ Examples of behavior that contributes to a positive environment for our community include:
13
+
14
+ * Demonstrating empathy and kindness toward other people
15
+ * Being respectful of differing opinions, viewpoints, and experiences
16
+ * Giving and gracefully accepting constructive feedback
17
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
18
+ * Focusing on what is best not just for us as individuals, but for the overall community
19
+
20
+ Examples of unacceptable behavior include:
21
+
22
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others’ private information, such as a physical or email address, without their explicit permission
26
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
27
+
28
+ ## Enforcement Responsibilities
29
+
30
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
31
+
32
+ Community leaders 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, and will communicate reasons for moderation decisions when appropriate.
33
+
34
+ ## Scope
35
+
36
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
37
+
38
+ ## Enforcement
39
+
40
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [support@glincker.com]. All complaints will be reviewed and investigated promptly and fairly.
41
+
42
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
43
+
44
+ ## Enforcement Guidelines
45
+
46
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
47
+
48
+ ### 1. Correction
49
+
50
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
51
+
52
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
53
+
54
+ ### 2. Warning
55
+
56
+ **Community Impact**: A violation through a single incident or series of actions.
57
+
58
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
59
+
60
+ ### 3. Temporary Ban
61
+
62
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
63
+
64
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
65
+
66
+ ### 4. Permanent Ban
67
+
68
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
69
+
70
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
71
+
72
+ ## Attribution
73
+
74
+ 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](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
75
+
76
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
77
+
78
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
79
+
80
+ [homepage]: https://www.contributor-covenant.org
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Meta Platforms, Inc. and affiliates.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # Glin Profanity
2
+ Glin-Profanity is a lightweight and efficient npm package designed to detect and filter profane language in text inputs across multiple languages. Whether you’re building a chat application, a comment section, or any platform where user-generated content is involved, Glin-Profanity helps you maintain a clean and respectful environment.
3
+
4
+ ## Installation
5
+
6
+ To install Glin-Profanity, use npm:
7
+
8
+ ```bash
9
+ npm install glin-profanity
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ### Basic Usage
15
+
16
+ Here's a simple example of how to use Glin-Profanity in a React application:
17
+
18
+ ```typescript
19
+ import React, { useState } from 'react';
20
+ import { useProfanityChecker, Language } from 'glin-profanity';
21
+
22
+ const App: React.FC = () => {
23
+ const [text, setText] = useState('');
24
+ const [checkAllLanguages, setCheckAllLanguages] = useState(false);
25
+ const { result, checkText } = useProfanityChecker(
26
+ checkAllLanguages ? { allLanguages: true } : { languages: ['english', 'french'] }
27
+ );
28
+
29
+ const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
30
+ setText(e.target.value);
31
+ };
32
+
33
+ const handleCheck = () => {
34
+ checkText(text);
35
+ };
36
+
37
+ return (
38
+ <div>
39
+ <h1>Welcome to Glin-Profanity</h1>
40
+ <input type="text" value={text} onChange={handleChange} />
41
+ <button onClick={handleCheck}>Check Profanity</button>
42
+ <div>
43
+ <label>
44
+ <input
45
+ type="checkbox"
46
+ checked={checkAllLanguages}
47
+ onChange={(e) => setCheckAllLanguages(e.target.checked)}
48
+ />
49
+ Check All Languages
50
+ </label>
51
+ </div>
52
+ {result && (
53
+ <div>
54
+ <p>Contains Profanity: {result.containsProfanity ? 'Yes' : 'No'}</p>
55
+ {result.containsProfanity && (
56
+ <p>Profane Words: {result.profaneWords.join(', ')}</p>
57
+ )}
58
+ </div>
59
+ )}
60
+ </div>
61
+ );
62
+ };
63
+
64
+ export default App;
65
+ ```
66
+
67
+ ## API
68
+
69
+ ### `Filter` Class
70
+
71
+ #### Constructor
72
+
73
+ ```typescript
74
+ new Filter(config?: { languages?: Language[]; allLanguages?: boolean });
75
+ ```
76
+
77
+ - `config`: An optional configuration object.
78
+ - `languages`: An array of languages to check for profanities.
79
+ - `allLanguages`: A boolean indicating whether to check for all languages.
80
+
81
+ #### Methods
82
+
83
+ ##### `isProfane`
84
+
85
+ Checks if a given text contains profanities.
86
+
87
+ ```typescript
88
+ isProfane(value: string): boolean;
89
+ ```
90
+
91
+ - `value`: The text to check.
92
+ - Returns: `boolean` - `true` if the text contains profanities, `false` otherwise.
93
+
94
+ ##### `checkProfanity`
95
+
96
+ Returns details about profanities found in the text.
97
+
98
+ ```typescript
99
+ checkProfanity(text: string): CheckProfanityResult;
100
+ ```
101
+
102
+ - `text`: The text to check.
103
+ - Returns: `CheckProfanityResult`
104
+ - `containsProfanity`: `boolean` - `true` if the text contains profanities, `false` otherwise.
105
+ - `profaneWords`: `string[]` - An array of profane words found in the text.
106
+
107
+ ### `useProfanityChecker` Hook
108
+
109
+ A custom React hook for using the profanity checker.
110
+
111
+ #### Parameters
112
+
113
+ - `config`: An optional configuration object.
114
+ - `languages`: An array of languages to check for profanities.
115
+ - `allLanguages`: A boolean indicating whether to check for all languages.
116
+
117
+ #### Return Value
118
+
119
+ - `result`: The result of the profanity check.
120
+ - `checkText`: A function to check a given text for profanities.
121
+
122
+ ```typescript
123
+ const { result, checkText } = useProfanityChecker(config);
124
+ ```
125
+
126
+ ## License
127
+
128
+ This software is also available under the GLINCKER LLC proprietary license. The proprietary license allows for use, modification, and distribution of the software with certain restrictions and conditions as set forth by GLINCKER LLC.
129
+
130
+ You are free to use this software for reference and educational purposes. However, any commercial use, distribution, or modification outside the terms of the MIT License requires explicit permission from GLINCKER LLC.
131
+
132
+ By using the software in any form, you agree to adhere to the terms of both the MIT License and the GLINCKER LLC proprietary license, where applicable. If there is any conflict between the terms of the MIT License and the GLINCKER LLC proprietary license, the terms of the GLINCKER LLC proprietary license shall prevail.
133
+
134
+ ### MIT License
135
+
136
+ GLIN PROFANITY is [MIT licensed](./LICENSE).
package/SECURITY.md ADDED
@@ -0,0 +1,14 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ We release patches for security vulnerabilities. Which versions are eligible for security updates?
6
+
7
+ | Version | Supported |
8
+ | ------- | ------------------ |
9
+ | 1.x | :white_check_mark: |
10
+ | < 1.0 | :x: |
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ If you discover a security vulnerability, please open an issue or contact us directly at [gdsks@glincker.com]. We take all security vulnerabilities seriously and will respond promptly to address the issue.
@@ -0,0 +1,89 @@
1
+ /* eslint-disable no-undef */
2
+ module.exports = {
3
+ disableEmoji: false,
4
+ format: '{type}{scope}: {emoji}{subject}',
5
+ list: [
6
+ 'test',
7
+ 'feat',
8
+ 'fix',
9
+ 'chore',
10
+ 'docs',
11
+ 'refactor',
12
+ 'style',
13
+ 'ci',
14
+ 'perf',
15
+ ],
16
+ maxMessageLength: 64,
17
+ minMessageLength: 3,
18
+ questions: [
19
+ 'type',
20
+ 'scope',
21
+ 'subject',
22
+ 'body',
23
+ 'breaking',
24
+ 'issues',
25
+ 'lerna',
26
+ ],
27
+ scopes: [],
28
+ types: {
29
+ chore: {
30
+ description: 'Build process or auxiliary tool changes',
31
+ emoji: '🤖',
32
+ value: 'chore',
33
+ },
34
+ ci: {
35
+ description: 'CI related changes',
36
+ emoji: '🎡',
37
+ value: 'ci',
38
+ },
39
+ docs: {
40
+ description: 'Documentation only changes',
41
+ emoji: '✏️',
42
+ value: 'docs',
43
+ },
44
+ feat: {
45
+ description: 'A new feature',
46
+ emoji: '🎸',
47
+ value: 'feat',
48
+ },
49
+ fix: {
50
+ description: 'A bug fix',
51
+ emoji: '🐛',
52
+ value: 'fix',
53
+ },
54
+ perf: {
55
+ description: 'A code change that improves performance',
56
+ emoji: '⚡️',
57
+ value: 'perf',
58
+ },
59
+ refactor: {
60
+ description: 'A code change that neither fixes a bug or adds a feature',
61
+ emoji: '💡',
62
+ value: 'refactor',
63
+ },
64
+ release: {
65
+ description: 'Create a release commit',
66
+ emoji: '🏹',
67
+ value: 'release',
68
+ },
69
+ style: {
70
+ description: 'Markup, white-space, formatting, missing semi-colons...',
71
+ emoji: '💄',
72
+ value: 'style',
73
+ },
74
+ test: {
75
+ description: 'Adding missing tests',
76
+ emoji: '💍',
77
+ value: 'test',
78
+ },
79
+ messages: {
80
+ type: "Select the type of change that you're committing:",
81
+ customScope: 'Select the scope this component affects:',
82
+ subject: 'Write a short, imperative mood description of the change:\n',
83
+ body: 'Provide a longer description of the change:\n ',
84
+ breaking: 'List any breaking changes:\n',
85
+ footer: 'Issues this commit closes, e.g #123:',
86
+ confirmCommit: 'The packages that this commit has affected\n',
87
+ },
88
+ },
89
+ };
@@ -0,0 +1,138 @@
1
+ /* eslint-disable linebreak-style */
2
+ /* eslint-disable no-undef */
3
+
4
+ module.exports = {
5
+ extends: ['@commitlint/config-conventional'],
6
+ rules: {
7
+ 'body-leading-blank': [1, 'always'],
8
+ 'body-max-line-length': [2, 'always', 100],
9
+ 'footer-leading-blank': [1, 'always'],
10
+ 'footer-max-line-length': [2, 'always', 100],
11
+ 'header-max-length': [2, 'always', 100],
12
+ 'subject-case': [
13
+ 2,
14
+ 'never',
15
+ ['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
16
+ ],
17
+ 'subject-empty': [2, 'never'],
18
+ 'subject-full-stop': [2, 'never', '.'],
19
+ 'type-case': [2, 'always', 'lower-case'],
20
+ 'type-empty': [2, 'never'],
21
+ 'type-enum': [
22
+ 2,
23
+ 'always',
24
+ [
25
+ 'build',
26
+ 'chore',
27
+ 'ci',
28
+ 'docs',
29
+ 'feat',
30
+ 'fix',
31
+ 'perf',
32
+ 'refactor',
33
+ 'revert',
34
+ 'style',
35
+ 'test',
36
+ ],
37
+ ],
38
+ },
39
+ prompt: {
40
+ questions: {
41
+ type: {
42
+ description: "Select the type of change that you're committing",
43
+ enum: {
44
+ feat: {
45
+ description: 'A new feature',
46
+ title: 'Features',
47
+ emoji: '✨',
48
+ },
49
+ fix: {
50
+ description: 'A bug fix',
51
+ title: 'Bug Fixes',
52
+ emoji: '🐛',
53
+ },
54
+ docs: {
55
+ description: 'Documentation only changes',
56
+ title: 'Documentation',
57
+ emoji: '📚',
58
+ },
59
+ style: {
60
+ description:
61
+ 'Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)',
62
+ title: 'Styles',
63
+ emoji: '💎',
64
+ },
65
+ refactor: {
66
+ description:
67
+ 'A code change that neither fixes a bug nor adds a feature',
68
+ title: 'Code Refactoring',
69
+ emoji: '📦',
70
+ },
71
+ perf: {
72
+ description: 'A code change that improves performance',
73
+ title: 'Performance Improvements',
74
+ emoji: '🚀',
75
+ },
76
+ test: {
77
+ description: 'Adding missing tests or correcting existing tests',
78
+ title: 'Tests',
79
+ emoji: '🚨',
80
+ },
81
+ build: {
82
+ description:
83
+ 'Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)',
84
+ title: 'Builds',
85
+ emoji: '🛠',
86
+ },
87
+ ci: {
88
+ description:
89
+ 'Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)',
90
+ title: 'Continuous Integrations',
91
+ emoji: '⚙️',
92
+ },
93
+ chore: {
94
+ description: "Other changes that don't modify src or test files",
95
+ title: 'Chores',
96
+ emoji: '♻️',
97
+ },
98
+ revert: {
99
+ description: 'Reverts a previous commit',
100
+ title: 'Reverts',
101
+ emoji: '🗑',
102
+ },
103
+ },
104
+ },
105
+ scope: {
106
+ description:
107
+ 'What is the scope of this change (e.g. component or file name)',
108
+ },
109
+ subject: {
110
+ description:
111
+ 'Write a short, imperative tense description of the change',
112
+ },
113
+ body: {
114
+ description: 'Provide a longer description of the change',
115
+ },
116
+ isBreaking: {
117
+ description: 'Are there any breaking changes?',
118
+ },
119
+ breakingBody: {
120
+ description:
121
+ 'A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself',
122
+ },
123
+ breaking: {
124
+ description: 'Describe the breaking changes',
125
+ },
126
+ isIssueAffected: {
127
+ description: 'Does this change affect any open issues?',
128
+ },
129
+ issuesBody: {
130
+ description:
131
+ 'If issues are closed, the commit requires a body. Please enter a longer description of the commit itself',
132
+ },
133
+ issues: {
134
+ description: 'Add issue references (e.g. "fix #123", "re #123".)',
135
+ },
136
+ },
137
+ },
138
+ };