Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting + Formatting #193

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
env:
browser: true
es2020: true
extends:
- standard
parserOptions:
ecmaVersion: 12
ignorePatterns:
- ".build"
- "build"
- "node_modules/"
- "Vimari Extension/js/lib/**"
- "**/*.xcassets/"
rules:
semi: ["error", "always"]
quotes: ["error", "double", { "avoidEscape": true }]
space-before-function-paren:
[
"error",
{ "anonymous": "always", "named": "never", "asyncArrow": "always" },
]
comma-dangle:
[
"error",
{
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "never",
"exports": "never",
"functions": "never",
},
]
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -35,9 +35,9 @@ printf -- "- macOS version: %s\n- Safari version: %s\n- Vimari version: %s\n" "$

-->

- macOS version:
- Safari version:
- Vimari version:
- macOS version:
- Safari version:
- Vimari version:

**Additional context**
Add any other context about the problem here.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: feature request
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/js-code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: JavaScript Code Checks

on:
pull_request:
paths:
- '.github/workflows/js-code-checks.yml'
- '.eslintrc.yml'
- '.prettierigore'
- '.prettierrc.json'
- '**/*.(js|json|css|md)'

jobs:
format:
runs-on: ubuntu-latest
steps:
# Setup
- uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

# Run Prettier in linting mode.
- name: Prettier
uses: creyD/[email protected]
with:
# Report unprettified files.
prettier_options: --check **/*.js

lint:
runs-on: ubuntu-latest
steps:
# Setup
- uses: actions/checkout@v2

# Run ESLint
- name: ESLint
uses: bradennapier/[email protected]
with:
issueSummary: false
23 changes: 11 additions & 12 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
name: Node CI

on: [push]
on: pull_request

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: make all test
run: |
make all test
env:
CI: true
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: make all test
run: |
make all test
env:
CI: true
38 changes: 38 additions & 0 deletions .github/workflows/swift-code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Swift Code Checks

on:
pull_request:
paths:
- '.github/workflows/swift-code-checks.yml'
- '.swiftformat.yml'
- '.swiftlint.yml'
- '**/*.swift'

jobs:
format:
runs-on: ubuntu-latest
steps:
# Setup
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

# Run SwiftFormat in linting mode.
- name: SwiftFormat
run: swift run swiftformat --lint .

lint:
runs-on: ubuntu-latest
steps:
# Setup
- uses: actions/checkout@v2

