mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: support inrupt coding standards
This commit is contained in:
parent
5def53180c
commit
f8e136cadb
@ -6,21 +6,16 @@ module.exports = {
|
|||||||
project: ['./tsconfig.json'],
|
project: ['./tsconfig.json'],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
'@typescript-eslint',
|
|
||||||
'prettier',
|
'prettier',
|
||||||
'eslint-plugin-tsdoc',
|
'eslint-plugin-tsdoc',
|
||||||
],
|
],
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
'es/node',
|
||||||
'plugin:@typescript-eslint/eslint-recommended',
|
|
||||||
'plugin:@typescript-eslint/recommended',
|
|
||||||
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
||||||
'prettier', // disables rules from the above that conflict with prettier
|
'prettier', // disables rules from the above that conflict with prettier
|
||||||
'plugin:prettier/recommended', // adds prettier rules
|
'plugin:prettier/recommended', // adds prettier rules
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
'@typescript-eslint/no-empty-interface': 'off',
|
'@typescript-eslint/no-empty-interface': 'off',
|
||||||
'prettier/prettier': 'error',
|
|
||||||
"sort-imports": "error",
|
"sort-imports": "error",
|
||||||
'tsdoc/syntax': 'error',
|
'tsdoc/syntax': 'error',
|
||||||
},
|
},
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,4 +7,5 @@ coverage
|
|||||||
*.d.ts
|
*.d.ts
|
||||||
|
|
||||||
!.eslintrc.js
|
!.eslintrc.js
|
||||||
|
!test/eslintrc.js
|
||||||
!jest.config.js
|
!jest.config.js
|
||||||
|
1289
package-lock.json
generated
1289
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@ -7,9 +7,19 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"prepare": "npm run lint && npm run build",
|
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "npm run lint && npm run build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"index.d.ts",
|
||||||
|
"src/**/*.js",
|
||||||
|
"src/**/*.d.ts"
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rdfjs/data-model": "^1.1.2",
|
"@rdfjs/data-model": "^1.1.2",
|
||||||
"@types/jest": "^25.2.1",
|
"@types/jest": "^25.2.1",
|
||||||
@ -20,11 +30,12 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
||||||
"@typescript-eslint/parser": "^2.33.0",
|
"@typescript-eslint/parser": "^2.33.0",
|
||||||
"eslint": "^7.0.0",
|
"eslint": "^7.0.0",
|
||||||
|
"eslint-config-es": "^3.19.61",
|
||||||
"eslint-config-prettier": "^6.11.0",
|
"eslint-config-prettier": "^6.11.0",
|
||||||
"eslint-plugin-prettier": "^3.1.3",
|
"eslint-plugin-prettier": "^3.1.3",
|
||||||
"eslint-plugin-tsdoc": "^0.2.4",
|
"eslint-plugin-tsdoc": "^0.2.4",
|
||||||
|
"husky": "^4.2.5",
|
||||||
"jest": "^26.0.1",
|
"jest": "^26.0.1",
|
||||||
"pre-commit": "^1.2.2",
|
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"ts-jest": "^25.5.1",
|
"ts-jest": "^25.5.1",
|
||||||
"typescript": "^3.9.2"
|
"typescript": "^3.9.2"
|
||||||
|
5
test/.eslintrc.js
Normal file
5
test/.eslintrc.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
jest: true
|
||||||
|
}
|
||||||
|
};
|
@ -1,5 +1,5 @@
|
|||||||
describe('A basic test', () => {
|
describe('A basic test', (): void => {
|
||||||
it('to have something pass', () => {
|
it('to have something pass.', async (): Promise<void> => {
|
||||||
expect(true).toBeTruthy();
|
expect(true).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -10,10 +10,11 @@
|
|||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"preserveConstEnums": true,
|
"preserveConstEnums": true,
|
||||||
"sourceMap": true
|
"sourceMap": true,
|
||||||
|
"stripInternal": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"lib/**/*.ts",
|
"src/**/*.ts",
|
||||||
"test/**/*.ts"
|
"test/**/*.ts"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user