-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate from
@git-validator/eslint-plugin-packagejson
to …
…`eslint-plugin-pkg-json`
- Loading branch information
1 parent
f23f207
commit d564959
Showing
54 changed files
with
97 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"eslint-plugin-pkg-json": minor | ||
"@git-validator/eslint-config": minor | ||
--- | ||
|
||
refactor: migrate from `@git-validator/eslint-plugin-packagejson` to `eslint-plugin-pkg-json` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# eslint-plugin-pkg-json | ||
|
||
[![](https://img.shields.io/npm/l/eslint-plugin-pkg-json.svg)](https://github.com/zanminkian/git-validator/blob/main/LICENSE) | ||
[![](https://img.shields.io/npm/v/eslint-plugin-pkg-json.svg)](https://www.npmjs.com/package/eslint-plugin-pkg-json) | ||
[![](https://img.shields.io/npm/dm/eslint-plugin-pkg-json.svg)](https://www.npmjs.com/package/eslint-plugin-pkg-json) | ||
[![](https://packagephobia.com/badge?p=eslint-plugin-pkg-json)](https://packagephobia.com/result?p=eslint-plugin-pkg-json) | ||
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com) | ||
|
||
ESLint plugin for linting `package.json` file. | ||
|
||
## Features | ||
|
||
- Lint `package.json`s. | ||
- Simple. Tiny. Fast. | ||
- Zero dependencies. | ||
|
||
## Requirement | ||
|
||
- ESLint >= 8.57.0 | ||
|
||
## Usage | ||
|
||
Install | ||
|
||
```sh | ||
pnpm add -D eslint eslint-plugin-pkg-json | ||
``` | ||
|
||
Config `eslint.config.js` | ||
|
||
```js | ||
import * as pkg from "eslint-plugin-pkg-json"; | ||
|
||
export default [ | ||
... | ||
{ | ||
files: ["**/package.json"], | ||
processor: "pkg-json/processor", | ||
plugins: { "pkg-json": pkg }, | ||
rules: { | ||
"pkg-json/no-lifecycle-script": "error", | ||
... | ||
// Visit https://github.com/zanminkian/git-validator/tree/main/packages/eslint-plugin-pkg-json/doc/rules for more other rules | ||
}, | ||
}, | ||
... | ||
]; | ||
``` | ||
|
||
Config `package.json` | ||
|
||
```json | ||
{ | ||
"scripts": { | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix" | ||
} | ||
} | ||
``` | ||
|
||
## Rules | ||
|
||
Click [here](https://github.com/zanminkian/git-validator/tree/main/packages/eslint-plugin-pkg-json/doc/rules). | ||
|
||
## License | ||
|
||
MIT |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@git-validator/eslint-plugin-packagejson", | ||
"version": "0.3.2", | ||
"description": "ESlint plugin for linting package json.", | ||
"name": "eslint-plugin-pkg-json", | ||
"version": "0.0.0", | ||
"description": "ESLint plugin for linting package.json file", | ||
"keywords": [ | ||
"eslint", | ||
"config", | ||
|
@@ -10,13 +10,14 @@ | |
"package-json", | ||
"packagejson", | ||
"package", | ||
"json" | ||
"json", | ||
"node" | ||
], | ||
"homepage": "https://github.com/zanminkian/git-validator/tree/main/packages/eslint-plugin-packagejson", | ||
"homepage": "https://github.com/zanminkian/git-validator/tree/main/packages/eslint-plugin-pkg-json", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/zanminkian/git-validator.git", | ||
"directory": "packages/eslint-plugin-packagejson" | ||
"directory": "packages/eslint-plugin-pkg-json" | ||
}, | ||
"license": "MIT", | ||
"author": "[email protected]", | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.