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

New options: no file, archive and git deps #169

Merged
merged 4 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
81 changes: 81 additions & 0 deletions docs/rules/dependencies/no-archive-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
id: no-archive-dependencies
title: no-archive-dependencies
---

Enabling this rule will result in an error being generated if one of the dependencies in `dependencies` is url to archive file.

## Example .npmpackagejsonlintrc configuration

```json
{
"rules": {
"no-archive-dependencies": "error"
}
}
```

With exceptions

```json
{
"rules": {
"no-archive-dependencies": ["error", {
"exceptions": ["myModule"]
}]
}
}
```

## Rule Details

### *Incorrect* examples

```json
{
"dependencies": {
"grunt-npm-package-json-lint": "https://github.com/miripiruni/grunt-npm-package-json-lint/archive/v1.2.3.tar.gz"
}
}
```

```json
{
"dependencies": {
"grunt-npm-package-json-lint": "https://github.com/miripiruni/grunt-npm-package-json-lint/archive/v1.2.3.zip"
}
}
```


### *Correct* examples

```json
{
"dependencies": {
"gulp-npm-package-json-lint": "4.0.0"
}
}
```

```json
{
"dependencies": {
"gulp-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint"
}
}
```

## Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

```json
{
"rules": {
"no-archive-dependencies": "off"
}
}
```

## History

* Introduced in version 4.3.0
81 changes: 81 additions & 0 deletions docs/rules/dependencies/no-archive-devDependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
id: no-archive-devDependencies
title: no-archive-devDependencies
---

Enabling this rule will result in an error being generated if one of the devDependencies in `devDependencies` is url to archive file.

## Example .npmpackagejsonlintrc configuration

```json
{
"rules": {
"no-archive-devDependencies": "error"
}
}
```

With exceptions

```json
{
"rules": {
"no-archive-devDependencies": ["error", {
"exceptions": ["myModule"]
}]
}
}
```

## Rule Details

### *Incorrect* examples

```json
{
"devDependencies": {
"grunt-npm-package-json-lint": "https://github.com/miripiruni/grunt-npm-package-json-lint/archive/v1.2.3.tar.gz"
}
}
```

```json
{
"devDependencies": {
"grunt-npm-package-json-lint": "https://github.com/miripiruni/grunt-npm-package-json-lint/archive/v1.2.3.zip"
}
}
```


### *Correct* examples

```json
{
"devDependencies": {
"gulp-npm-package-json-lint": "4.0.0"
}
}
```

```json
{
"devDependencies": {
"gulp-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint"
}
}
```

## Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

```json
{
"rules": {
"no-archive-devDependencies": "off"
}
}
```

## History

* Introduced in version 4.3.0
66 changes: 66 additions & 0 deletions docs/rules/dependencies/no-file-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
id: no-file-dependencies
title: no-file-dependencies
---

Enabling this rule will result in an error being generated if one of the dependencies in `dependencies` is url to local file.

## Example .npmpackagejsonlintrc configuration

```json
{
"rules": {
"no-file-dependencies": "error"
}
}
```

With exceptions

```json
{
"rules": {
"no-file-dependencies": ["error", {
"exceptions": ["myModule"]
}]
}
}
```

## Rule Details

### *Incorrect* examples

```json
{
"dependencies": {
"my-module": "file:local-module"
}
}
```


### *Correct* examples


```json
{
"dependencies": {
"gulp-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint"
}
}
```

## Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

```json
{
"rules": {
"no-file-dependencies": "off"
}
}
```

## History

* Introduced in version 4.3.0
66 changes: 66 additions & 0 deletions docs/rules/dependencies/no-file-devDependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
id: no-file-devDependencies
title: no-file-devDependencies
---

Enabling this rule will result in an error being generated if one of the devDependencies in `devDependencies` is url to local file.

## Example .npmpackagejsonlintrc configuration

```json
{
"rules": {
"no-file-devDependencies": "error"
}
}
```

With exceptions

```json
{
"rules": {
"no-file-devDependencies": ["error", {
"exceptions": ["myModule"]
}]
}
}
```

## Rule Details

### *Incorrect* examples

```json
{
"devDependencies": {
"my-module": "file:local-module"
}
}
```


### *Correct* examples


```json
{
"devDependencies": {
"gulp-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint"
}
}
```

## Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

```json
{
"rules": {
"no-file-devDependencies": "off"
}
}
```

## History

* Introduced in version 4.3.0
Loading