Skip to content

Commit 28e662f

Browse files
committed
feat: init source
1 parent 7fb994d commit 28e662f

File tree

9 files changed

+2893
-23
lines changed

9 files changed

+2893
-23
lines changed

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
extends: [
3+
// https://github.com/standard/eslint-config-standard
4+
'standard',
5+
6+
// https://github.com/typescript-eslint/typescript-eslint
7+
'plugin:@typescript-eslint/eslint-recommended',
8+
9+
// https://github.com/prettier/eslint-config-prettier#example-configuration
10+
'prettier',
11+
'prettier/@typescript-eslint',
12+
'prettier/standard',
13+
],
14+
15+
// https://github.com/typescript-eslint/typescript-eslint
16+
plugins: ['@typescript-eslint'],
17+
parser: '@typescript-eslint/parser',
18+
19+
rules: {
20+
// https://github.com/standard/standard#typescript
21+
'no-unused-vars': 'off',
22+
'@typescript-eslint/no-unused-vars': 'error',
23+
},
24+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: create-github-release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
create-github-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/create-release@v1
14+
env:
15+
# This token is provided by Actions, you do not need to create your own token
16+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
17+
with:
18+
tag_name: ${{github.ref}}
19+
release_name: Release ${{github.ref}}

.github/workflows/lint-source.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: lint-source
2+
3+
on: push
4+
5+
jobs:
6+
lint-source:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: 12
13+
registry-url: https://registry.npmjs.org
14+
- name: Install dependencies
15+
run: yarn
16+
- name: Check code quality
17+
run: yarn lint

.github/workflows/publish-npm.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: publish-npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
publish-npm:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
registry-url: https://registry.npmjs.org
17+
- name: Publish package
18+
run: yarn publish --access public
19+
env:
20+
# Create your own token at https://github.com/organization/repository/settings/secrets
21+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.huskyrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "yarn lint"
4+
}
5+
}

README.md

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,59 @@
11
<div align="center">
2-
<h1>repo-template</h1>
3-
<p>Boring GitHub Repository Template</p>
2+
<h1>eslint-config-typescript</h1>
3+
<p>Boring ESLint Config for TypeScript</p>
44

55
<div>
6-
<a href="https://github.com/boringcodes/repo-template/commits" aria-label="Commitizen Friendly">
6+
<a href="https://github.com/boringcodes/eslint-config-typescript/commits" aria-label="Commitizen Friendly">
77
<img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square">
88
</a>
9-
<a href="https://github.com/boringcodes/repo-template" aria-label="Prettier Code Style">
9+
<a href="https://github.com/boringcodes/eslint-config-typescript" aria-label="Prettier Code Style">
1010
<img src="https://img.shields.io/badge/code_style-prettier-brightgreen?style=flat-square">
1111
</a>
12-
<a href="https://github.com/boringcodes/repo-template/actions" aria-label="Lint Status">
13-
<img src="https://img.shields.io/github/workflow/status/boringcodes/repo-template/lint-source?style=flat-square&label=lint">
12+
<a href="https://github.com/boringcodes/eslint-config-typescript/actions" aria-label="Lint Status">
13+
<img src="https://img.shields.io/github/workflow/status/boringcodes/eslint-config-typescript/lint-source?style=flat-square&label=lint">
1414
</a>
15-
<a href="https://github.com/boringcodes/repo-template/actions" aria-label="Build Status">
16-
<img src="https://img.shields.io/github/workflow/status/boringcodes/repo-template/build-source?style=flat-square">
15+
<a href="https://david-dm.org/boringcodes/eslint-config-typescript" aria-label="Dependencies Status">
16+
<img src="https://img.shields.io/david/boringcodes/eslint-config-typescript?style=flat-square">
1717
</a>
18-
<a href="https://david-dm.org/boringcodes/repo-template" aria-label="Dependencies Status">
19-
<img src="https://img.shields.io/david/boringcodes/repo-template?style=flat-square">
18+
<a href="https://www.npmjs.com/package/@boringcodes/eslint-config-typescript" aria-label="NPM Version">
19+
<img src="https://img.shields.io/npm/v/@boringcodes/eslint-config-typescript?color=brightgreen&style=flat-square">
2020
</a>
21-
<a href="https://www.npmjs.com/package/@boringcodes/repo-template" aria-label="NPM Version">
22-
<img src="https://img.shields.io/npm/v/@boringcodes/repo-template?color=brightgreen&style=flat-square">
21+
<a href="https://www.npmjs.com/package/@boringcodes/eslint-config-typescript" aria-label="NPM Downloads">
22+
<img src="https://img.shields.io/npm/dm/@boringcodes/eslint-config-typescript?style=flat-square">
2323
</a>
24-
<a href="https://www.npmjs.com/package/@boringcodes/repo-template" aria-label="NPM Downloads">
25-
<img src="https://img.shields.io/npm/dm/@boringcodes/repo-template?style=flat-square">
26-
</a>
27-
<a href="https://github.com/boringcodes/repo-template/blob/master/LICENSE" aria-label="MIT License">
28-
<img src="https://img.shields.io/github/license/boringcodes/repo-template?color=brightgreen&style=flat-square">
24+
<a href="https://github.com/boringcodes/eslint-config-typescript/blob/master/LICENSE" aria-label="MIT License">
25+
<img src="https://img.shields.io/github/license/boringcodes/eslint-config-typescript?color=brightgreen&style=flat-square">
2926
</a>
3027
<a href="https://github.com/boringcodes" aria-label="BoringCodes Verified">
3128
<img src="https://img.shields.io/badge/boringcodes-verified-brightgreen?style=flat-square">
3229
</a>
3330
</div>
3431
</div>
3532