# Use custom SwiftLint action for GitHub inline comments.
- name: SwiftLint
uses: norio-nomura/[email protected]
env:
DIFF_BASE: ${{ github.base_ref }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules/
## Build generated
build/
DerivedData/
.build/

## Various settings
xcuserdata/
Expand Down
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Ignore build artifacts
.build/
build/

# Ignore packages
node_modules/

# Ignore imported libraries
Vimari Extension/js/lib/

# Ignore any asset files
**/*.xcassets/
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 2 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--disable wrapMultilineStatementBraces
--exclude .build/
5 changes: 5 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
disabled_rules:
# Trailing comma conflicts with swift-format
- trailing_comma

excluded: .build/**
84 changes: 46 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,73 @@
Changelog
-------------
## Changelog

### Unreleased
* Remove eager link hint triggering [#190](https://github.com/televator-apps/vimari/issues/190)
* Use `window.open` for `openNewTab` action [#189](https://github.com/televator-apps/vimari/issues/189)
* Add user customisation (based on the work of @nieldm [#163](https://github.com/televator-apps/vimari/pull/163)).
* Update Vimari interface to allow users access to their configuration.
* Remove `closeTabReverse` action.
* Normal mode now isolates keybindings from the underlying website, this means that to interact with the underlying website you need to enter insert mode.
* You can enter insert mode by pressing <kbd>i</kbd> and exit the mode by pressing <kbd>esc</kbd>. Activating either mode will display the HUD.
* In insert mode Vimari keybindings are disabled (except for <kbd>esc</kbd> which brings you back to normal mode) allowing you to interact with the underlying website.
* Add `goToFirstInput` action on <kbd>g i</kbd> by default (by [isundaylee](https://github.com/isundaylee)).
* Add smooth scrolling (based on sVim implementation).

- Remove eager link hint triggering [#190](https://github.com/televator-apps/vimari/issues/190)
- Use `window.open` for `openNewTab` action [#189](https://github.com/televator-apps/vimari/issues/189)
- Add user customisation (based on the work of @nieldm [#163](https://github.com/televator-apps/vimari/pull/163)).
- Update Vimari interface to allow users access to their configuration.
- Remove `closeTabReverse` action.
- Normal mode now isolates keybindings from the underlying website, this means that to interact with the underlying website you need to enter insert mode.
- You can enter insert mode by pressing <kbd>i</kbd> and exit the mode by pressing <kbd>esc</kbd>. Activating either mode will display the HUD.
- In insert mode Vimari keybindings are disabled (except for <kbd>esc</kbd> which brings you back to normal mode) allowing you to interact with the underlying website.
- Add `goToFirstInput` action on <kbd>g i</kbd> by default (by [isundaylee](https://github.com/isundaylee)).
- Add smooth scrolling (based on sVim implementation).

### 2.0.3 (2019-09-26)

* Fix newTabHintToggle to use shift+f instead of F
* Implement forward tab and backward tab commands.
* Close tab with x is now implemented. Note that this relies on Safari's default behaviour to choose whether to switch to the left or right tab after closing the current tab.
- Fix newTabHintToggle to use shift+f instead of F
- Implement forward tab and backward tab commands.
- Close tab with x is now implemented. Note that this relies on Safari's default behaviour to choose whether to switch to the left or right tab after closing the current tab.

### 2.0.2 (2019-09-23)

* Release a signed, notarized App and Safari App Extension
* Reverse link hints, so nearby links have different hints [#77](https://github.com/televator-apps/vimari/issues/77)
* Hide non-matching link hints [#79](https://github.com/televator-apps/vimari/issues/79)
* Show state of extension in main application
- Release a signed, notarized App and Safari App Extension
- Reverse link hints, so nearby links have different hints [#77](https://github.com/televator-apps/vimari/issues/77)
- Hide non-matching link hints [#79](https://github.com/televator-apps/vimari/issues/79)
- Show state of extension in main application

### 2.0.0 (14/7/2018)
* vimari now exists as a Safari App Extension, making it compatible with Safari

- vimari now exists as a Safari App Extension, making it compatible with Safari
version 12

### 1.13.0 (16/8/2018)
* New fresh icon
* Removed shift as default modifier key
* 't' now opens new tab
* HUD now looks nicer
* Open link in new tab now works (bugfix)
* Excluded URL doesn't need to be exact anymore (bugfix)

- New fresh icon
- Removed shift as default modifier key
- 't' now opens new tab
- HUD now looks nicer
- Open link in new tab now works (bugfix)
- Excluded URL doesn't need to be exact anymore (bugfix)

### 1.2 - 1.12 skipped

### 1.1 (31/07/2011)
* Updated to work with the new version of Safari on lion
* Removed history forward / back
* Changed directory structure to make it more developer friendly

- Updated to work with the new version of Safari on lion
- Removed history forward / back
- Changed directory structure to make it more developer friendly

### 1.0 (21/11/2010)
* Changed the way vimari modifier keys work. ESC key depricated. Now use CTRL-modifierkey.

- Changed the way vimari modifier keys work. ESC key depricated. Now use CTRL-modifierkey.

### 0.4 (17/11/2010)
* First BETA release !
* Press ESC to enter a permanent state of 'non' insert mode. Clicking on any input then exits insert mode. This fixes several issues with google and facebook.

- First BETA release !
- Press ESC to enter a permanent state of 'non' insert mode. Clicking on any input then exits insert mode. This fixes several issues with google and facebook.

### 0.3 (16/11/2010)
* Moved the extension startup code to be loaded before the browser page. Events can now be intercepted before they are passed to the browser page.
* Created a manifest file, this allows automatic updates to take place.
* Added insert mode. If the selected node can accept an input, the extension is disabled. This functionality still needs some work.
* Ported the HUD from vimium. The hud displays information along the bottom of the screen. The hud has been ported but is not used for very much at the moment.

- Moved the extension startup code to be loaded before the browser page. Events can now be intercepted before they are passed to the browser page.
- Created a manifest file, this allows automatic updates to take place.
- Added insert mode. If the selected node can accept an input, the extension is disabled. This functionality still needs some work.
- Ported the HUD from vimium. The hud displays information along the bottom of the screen. The hud has been ported but is not used for very much at the moment.

### 0.2 (14/11/2010)
* Pressing ESC now removes focus from any input fields and activates modifiers

- Pressing ESC now removes focus from any input fields and activates modifiers

### 0.1 (14/11/1020)
* First alpa release of vimari. Added basic features but still very buggy.

- First alpa release of vimari. Added basic features but still very buggy.
Loading