-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e411ffd
Showing
14 changed files
with
7,091 additions
and
0 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 @@ | ||
node_modules | ||
coverage | ||
|
||
**/*.js | ||
**/*.d.ts | ||
**/*.js.map |
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,180 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, // this is the reason this is a .js file | ||
project: ['./tsconfig.eslint.json'], | ||
}, | ||
plugins: [ | ||
'eslint-plugin-tsdoc', | ||
'eslint-plugin-import', | ||
'eslint-plugin-jest', | ||
'eslint-plugin-unused-imports' | ||
], | ||
extends: [ | ||
'es/node', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript' | ||
], | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'] | ||
}, | ||
'import/resolver': { | ||
'typescript': { | ||
'alwaysTryTypes': true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/rdf-js` | ||
}, | ||
} | ||
}, | ||
globals: { | ||
window: false, | ||
fetch: false, | ||
Headers: false, | ||
Request: false, | ||
XMLHttpRequest: false, | ||
}, | ||
rules: { | ||
// Default | ||
'class-methods-use-this': 'off', // Conflicts with functions from interfaces that sometimes don't require `this` | ||
'comma-dangle': ['error', 'always-multiline'], | ||
'dot-location': ['error', 'property'], | ||
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], | ||
'no-underscore-dangle': 'off', // Conflicts with external libraries | ||
'padding-line-between-statements': 'off', | ||
'no-param-reassign': 'off', | ||
'func-style': 'off', | ||
'new-cap': 'off', | ||
'lines-around-comment': ['error', { | ||
beforeBlockComment: false, | ||
afterBlockComment: false, | ||
beforeLineComment: false, | ||
afterLineComment: false, | ||
}], | ||
'no-multi-assign': 'off', | ||
'no-plusplus': 'off', | ||
'guard-for-in': 'off', | ||
'sort-imports': 'off', // Disabled in favor of eslint-plugin-import | ||
'prefer-named-capture-group': 'off', | ||
'max-len': ['error', { | ||
code: 120, | ||
ignoreTemplateLiterals: true, | ||
}], | ||
'unicorn/consistent-function-scoping': 'off', | ||
'no-warning-comments': 'off', | ||
'no-mixed-operators': 'off', | ||
'prefer-destructuring': 'off', | ||
'default-case': 'off', // TSC already takes care of these checks | ||
'no-loop-func': 'off', | ||
'unicorn/no-fn-reference-in-iterator': 'off', | ||
'extended/consistent-err-names': 'off', | ||
'unicorn/prefer-replace-all': 'off', | ||
'unicorn/catch-error-name': ['error', { name: 'error' }], | ||
'unicorn/no-reduce': 'off', | ||
'no-duplicate-imports': 'off', // Incompatible with type imports | ||
|
||
// TS | ||
'@typescript-eslint/lines-between-class-members': ['error', { exceptAfterSingleLine: true }], | ||
'@typescript-eslint/no-invalid-void-type': 'off', // breaks with default void in Asynchandler 2nd generic | ||
'@typescript-eslint/array-type': ['error', { default: 'array' }], | ||
'@typescript-eslint/generic-type-naming': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/no-unnecessary-condition': 'off', // Problems with optional parameters | ||
'@typescript-eslint/space-before-function-paren': ['error', 'never'], | ||
'@typescript-eslint/promise-function-async': 'off', | ||
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'angle-bracket' }], | ||
'@typescript-eslint/member-naming': 'off', | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ | ||
'selector': 'interface', | ||
'format': ['PascalCase'], | ||
'custom': { | ||
'regex': '^I[A-Z]', | ||
'match': true | ||
} | ||
} | ||
], | ||
'@typescript-eslint/no-dynamic-delete': 'off', | ||
'@typescript-eslint/explicit-function-return-type': ['error', { | ||
allowExpressions: true, | ||
allowTypedFunctionExpressions: true, | ||
allowHigherOrderFunctions: true, | ||
allowConciseArrowFunctionExpressionsStartingWithVoid: true, | ||
}], | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/prefer-nullish-coalescing': 'off', | ||
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }], | ||
|
||
// Import | ||
'import/order': ['error', { | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true | ||
} | ||
}], | ||
'import/no-unused-modules': 'off', | ||
'unused-imports/no-unused-imports-ts': 'error', | ||
'import/no-extraneous-dependencies': 'error', | ||
|
||
// TODO: Try to re-enable the following rules in the future | ||
'global-require': 'off', | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'tsdoc/syntax': 'off', | ||
'unicorn/expiring-todo-comments': 'off', | ||
'unicorn/import-style': 'off', | ||
'unicorn/prefer-array-flat': 'off', | ||
'unicorn/prefer-spread': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
// Specific rules for bin files | ||
files: ['**/bin/*.ts'], | ||
rules: { | ||
'unicorn/filename-case': ['error', { | ||
'case': 'kebabCase' | ||
}], | ||
'no-process-env': 'off', | ||
} | ||
}, | ||
{ | ||
// Specific rules for test files | ||
files: ['**/test/**/*.ts'], | ||
env: { | ||
'jest/globals': true, | ||
}, | ||
globals: { | ||
'spyOn': false, | ||
'fail': false, | ||
}, | ||
rules: { | ||
'mocha/no-synchronous-tests': 'off', | ||
'mocha/valid-test-description': 'off', | ||
'mocha/no-sibling-hooks': 'off', | ||
|
||
'max-statements-per-line': 'off', | ||
'id-length': 'off', | ||
'arrow-body-style': 'off', | ||
'line-comment-position': 'off', | ||
'no-inline-comments': 'off', | ||
'unicorn/filename-case': 'off', | ||
'no-new': 'off', | ||
'unicorn/no-nested-ternary': 'off', | ||
'no-return-assign': 'off', | ||
'no-useless-call': 'off', | ||
'no-sync': 'off', | ||
|
||
'@typescript-eslint/brace-style': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/ban-ts-ignore': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
'@typescript-eslint/no-extra-parens': 'off', | ||
'@typescript-eslint/restrict-plus-operands': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
} | ||
} | ||
], | ||
}; |
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,19 @@ | ||
node_modules | ||
lerna-debug.log | ||
yarn-error.log | ||
**/lib/**/*.js | ||
**/lib/**/*.js.map | ||
**/lib/**/*.d.ts | ||
**/test/**/*.js | ||
**/test/**/*.js.map | ||
**/test/**/*.d.ts | ||
**/bin/**/*.js | ||
**/bin/**/*.js.map | ||
**/bin/**/*.d.ts | ||
**/index.js | ||
**/index.js.map | ||
**/index.d.ts | ||
coverage | ||
documentation | ||
earl.ttl | ||
.eslintcache |
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,2 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. |
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,3 @@ | ||
Want to contribute? That's great! | ||
|
||
[Click here for the full contribution guide](https://comunica.dev/contribute/). |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright © 2021 Jesse Wright | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,65 @@ | ||
<p align="center"> | ||
<a href="https://comunica.dev/"> | ||
<img alt="Comunica" src="https://comunica.dev/img/comunica_red.svg" width="200"> | ||
</a> | ||
</p> | ||
|
||
<p align="center"> | ||
<strong>Reasoning for Comunica</strong> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://travis-ci.org/comunica/comunica-feature-reasoning"><img src="https://travis-ci.org/comunica/comunica-feature-reasoning.svg?branch=master" alt="Build Status"></a> | ||
<a href="https://coveralls.io/github/comunica/comunica-feature-reasoning?branch=master"><img src="https://coveralls.io/repos/github/comunica/comunica-feature-reasoning/badge.svg?branch=master" alt="Coverage Status"></a> | ||
<a href="https://gitter.im/comunica/Lobby"><img src="https://badges.gitter.im/comunica.png" alt="Gitter chat"></a> | ||
</p> | ||
|
||
**[Learn more about Comunica on our website](https://comunica.dev/).** | ||
|
||
:construction: This package is in early stages of development | ||
|
||
This is a monorepo that contains packages for allowing [Comunica](https://github.com/comunica/comunica) to reason over sources. | ||
|
||
<!-- If you want to _use_ an Reasoning-enabled Comunica engine, have a look at [Comunica SPARQL Reasoning](https://github.com/comunica/comunica-feature-reasoning/tree/master/packages/actor-init-sparql-reasoning). --> | ||
|
||
<!-- Concretely, this monorepo adds reasoning support to Comunica using the following packages: | ||
TODO: Write this section after developing alpha versions of packages --> | ||
|
||
**Warning: All packages in this repo should be considered unstable, and breaking changes may occur at any time.** | ||
|
||
## Development Setup | ||
|
||
_(JSDoc: https://comunica.github.io/comunica-feature-reasoning/)_ | ||
|
||
This repository should be used by Comunica module **developers** as it contains multiple Comunica modules that can be composed. | ||
This repository is managed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md) | ||
using [Lerna](https://lernajs.io/). | ||
|
||
If you want to develop new features | ||
or use the (potentially unstable) in-development version, | ||
you can set up a development environment for Comunica. | ||
|
||
Comunica requires [Node.JS](http://nodejs.org/) 8.0 or higher and the [Yarn](https://yarnpkg.com/en/) package manager. | ||
Comunica is tested on OSX, Linux and Windows. | ||
|
||
This project can be setup by cloning and installing it as follows: | ||
|
||
```bash | ||
$ git clone https://github.com/comunica/comunica-feature-reasoning.git | ||
$ cd comunica | ||
$ yarn install | ||
``` | ||
|
||
**Note: `npm install` is not supported at the moment, as this project makes use of Yarn's [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) functionality** | ||
|
||
This will install the dependencies of all modules, and bootstrap the Lerna monorepo. | ||
After that, all [Comunica packages](https://github.com/comunica/comunica-feature-reasoning/tree/master/packages) are available in the `packages/` folder | ||
and can be used in a development environment. | ||
|
||
Furthermore, this will add [pre-commit hooks](https://www.npmjs.com/package/pre-commit) | ||
to build, lint and test. | ||
These hooks can temporarily be disabled at your own risk by adding the `-n` flag to the commit command. | ||
|
||
## License | ||
©2021–present [Jesse Wright](https://github.com/jeswr) |
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,21 @@ | ||
{ | ||
"lerna": "2.4.0", | ||
"command": { | ||
"publish": { | ||
"ignoreChanges": [ | ||
"*.md" | ||
], | ||
"message": "Bump to release version %s", | ||
"allowBranch": "master", | ||
"npmClient": "npm" | ||
} | ||
}, | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"useWorkspaces": true, | ||
"version": "0.0.1", | ||
"loglevel": "success", | ||
"registry": "https://registry.npmjs.org/", | ||
"npmClient": "yarn" | ||
} |
Oops, something went wrong.