Skip to content

Commit

Permalink
Add ESLint config and build task
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoofsKelvin committed Jul 9, 2021
1 parent c383fe6 commit 4dde549
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# Ignore things like .eslintrc.js
.*

# Ignore root files like jest.config.js
/*.*

# Ignore non-source directories
node_modules/
lib/
api/
temp/
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
"plugin:@typescript-eslint/eslint-recommended",
'plugin:@typescript-eslint/recommended',
],
};
24 changes: 22 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"group": "build",
"dependsOn": [
"TypeScript - Watch",
"ESLint - Watch",
"API - Watch"
],
"isBackground": true,
Expand All @@ -23,18 +24,37 @@
"detail": "Run tsc in watch mode",
"isBackground": true
},
{
"type": "npm",
"script": "lint-watch",
"group": "build",
"problemMatcher": {
"base": "$eslint-stylish",
"background": {
"activeOnStart": false,
"beginsPattern": "\\[nodemon\\] starting",
"endsPattern": "\\[nodemon\\] (clean exit|app crashed)"
}
},
"isBackground": true,
"label": "ESLint - Watch",
"detail": "Run ESLint in watch mode"
},
{
"type": "npm",
"script": "watch-api",
"group": "build",
"problemMatcher": {
"owner": "api-extractor",
"source": "api-extractor",
"fileLocation": "absolute",
"pattern": {
"regexp": "[^\\s\\S]"
"regexp": "^(.*\\.d\\.ts):(\\d+):(\\d+)$"
},
"background": {
"activeOnStart": true,
"beginsPattern": "\\[nodemon\\] starting",
"endsPattern": "API Extractor completed"
"endsPattern": "\\[nodemon\\] (clean exit|app crashed)"
}
},
"label": "API - Watch",
Expand Down

0 comments on commit 4dde549

Please sign in to comment.