Skip to content

Commit

Permalink
Set up ESLint for post service.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoliy Serputov committed Mar 17, 2022
1 parent 80cee90 commit d2de2d6
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 44 deletions.
98 changes: 55 additions & 43 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions src/api/posts/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
extends: '@senecacdot/eslint-config-telescope',

overrides: [
{
files: ['./**/*.js'],
env: {
jest: true,
commonjs: true,
es2021: true,
node: true,
},
},
],
rules: {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error', { hoist: 'all' }],
},
};
7 changes: 6 additions & 1 deletion src/api/posts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"private": true,
"description": "A service for retrieving posts",
"scripts": {
"start": "node src/server.js"
"start": "node src/server.js",
"lint": "pnpm eslint",
"eslint": "eslint --config .eslintrc.js \"**/*.js\"",
"eslint-fix": "eslint --config .eslintrc.js \"**/*.js\" --fix"
},
"repository": "Seneca-CDOT/telescope",
"license": "BSD-2-Clause",
Expand All @@ -25,6 +28,8 @@
"normalize-url": "6.1.0"
},
"devDependencies": {
"@senecacdot/eslint-config-telescope": "workspace:1.0.0",
"eslint": "7.32.0",
"supertest": "6.1.6"
}
}

0 comments on commit d2de2d6

Please sign in to comment.