lint: enable no-extraneous-dependencies rule

This also uses the new `import type` syntax for importing rdf-js types,
as it is required for making this new linter rule pass.

Closes #132
This commit is contained in:
Ruben Taelman 2020-09-07 08:34:15 +02:00 committed by Joachim Van Herwegen
parent 7bf4c7cb7c
commit 0ed1ae539d
7 changed files with 7 additions and 6 deletions

View File

@ -46,5 +46,6 @@ module.exports = {
} }
}], }],
'unused-imports/no-unused-imports-ts': 'error', 'unused-imports/no-unused-imports-ts': 'error',
'import/no-extraneous-dependencies': 'error'
}, },
}; };

View File

@ -1,7 +1,7 @@
/** /**
* Contains metadata relevant to a representation. * Contains metadata relevant to a representation.
*/ */
import { Quad } from 'rdf-js'; import type { Quad } from 'rdf-js';
/** /**
* Metadata corresponding to a {@link Representation}. * Metadata corresponding to a {@link Representation}.

View File

@ -2,7 +2,7 @@ import { createReadStream, createWriteStream, promises as fsPromises, Stats } fr
import { posix } from 'path'; import { posix } from 'path';
import { Readable } from 'stream'; import { Readable } from 'stream';
import { contentType as getContentTypeFromExtension } from 'mime-types'; import { contentType as getContentTypeFromExtension } from 'mime-types';
import { Quad } from 'rdf-js'; import type { Quad } from 'rdf-js';
import streamifyArray from 'streamify-array'; import streamifyArray from 'streamify-array';
import { RuntimeConfig } from '../init/RuntimeConfig'; import { RuntimeConfig } from '../init/RuntimeConfig';
import { Representation } from '../ldp/representation/Representation'; import { Representation } from '../ldp/representation/Representation';

View File

@ -1,7 +1,7 @@
import { Readable } from 'stream'; import { Readable } from 'stream';
import { defaultGraph } from '@rdfjs/data-model'; import { defaultGraph } from '@rdfjs/data-model';
import { Store } from 'n3'; import { Store } from 'n3';
import { BaseQuad } from 'rdf-js'; import type { BaseQuad } from 'rdf-js';
import { someTerms } from 'rdf-terms'; import { someTerms } from 'rdf-terms';
import { Algebra } from 'sparqlalgebrajs'; import { Algebra } from 'sparqlalgebrajs';
import { SparqlUpdatePatch } from '../../ldp/http/SparqlUpdatePatch'; import { SparqlUpdatePatch } from '../../ldp/http/SparqlUpdatePatch';

View File

@ -2,7 +2,7 @@ import { Stats } from 'fs';
import { Readable } from 'stream'; import { Readable } from 'stream';
import arrayifyStream from 'arrayify-stream'; import arrayifyStream from 'arrayify-stream';
import { DataFactory, StreamParser, StreamWriter } from 'n3'; import { DataFactory, StreamParser, StreamWriter } from 'n3';
import { NamedNode, Quad } from 'rdf-js'; import type { NamedNode, Quad } from 'rdf-js';
import streamifyArray from 'streamify-array'; import streamifyArray from 'streamify-array';
import { TEXT_TURTLE } from '../util/ContentTypes'; import { TEXT_TURTLE } from '../util/ContentTypes';
import { LDP, RDF, STAT, TERMS, XML } from './Prefixes'; import { LDP, RDF, STAT, TERMS, XML } from './Prefixes';

View File

@ -1,6 +1,6 @@
import { EventEmitter } from 'events'; import { EventEmitter } from 'events';
import { createResponse, MockResponse } from 'node-mocks-http'; import { createResponse, MockResponse } from 'node-mocks-http';
import { Quad } from 'rdf-js'; import type { Quad } from 'rdf-js';
import streamifyArray from 'streamify-array'; import streamifyArray from 'streamify-array';
import { BasicResponseWriter } from '../../../../src/ldp/http/BasicResponseWriter'; import { BasicResponseWriter } from '../../../../src/ldp/http/BasicResponseWriter';
import { ResponseDescription } from '../../../../src/ldp/operations/ResponseDescription'; import { ResponseDescription } from '../../../../src/ldp/operations/ResponseDescription';

View File

@ -1,6 +1,6 @@
import { namedNode, quad } from '@rdfjs/data-model'; import { namedNode, quad } from '@rdfjs/data-model';
import arrayifyStream from 'arrayify-stream'; import arrayifyStream from 'arrayify-stream';
import { Quad } from 'rdf-js'; import type { Quad } from 'rdf-js';
import { translate } from 'sparqlalgebrajs'; import { translate } from 'sparqlalgebrajs';
import streamifyArray from 'streamify-array'; import streamifyArray from 'streamify-array';
import { SparqlUpdatePatch } from '../../../../src/ldp/http/SparqlUpdatePatch'; import { SparqlUpdatePatch } from '../../../../src/ldp/http/SparqlUpdatePatch';