Skip to content

Commit a229b0b

Browse files
author
Gabriel JUCHAULT
authored
refactor: use typescript library starter (#392)
switch to ava, esbuild, add automatic release, cspell, etc. BREAKING CHANGE: remove match() `withRanges` option BREAKING CHANGE: remove `sourceAccessor`, `idAccessor` to a single `iterator`, required
1 parent b0c5c58 commit a229b0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+6258
-34968
lines changed

.cspell.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"version": "0.1",
3+
"language": "en",
4+
"words": [
5+
"esbuild",
6+
"rmrf",
7+
"fuzzyjs",
8+
"socio",
9+
"octocat",
10+
"gjuchault",
11+
"ssjs",
12+
"ssjav",
13+
"yntax",
14+
"apbaca",
15+
"appbancar"
16+
],
17+
"flagWords": [],
18+
"ignorePaths": [
19+
"package.json",
20+
"package-lock.json",
21+
"yarn.lock",
22+
"tsconfig.json",
23+
"node_modules/**"
24+
]
25+
}

.czrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "./node_modules/cz-conventional-changelog"
3+
}

.editorconfig

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"es2021": true,
5+
"node": true
6+
},
7+
"parser": "@typescript-eslint/parser",
8+
"parserOptions": { "project": "./tsconfig.lint.json" },
9+
"plugins": ["import", "@typescript-eslint"],
10+
"ignorePatterns": ["scripts/*", "benchmark/*", "ava.config.js"],
11+
"extends": [
12+
"eslint:recommended",
13+
"plugin:eslint-comments/recommended",
14+
"plugin:@typescript-eslint/recommended",
15+
"plugin:import/typescript",
16+
"prettier"
17+
]
18+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1.
16+
2.
17+
3.
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Desktop (please complete the following information):**
26+
- OS: [e.g. Ubuntu 22.04, macOS 11.4]
27+
- Node version [e.g 16.4.2]
28+
- Code Version [e.g. 1.1.0]
29+
30+
**Additional context**
31+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: GitHub Discussions
4+
url: https://github.com/gjuchault/typescript-library-starter/discussions
5+
about: Please discuss non bug-related topics there
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: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Fixes #
2+
3+
## Description of the changes
4+
5+
-
6+
-
7+
-

.github/dependabot.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/fuzzyjs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: fuzzyjs
2+
3+
on: [push]
4+
5+
env:
6+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7+
8+
jobs:
9+
fuzzyjs:
10+
runs-on: ubuntu-latest
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref }}
14+
cancel-in-progress: true
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: volta-cli/action@v1
19+
- run: yarn --frozen-lockfile
20+
21+
- name: Build
22+
run: yarn build
23+
24+
- name: Format check
25+
run: yarn format:check
26+
27+
- name: Lint check
28+
run: yarn lint:check
29+
30+
- name: Spell check
31+
run: yarn spell:check
32+
33+
- name: Test
34+
run: yarn test
35+
36+
- name: Release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
run: yarn semantic-release

.gitignore

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
node_modules
2-
coverage
3-
.nyc_output
1+
build/
2+
node_modules/
3+
.nyc_output/
4+
coverage/
45
.DS_Store
5-
*.log
6-
.vscode
7-
.idea
8-
dist
9-
compiled
10-
.awcache
11-
.rpt2_cache

.npmignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.rpt2_cache
2-
coverage
3-
docs
1+
node_modules/
2+
.nyc_output/
3+
coverage/

.releaserc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"branches": [
3+
"+([0-9])?(.{+([0-9]),x}).x",
4+
"main",
5+
"master",
6+
"next",
7+
"next-major",
8+
{
9+
"name": "beta",
10+
"prerelease": true
11+
},
12+
{
13+
"name": "alpha",
14+
"prerelease": true
15+
}
16+
],
17+
"repositoryUrl": "https://github.com/gjuchault/fuzzyjs.git",
18+
"plugins": [
19+
"@semantic-release/commit-analyzer",
20+
"@semantic-release/release-notes-generator",
21+
"@semantic-release/changelog",
22+
"@semantic-release/npm",
23+
"@semantic-release/github"
24+
]
25+
}

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"eamodio.gitlens",
6+
"streetsidesoftware.code-spell-checker"
7+
]
8+
}

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// only use words from .cspell.json
3+
"cSpell.userWords": [],
4+
"cSpell.enabled": true,
5+
"editor.formatOnSave": true,
6+
"typescript.tsdk": "node_modules/typescript/lib",
7+
"typescript.enablePromptUseWorkspaceTsdk": true
8+
}

0 commit comments

Comments
 (0)