Skip to content

Commit

Permalink
Initial configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimvh committed May 15, 2020
0 parents commit b949b6c
Show file tree
Hide file tree
Showing 10 changed files with 5,739 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .eslintignore
@@ -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 changes: 24 additions & 0 deletions .eslintrc.js
@@ -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 changes: 10 additions & 0 deletions .gitignore
@@ -0,0 +1,10 @@
.idea
node_modules
coverage

*.js
*.js.map
*.d.ts

!.eslintrc.js
!jest.config.js
5 changes: 5 additions & 0 deletions .prettierrc
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"singleQuote": true,
"trailingComma": "all"
}
11 changes: 11 additions & 0 deletions .travis.yml
@@ -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 changes: 24 additions & 0 deletions jest.config.js
@@ -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/"
]
};

0 comments on commit b949b6c

Please sign in to comment.