mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
Initial configuration
This commit is contained in:
commit
b949b6cf5e
9
.eslintignore
Normal file
9
.eslintignore
Normal file
@ -0,0 +1,9 @@
|
||||
# don't ever lint node_modules
|
||||
node_modules
|
||||
# don't lint nyc coverage output
|
||||
coverage
|
||||
|
||||
# ignore generated files
|
||||
**/*.js
|
||||
**/*.d.ts
|
||||
**/*.js.map
|
24
.eslintrc.js
Normal file
24
.eslintrc.js
Normal file
@ -0,0 +1,24 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname, // this is the reason this is a .js file
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
plugins: [
|
||||
'@typescript-eslint',
|
||||
'prettier',
|
||||
],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'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
|
||||
'plugin:prettier/recommended', // adds prettier rules
|
||||
],
|
||||
rules: {
|
||||
'@typescript-eslint/no-empty-interface': 'off',
|
||||
'prettier/prettier': 'error',
|
||||
},
|
||||
};
|
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
.idea
|
||||
node_modules
|
||||
coverage
|
||||
|
||||
*.js
|
||||
*.js.map
|
||||
*.d.ts
|
||||
|
||||
!.eslintrc.js
|
||||
!jest.config.js
|
5
.prettierrc
Normal file
5
.prettierrc
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"printWidth": 120,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
11
.travis.yml
Normal file
11
.travis.yml
Normal file
@ -0,0 +1,11 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "10"
|
||||
- "12"
|
||||
- "14"
|
||||
- "node"
|
||||
script:
|
||||
- npm run build
|
||||
- npm run lint
|
||||
- npm run test
|
||||
cache: npm
|
24
jest.config.js
Normal file
24
jest.config.js
Normal file
@ -0,0 +1,24 @@
|
||||
module.exports = {
|
||||
"globals": {
|
||||
"ts-jest": {
|
||||
"tsConfig": "tsconfig.json"
|
||||
}
|
||||
},
|
||||
"transform": {
|
||||
"^.+\\.ts$": "ts-jest"
|
||||
},
|
||||
"testRegex": "/test/.*\\.ts$",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"js"
|
||||
],
|
||||
"testEnvironment": "node",
|
||||
"collectCoverage": true,
|
||||
// either we don't build the test files (but then eslint needs a separate tsconfig) or we do this
|
||||
"testPathIgnorePatterns": [
|
||||
".*\\.d\\.ts"
|
||||
],
|
||||
"coveragePathIgnorePatterns": [
|
||||
"/node_modules/"
|
||||
]
|
||||
};
|
5603
package-lock.json
generated
Normal file
5603
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
27
package.json
Normal file
27
package.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "open-solid-server",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"prepare": "npm run lint && npm run build",
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.2.1",
|
||||
"@types/node": "^14.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
||||
"@typescript-eslint/parser": "^2.33.0",
|
||||
"eslint": "^7.0.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-prettier": "^3.1.3",
|
||||
"jest": "^26.0.1",
|
||||
"pre-commit": "^1.2.2",
|
||||
"prettier": "^2.0.5",
|
||||
"ts-jest": "^25.5.1",
|
||||
"typescript": "^3.9.2"
|
||||
}
|
||||
}
|
5
test/index.ts
Normal file
5
test/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
describe('A basic test', () => {
|
||||
it('to have something pass', () => {
|
||||
expect(true).toBeTruthy();
|
||||
});
|
||||
});
|
21
tsconfig.json
Normal file
21
tsconfig.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2017",
|
||||
"newLine": "lf",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"declaration": true
|
||||
},
|
||||
"include": [
|
||||
"lib/**/*.ts",
|
||||
"test/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user