Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tpluscode/eslint-plugin-rdf


https://github.com/tpluscode/eslint-plugin-rdf

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# eslint-plugin-rdf

Linting rules for RDF/JS projects.

## Installation

1. Install
```shell
npm install --save-dev eslint-plugin-rdf
```

2. Edit `.eslintrc`
```json
{
"extends": [
"plugin:rdf/recommended"
],
"plugins": [
"rdf"
]
}
```

## Rules

### `rdf/ban-rdf-js`

🔧 This rule is automatically fixable by the [`--fix` CLI option][fix].

The `rdf-js` package is deprecated. Its usages should be replaced with `@rdfjs/types`.

#### Fail

```ts
import { DataFactory } from 'rdf-js'
import type { NamedNode } from 'rdf-js'
import * as RDF from 'rdf-js'
```

#### Pass

```ts
import { DataFactory } from '@rdfjs/types'
import type { NamedNode } from '@rdfjs/types'
import * as RDF from '@rdfjs/types'
```

#### Options

This rule has no options.

[fix]: https://eslint.org/docs/latest/user-guide/command-line-interface#--fix