Skip to content

Commit e6667a3

Browse files
committed
feat: add new packages
- add commitlint config - add eslint config - add prettier config - add stylelint config - update documentation
1 parent 7221891 commit e6667a3

File tree

20 files changed

+786
-38
lines changed

20 files changed

+786
-38
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ Collection of shareable configurations for commonly used code quality tools. Ava
1010
- [CommitLint](https://github.com/conventional-changelog/commitlint)
1111
- [Semantic Release](https://github.com/semantic-release/github)
1212

13-
## Available flavors
13+
## Available Packages
1414

1515
| Tool | Package | Version |
1616
| ---------- | --------------------------------------------------------------------------------------- | --------------------------------------------------
17-
| Other | [@linters/semantic-release](packages/semantic-release) | [![@strv/commitlint-config][sr-badge]][sr-npm] |
17+
| Other | [@linters/semantic-release](packages/semantic-release/semantic-release) | [![@linters/semantic-release][sr-badge]][sr-npm] |
18+
| Other | [@linters/commitlint](packages/commitlint/commitlint-config) | [![@linters/commitlint-config][cl-badge]][cl-npm] |
19+
| Eslint | [@linters/eslint](packages/eslint/eslint-config) | [![@linters/eslint-config][es-badge]][es-npm] |
20+
| Stylelint | [@linters/stylelint](packages/stylelint/stylelint-config) | [![@linters/stylelint-config][sl-badge]][sl-npm] |
21+
| Prettier | [@linters/prettier](packages/prettier/prettier-config) | [![@linters/prettier-config][pr-badge]][pr-npm] |
1822

1923
## Contributing
2024
**If you don't like what you see and want to make it better**, now is your chance!
@@ -23,3 +27,15 @@ See the [contributing docs](/CONTRIBUTING.md) for more information
2327

2428
[sr-badge]: https://badge.fury.io/js/%40linters%2Fsemantic-release.svg
2529
[sr-npm]: https://badge.fury.io/js/%40linters%2Fsemantic-release
30+
31+
[cl-badge]: https://badge.fury.io/js/%40linters%commitlint-config.svg
32+
[cl-npm]: https://badge.fury.io/js/%40linters%commitlint-config
33+
34+
[es-badge]: https://badge.fury.io/js/%40linters%eslint-config.svg
35+
[es-npm]: https://badge.fury.io/js/%40linters%eslint-config
36+
37+
[sl-badge]: https://badge.fury.io/js/%40linters%eslint-config.svg
38+
[sl-npm]: https://badge.fury.io/js/%40linters%eslint-config
39+
40+
[pr-badge]: https://badge.fury.io/js/%40linters%eslint-config.svg
41+
[pr-npm]: https://badge.fury.io/js/%40linters%eslint-config

lerna.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"packages": [
3-
"packages/semantic-release/*"
3+
"packages/commitlint/*",
4+
"packages/eslint/*",
5+
"packages/prettier/*",
6+
"packages/semantic-release/*",
7+
"packages/stylelint/*"
48
],
59
"version": "independent",
610
"npmClient": "yarn",

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"semantic-release": "lerna exec --concurrency 1 -- npx --no-install semantic-release -e semantic-release-monorepo"
66
},
77
"workspaces": [
8-
"packages/semantic-release/*"
8+
"packages/commitlint/*",
9+
"packages/eslint/*",
10+
"packages/prettier/*",
11+
"packages/semantic-release/*",
12+
"packages/stylelint/*"
913
],
1014
"devDependencies": {
1115
"@linters/semantic-release": "^1.0.0",
File renamed without changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# CommitLint Config
2+
3+
[**commitlint**](https://github.com/conventional-changelog/commitlint) checks if your commit messages meet the conventional commit format.
4+
5+
## Install
6+
7+
```sh
8+
yarn add @linters/commitlint-config -D
9+
```
10+
11+
## Usage
12+
13+
This shareable config can be configured in the [**commitlint** configuration file]():
14+
15+
Create a _commitlint.config.js configuration file_ file with the following contents:
16+
17+
18+
```js
19+
module.exports = {
20+
extends: [
21+
'@linters/commitlint-config',
22+
],
23+
}
24+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
extends: [
3+
'@commitlint/config-conventional',
4+
],
5+
rules: {
6+
'body-leading-blank': [2, 'always'],
7+
},
8+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "@linters/commitlint-config",
3+
"description": "The commitlint config you have been looking for.",
4+
"version": "0.0.1",
5+
"repository": "https://github.com/developer239/linters",
6+
"engines": {
7+
"node": ">=12",
8+
"npm": ">=6"
9+
},
10+
"main": "index.js",
11+
"publishConfig": {
12+
"access": "public"
13+
},
14+
"keywords": [
15+
"commitlint",
16+
"config",
17+
"semantic-release"
18+
]
19+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2019 Code Quality Resources
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
13+
all 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
21+
THE SOFTWARE.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# ESLint Config
2+
3+
[**eslint**](https://github.com/eslint/eslint) shareable config to help you identify and report on patterns found in your code.
4+
5+
## Plugins
6+
7+
This [configuration](https://github.com/code-quality-resources/eslint-config-base/blob/master/index.js) uses the following plugins:
8+
9+
- [`eslint-plugin-import`](https://github.com/benmosher/eslint-plugin-import)
10+
- [`eslint-plugin-absolute-import`](https://github.com/mcclowes/eslint-plugin-absolute-import)
11+
- [`eslint-plugin-unused-imports`](https://github.com/sweepline/eslint-plugin-unused-imports)
12+
13+
## Install
14+
15+
```bash
16+
$ yarn add eslint eslint-plugin-import @linters/eslint-config -D
17+
```
18+
19+
## Usage
20+
21+
The shareable config can be configured in the [**eslint** configuration file](https://eslint.org/docs/user-guide/configuring):
22+
23+
Create a _.eslintrc.js_ file with the following contents:
24+
25+
```js
26+
module.exports = {
27+
extends: [
28+
'@code-quality/eslint-config'
29+
],
30+
}
31+
```

0 commit comments

Comments
 (0)