Automattic / Automattic/harper

Flag "enter in", "enter to", and "enter into" when "enter" alone is correct.

Open
#3,319 0 comments 0 reactions 0 assignees View on GitHub
enhancement grammar harper-core linting prepositions
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

I read or heard "enter in" while working on another linter. "Enter" already means "go in".

While researching I also found "enter to", and "enter into" where the preposition is not just redundant but makes the utterance ungrammatical.

Care must be taken though because "enter into" does have one valid context, of entering into an agreement, possibly with some synonyms.

There are other potential false positives where "enter" is a noun, such as an "enter" key on a keyboard, and when the preposition is part of an idiom or set phrase following "enter" and not a mistaken phrasal verb or similar. "To" can also be part of an infinitive verb construction.

Examples:
- Count how many people **entered in** the subway station
- If the mouse **enter in** the area, and it's not hovering a link
- Also, when i **enter on** the train, control HUD is bugged and i have to right click and shift to leave the train instead of just shift.
- **Enter in** the garage from the right and doing the turn to the left.
- In order to see what is happening could you start the game and enter the race and **enter in** the car as you already tried with simhub
- This meant business owners and salarymen during Japan's economic bubble era could now **enter into** hostess clubs with their co-workers, business partners, and important clients without any legal questionability and build a costs incurred from their time spent at the hostess clubs completely legally as business expenses.

Potential false positives:
- I've managed to keep current behaviour with open & select on enter and made enter to submit only when select2 with closed dropdown is in focus.
- Shift+Enter in Claude Code inserts a newline without submitting your prompt
- An option to use Enter to type a newline and Shift+Enter to send
- No methods to use Tab instead of Enter to accept a suggestion in Jupyter LSP Code Completion?
- any value can be entered in the Flat Rate Price field
- the email address that you entered on the Office 365 Anti-Spam IP Delist Portal page

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing grammar-rule entry points and tests for redundant prepositions or similar verb-usage checks; no specific files are named in the issue. Use the listed examples to define cases that should be flagged, then verify that agreement-related “enter into,” noun uses, infinitives, keyboard references, and other valid phrases remain unflagged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.