Skip to content

Commit 905b8ae

Browse files
feat: setup porject
1 parent 0358712 commit 905b8ae

23 files changed

+538
-44
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ indent_size = 4
1818

1919
[*.{yaml,yml,json,jsonc}]
2020
indent_size = 2
21+
max_line_length = unset

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @AlejandroSuero

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Bug Report
2-
description: Report a problem with your_plugin.nvim
2+
description: Report a problem with pretty-ts-errors.nvim
33
title: "[Bug]: "
44
labels:
55
- bug
@@ -11,7 +11,7 @@ body:
1111
# Before reporting
1212
1313
- Confirm that the problem is reproducible.
14-
- Try using the [minimal reproduction template](https://github.com/your_github_user/your_plugin.nvim/blob/main/contrib/minimal.lua).
14+
- Try using the [minimal reproduction template](https://github.com/AlejandroSuero/pretty-ts-errors.nvim/blob/main/contrib/minimal.lua).
1515
1616
- type: checkboxes
1717
id: pre-requisites
@@ -35,8 +35,8 @@ body:
3535
- type: textarea
3636
id: nvim-version
3737
attributes:
38-
label: NeoVim version
39-
description: Paste here your NeoVim version, `nvim --version`.
38+
label: Neovim version
39+
description: Paste here your Neovim version, `nvim --version`.
4040
placeholder: |
4141
NVIM v0.10.0
4242
Build type: RelWithDebInfo
@@ -119,9 +119,9 @@ body:
119119
120120
require("lazy").setup({
121121
{
122-
"your_github_user/your_plugin.nvim",
122+
"AlejandroSuero/pretty-ts-errors.nvim",
123123
config = function()
124-
require("your_plugin").setup()
124+
require("pretty-ts-errors").setup()
125125
end,
126126
lazy = false,
127127
enabled = true,

.github/workflows/commitlint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: commitlint
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
lint-commits:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
fetch-depth: 0
12+
- run: npm install --save-dev @commitlint/{cli,config-conventional}
13+
- run: |
14+
echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
15+
- run: npx commitlint --from HEAD~1 --to HEAD --verbose

.github/workflows/docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
paths:
6+
- "README.md"
7+
pull_request:
8+
paths:
9+
- "README.md"
10+
11+
jobs:
12+
docs:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
actions: write
16+
contents: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Create doc directory if it doesn't exist
20+
shell: bash
21+
run: mkdir -p doc
22+
- uses: actions/checkout@v4
23+
- name: Generating docs with panvimdoc
24+
uses: kdheepak/panvimdoc@main
25+
with:
26+
vimdoc: freeze-code.nvim
27+
version: "Neovim >= 0.9.0"
28+
demojify: true
29+
treesitter: true
30+
- name: Update documentation
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
COMMIT_MSG: |
34+
docs: update `doc/pretty-ts-errors.txt`
35+
skip-checks: true
36+
run: |
37+
git config user.email "github-actions[bot]@users.noreply.github.com"
38+
git config user.name "github-actions[bot]"
39+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
40+
git add doc/
41+
# Only commit and push if we have changes
42+
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})

.github/workflows/lint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,14 @@ jobs:
3333
token: ${{ secrets.GITHUB_TOKEN }}
3434
version: latest
3535
args: --check .
36+
37+
codespell:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Install codespell
42+
run: |
43+
pip install codespell
44+
- name: Run codespell
45+
run: |
46+
make spell

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "release"
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
jobs:
7+
luarocks-upload:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: LuaRocks Upload
12+
uses: nvim-neorocks/luarocks-tag-release@v7
13+
env:
14+
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
15+
with:
16+
summary: "Pretty TS Errors for NeoVim"
17+
detailed_description: |
18+
Makes your TypeScript errors pretty and readable.
19+
template: "./rockspec.template"

.github/workflows/test.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,23 @@ jobs:
3131
export PATH="${PWD}/_neovim/bin:${PATH}"
3232
export VIM="${PWD}/_neovim/share/nvim/runtime"
3333
nvim --version
34-
make test
34+
nvim --headless --noplugin -u tests/minimal_init.lua -c "PlenaryBustedDirectory tests/pretty-ts-errors { minimal_init = './tests/minimal_init.lua'}"
35+
36+
- uses: actions/checkout@v4
37+
- name: Install LuaJIT
38+
uses: leafo/gh-actions-luajit@v10
39+
with:
40+
luaVersion: "luajit-2.1.0-beta3"
41+
- name: Install luarocks
42+
uses: leafo/gh-actions-luarocks@v4
43+
44+
- name: Install vusted
45+
shell: bash
46+
run: luarocks install vusted
47+
48+
- name: Run tests
49+
shell: bash
50+
run: |
51+
export PATH="${PWD}/_neovim/bin:${PATH}"
52+
export VIM="${PWD}/_neovim/share/nvim/runtime"
53+
vusted --output=gtest tests/pretty-ts-errors

.luarc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
33
"diagnostics": {
44
"unusedLocalExclude": ["_*"]
5-
}
5+
},
6+
"workspace.checkThirdParty": "false"
67
}

.markdownlint.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"default": true,
3+
"MD033": false,
4+
"MD052": false,
5+
"MD041": false,
6+
"MD004": {
7+
"style": "dash"
8+
},
9+
"MD046": {
10+
"style": "fenced"
11+
},
12+
"MD030": {
13+
"ul_single": 1,
14+
"ol_single": 1,
15+
"ul_multi": 1,
16+
"ol_multi": 1
17+
}
18+
}

0 commit comments

Comments
 (0)