Skip to content

Commit

Permalink
Merge pull request #6 from informachadocom/main
Browse files Browse the repository at this point in the history
Fix Vulnerabilities. ESLint.
  • Loading branch information
jfmarcoux authored Jan 29, 2024
2 parents 7fe8df8 + 1267a3a commit 449d01f
Show file tree
Hide file tree
Showing 24 changed files with 3,070 additions and 6,468 deletions.
24 changes: 24 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.*

/node_modules
/test
/output
/dist
/temp
/test-*
/log
/html

Jenkinsfile
package.json
package-lock.json
tsconfig.json
yarn.lock
README.md
license

*.map
*.yaml
*.hbs
*.txt
*.js
58 changes: 58 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// ==========================================
// We use the ".js" variation of the ESLint config file because
// it allows to specify the "tsconfigRootDir" config using "__dirname"
// and this is required for the generator to format a generated project.
// ==========================================

module.exports = {
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"parserOptions": {
"project": ["./tsconfig.json"],
"tsconfigRootDir": __dirname,
"es6": true
},
"env": {
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-ternary": "off",
"@typescript-eslint/restrict-template-expressions": ["off", { "allowAny": true }],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/restrict-plus-operands" : "off",
"@typescript-eslint/no-empty-function" : "off",
"@typescript-eslint/await-thenable" : "off",
"@typescript-eslint/ban-types": [
"off",
{
"types": {
"{}": true
},
"extendDefaults": true
}
],
"no-async-promise-executor": "off",
"prefer-spread": "off",
}
}
1 change: 0 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ jobs:
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ node_modules
yarn.lock
/dist
/output
/temp

*.map
*.d.ts
*.js
!/prettier.config.js

!/.prettierrc.js
!/.eslintrc.js
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ package.json
package-lock.json
yarn.lock
Jenkinsfile
README.md
tsconfig.json
/node_modules
/test
/output
Expand All @@ -26,4 +28,4 @@ license
*.yaml
*.hbs
*.txt
/html
/html
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
"printWidth": 100,
"singleQuote": true,
}
23 changes: 23 additions & 0 deletions config/configs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as path from 'path';

/**
* Configurations for the application.
*/
class Configs {
/**
* Absolute path to the root of the project.
*/
public root: string;

/**
* Absolute path to a directory to use for tests.
*/
public dataDirPath: string;

constructor() {
this.root = path.normalize(`${__dirname}/..`);
this.dataDirPath = `${this.root}/test-data`;
}
}

export const configs: Configs = new Configs();
Loading

0 comments on commit 449d01f

Please sign in to comment.