Skip to content

Commit

Permalink
- vim - Allow installing vim-plugin to any directory, instead of hard…
Browse files Browse the repository at this point in the history
…coded to ~/.vim/.
  • Loading branch information
kaizhu256 committed Mar 11, 2024
1 parent 478890a commit 6777f29
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ import moduleFs from "fs";
"type": "git",
"url": "https://github.com/jslint-org/jslint.git"
},
"version": "2024.2.1"
"version": "2024.3.1"
}, undefined, 4)
}
].map(async function ({
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
- jslint - add new warning requiring paren around plus-separated concatenations.
- jslint - try to improve parser to be able to parse jquery.js without stopping.

# v2024.2.1-beta
# v2024.3.1-beta
- vim - Allow installing vim-plugin to any directory, instead of hardcoded to ~/.vim/.
- ci - Update github-ci for actions/cache, actions/setup-python from nodejs v16 to nodejs v20.
- ci - Update shell-function shRollupFetch() to fix blank date-committed.
- ci - bugfix - Fix google-chrome unable to create screenshot because user-data-dir is /dev/null.
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ window.addEventListener("load", function () {
# Quickstart JSLint in Vim
1. Download and save [`jslint.mjs`](https://www.jslint.com/jslint.mjs), [`jslint_wrapper_vim.vim`](https://www.jslint.com/jslint_wrapper_vim.vim) to directory `~/.vim/`
2. Add vim-command `:source ~/.vim/jslint_wrapper_vim.vim` to file `~/.vimrc`
- If above files were saved to custom-directory, then use that directory instead, e.g.:
- save [`jslint.mjs`](https://www.jslint.com/jslint.mjs), [`jslint_wrapper_vim.vim`](https://www.jslint.com/jslint_wrapper_vim.vim) to directory `~/vimfiles/`
- vim-command `:source ~/vimfiles/jslint_wrapper_vim.vim`
3. Vim can now jslint files (via nodejs):
- with vim-command `:SaveAndJslint`
- with vim-key-combo `<Ctrl-S> <Ctrl-J>`
Expand Down Expand Up @@ -979,6 +982,26 @@ git push upstream beta:master
<br><br>
### pull-request merge
- find highest issue-number at https://github.com/jslint-org/jslint/issues/, and add +1 to it for PR-xxx
```shell
git push origin alpha:branch_xxx
git push upstream alpha
```
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch_xxx
- select branch to merge
- click `Create pull request`
- `Add a description` template:
```
Fixes #xxx.
- <primary-commit-message>
This PR ...
Additionally, this PR will:
- <secondary-commit-messages>
...
<screenshot>
```
- verify `commit into jslint-org:beta`
- click `Create pull request`
- verify ci-success for pull-request
Expand Down
2 changes: 1 addition & 1 deletion jslint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ let jslint_charset_ascii = (
+ "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
+ "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
);
let jslint_edition = "v2024.2.1-beta";
let jslint_edition = "v2024.3.1-beta";
let jslint_export; // The jslint object to be exported.
let jslint_fudge = 1; // Fudge starting line and starting
// ... column to 1.
Expand Down
3 changes: 2 additions & 1 deletion jslint_wrapper_vim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ function! SaveAndJslint(bang)
let &l:errorformat =
\ "%f.<node -e>.js:%n:%l:%c:%m," .
\ "%f:%n:%l:%c:%m"
let &l:makeprg = "node \"" . $HOME . "/.vim/jslint.mjs\" jslint_wrapper_vim"
let &l:makeprg = "node \"" . expand("<sfile>:p:h") . "/jslint.mjs\""
\ . " jslint_wrapper_vim"
\ . " \"" . fnamemodify(bufname("%"), ":p") . "\""
silent make! | cwindow | redraw!
endfunction
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"shCiArtifactUpload": 1,
"shCiPublishNpm": 1,
"type": "module",
"version": "2024.2.1-beta"
"version": "2024.3.1-beta"
}

0 comments on commit 6777f29

Please sign in to comment.