33+
## Features
34+
35+
- [x] Standard config
36+
- [x] TypeScript config
37+
- [x] Prettier config
38+
- [x] Prettier - Standard conflicts removed
39+
- [x] Prettier - TypeScript conflicts removed
40+
3641
## Installation
3742

38-
Use the package manager to install foobar
43+
Use the package manager to install
3944

4045
```bash
41-
yarn add foobar
46+
yarn add @boringcodes/eslint-config-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard eslint typescript --dev
4247
```
4348

4449
## Usage
4550

46-
```javascript
47-
import foobar from 'foobar';
51+
Create `.eslintrc`/`.eslintrc.json` and add the content
4852

49-
foobar();
53+
```json
54+
{
55+
"extends": ["@boringcodes/eslint-config-typescript"]
56+
}
5057
```
5158

5259
## Contributing
@@ -61,4 +68,4 @@ Please make sure to update tests as appropriate.
6168

6269
## License
6370

64-
[MIT](https://github.com/boringcodes/repo-template/blob/master/LICENSE)
71+
[MIT](https://github.com/boringcodes/eslint-config-typescript/blob/master/LICENSE)

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./.eslintrc.js');

package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@boringcodes/eslint-config-typescript",
3+
"version": "0.0.0",
4+
"description": "Boring ESLint Config for TypeScript",
5+
"homepage": "https://github.com/boringcodes/eslint-config-typescript",
6+
"bugs": "https://github.com/boringcodes/eslint-config-typescript/issues",
7+
"license": "MIT",
8+
"author": "BoringCodes <hi@boringcodes.com> (https://boringcodes.com)",
9+
"repository": "https://github.com/boringcodes/eslint-config-typescript.git",
10+
"main": "index.js",
11+
"scripts": {
12+
"purge": "rm -rf node_modules",
13+
"lint": "eslint --ignore-path .gitignore .",
14+
"release": "standard-version --no-verify",
15+
"release:major": "yarn release --release-as major",
16+
"release:minor": "yarn release --release-as minor",
17+
"release:patch": "yarn release --release-as patch"
18+
},
19+
"devDependencies": {
20+
"@typescript-eslint/eslint-plugin": "^2.25.0",
21+
"@typescript-eslint/parser": "^2.25.0",
22+
"eslint": "^6.8.0",
23+
"eslint-config-prettier": "^6.10.1",
24+
"eslint-config-standard": "^14.1.1",
25+
"eslint-plugin-import": "^2.20.1",
26+
"eslint-plugin-node": "^11.0.0",
27+
"eslint-plugin-promise": "^4.2.1",
28+
"eslint-plugin-standard": "^4.0.1",
29+
"husky": "^4.2.3",
30+
"standard-version": "^6.0.1",
31+
"typescript": "^3.8.3"
32+
},
33+
"peerDependencies": {
34+
"@typescript-eslint/eslint-plugin": "^2.25.0",
35+
"@typescript-eslint/parser": "^2.25.0",
36+
"eslint": "^6.8.0",
37+
"eslint-config-prettier": "^6.10.1",
38+
"eslint-config-standard": "^14.1.1",
39+
"eslint-plugin-import": "^2.20.1",
40+
"eslint-plugin-node": "^11.0.0",
41+
"eslint-plugin-promise": "^4.2.1",
42+
"eslint-plugin-standard": "^4.0.1",
43+
"typescript": "^3.8.3"
44+
}
45+
}

0 commit comments

Comments
 (0)