Skip to content

The naming of the eslint-plugin seems to be incorrect #92

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

Closed
jimjenkins5 opened this issue Jan 20, 2019 · 2 comments
Closed

The naming of the eslint-plugin seems to be incorrect #92

jimjenkins5 opened this issue Jan 20, 2019 · 2 comments
Labels
package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look

Comments

@jimjenkins5
Copy link

The documentation for the eslint-plugin still uses "plugins": ["typescript"] for the import staatement and "typescript/rule-name": "error" for using the rules. However, with the current package name of @typescript-eslint/eslint-plugin, this does not work.

The import statement should be "plugins": ["@typescript-eslint/eslint-plugin"] and the rule usage would be: "@typescript-eslint/rule-name": "error".

That being said, ESLint seemss to be opinionated about package naming. According to their documentation, the package should be named @typescript-eslint/eslint-plugin-typescript or something similar. (@<scope>/eslint-plugin-<plugin-name>).

Versions

package version
@typescript-eslint/eslint-plugin 0.2.1
@typescript-eslint/parser 0.2.1
typescript 0.2.1
@jimjenkins5 jimjenkins5 added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Jan 20, 2019
@armano2
Copy link
Collaborator

armano2 commented Jan 20, 2019

#91 #86

@armano2
Copy link
Collaborator

armano2 commented Jan 20, 2019

this issue got solved

@armano2 armano2 closed this as completed Jan 20, 2019
armanio123 pushed a commit to armanio123/typescript-eslint that referenced this issue Jan 24, 2019
…gle line (typescript-eslint#203)

This PR adds better handling for single line delimiters, and better enforces the `requrieLast` option.

Fixes typescript-eslint#92

## Single line delimiters

Previously single line delimiters were either checked or not. This meant that if you used
```
{
    delimiter: "none",
    ignoreSingleLine: false,
}
```
then the fixer would break your code by removing the delimiter from single line statements i.e.:
```TS
interface Foo { bar: string, baz: number }
// fixed to this broken line
interface Foo { bar: string baz: number }
```

### Breaking change:
- Removed option `ignoreSingleLine`
- Added option `singleLine: "none" | "semi" | "comma"`

`singleLine` works the same as `delimiter`, except for single line statements only.

## Stricter `requireLast`

Previously `requireLast` did nothing when turned off, and enforced having a delimiter when turned on.

I felt this was inconsistent with the goals of the linter; being a tool to provide consistent coding conventions.

This is the first of two changes to bring the option into line with eslint's [`comma-dangle`](https://eslint.org/docs/rules/comma-dangle#options). (The next change will replace the boolean with an enum; I didn't want to overload this PR).

### Breaking change:
- `requireLast: false` now enforces that there is no delimiter on the last member.
@typescript-eslint typescript-eslint locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look
Projects
None yet
Development

No branches or pull requests

2 participants