Skip to content

Commit

Permalink
🚚 Rename plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
reckter committed Nov 24, 2021
1 parent 04ac715 commit 44eb84d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @opencreek/eslint-plugin
# @opencreek/eslint-plugin-ts

Disalows relative path across the baseUrl of your tsconfig

Expand All @@ -10,23 +10,23 @@ You'll first need to install [ESLint](https://eslint.org/):
npm i eslint --save-dev
```

Next, install `eslint-plugin-no-relative-base-url-imports`:
Next, install `@opencreek/eslint-plugin-ts`:

```sh
npm install @opencreek/eslint-plugin --save-dev
npm install @opencreek/eslint-plugin-ts --save-dev
```

```sh
yarn add --dev @opencreek/eslint-plugin
yarn add --dev @opencreek/eslint-plugin-ts
```

## Usage

Add `@opencreek` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
Add `@opencreek/ts` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
"plugins": ["@opencreek"]
"plugins": ["@opencreek/ts"]
}
```

Expand All @@ -35,7 +35,7 @@ Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"@opencreek/no-relative-imports": [
"@opencreek/ts/no-relative-imports": [
"error",
{
"baseUrl": "./src"
Expand All @@ -47,7 +47,7 @@ Then configure the rules you want to use under the rules section.

## Supported Rules

### `@opencreek/no-relative-imports` Disable relative imports.
### `@opencreek/ts/no-relative-imports` Disable relative imports.

Config options

Expand Down
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const rules = {
export const configs = {
recommended: {
rules: {
"@opencreek/no-relative-imports": "error",
"@opencreek/ts/no-relative-imports": "error",
},
},
}
1 change: 1 addition & 0 deletions lib/rules/no-relative-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type Options = {
baseUrl?: string
allowLocalImports?: "inside-base-path" | "local"
}[]

export type MessageIds = "no-relative-import"
export default creator<Options, MessageIds>({
name: "no-relative-imports",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@opencreek/eslint-plugin",
"name": "@opencreek/eslint-plugin-ts",
"version": "0.2.0",
"description": "Disallows relative path across the baseUrl of your tsconfig",
"type": "module",
Expand All @@ -13,7 +13,7 @@
"build/**"
],
"author": "Opencreek Technology<oss@opencreek.tech>",
"repository": "https://github.com/opencreek/eslint-plugin",
"repository": "https://github.com/opencreek/eslint-plugin-ts",
"license": "MIT",
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down

0 comments on commit 44eb84d

Please sign in to comment.