Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#IC-500, #IOCIT-21] migration from ts-lint to eslint #55

Merged
merged 10 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"ignorePatterns": [
"node_modules",
"e2e",
"generated",
"**/__tests__/*",
"**/__mocks__/*",
"Dangerfile.*",
"*.d.ts"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"extends": [
"@pagopa/eslint-config/strong",
],
"rules": {

}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ idp.crt
idp.key
sp_metadata.xml
temp
yarn-error.log
yarn-error.log
# eslint section
!.eslintrc.js
.eslintcache
2 changes: 1 addition & 1 deletion Dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// import custom DangerJS rules
// see http://danger.systems/js
// see https://github.com/teamdigitale/danger-plugin-digitalcitizenship/
// tslint:disable-next-line:prettier
// eslint-disable-next-line prettier/prettier
import checkDangers from "danger-plugin-digitalcitizenship";

checkDangers();
1 change: 1 addition & 0 deletions e2e/scenarios/basic/env.scenario
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ COMPANY_VAT_NUMBER=12312312311


ENABLE_SPID_ACCESS_LOGS=false
CIE_URL=https://preproduzione.idserver.servizicie.interno.gov.it/idp/shibboleth?Metadata
NODE_TLS_REJECT_UNAUTHORIZED=0
2 changes: 1 addition & 1 deletion e2e/scenarios/basic/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jest.setTimeout(1e6);

beforeAll(async () => {
// somehow we need to wait idp metadata are loaded
await delay(bigTime * 4);
await delay(bigTime * 5);
});
describe("Basic", () => {
it("should login with an existing user", () =>
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@
"predeploy": "npm-run-all build dist:modules",
"test": "jest -i",
"test:coverage": "jest -i --coverage",
"lint": "tslint --project ."
"lint": "eslint . -c .eslintrc.js --ext .ts,.tsx"
},
"devDependencies": {
"@pagopa/eslint-config": "^1.3.1",
"@pagopa/openapi-codegen-ts": "^10.0.6",
"@types/cors": "^2.8.12",
"@types/express": "4.17.0",
"@types/jest": "^24.0.13",
"@types/jsonwebtoken": "7.2.7",
"@types/jsonwebtoken": "8.5.4",
balanza marked this conversation as resolved.
Show resolved Hide resolved
"@types/node": "10.14.1",
"@types/node-fetch": "^2.1.2",
"@types/node-forge": "^0.9.1",
Expand All @@ -52,7 +53,7 @@
"auto-changelog": "^2.2.1",
"danger": "^7.0.0",
"danger-plugin-digitalcitizenship": "^1.0.0",
"italia-tslint-rules": "*",
"eslint-plugin-prettier": "^3.0.0",
"jest": "^24.8.0",
"mock-redis-client": "^0.91.13",
"modclean": "^3.0.0-beta.1",
Expand All @@ -63,7 +64,6 @@
"shx": "^0.3.2",
"supertest": "^4.0.2",
"ts-jest": "^24.0.2",
"tslint": "^5.1.0",
"typescript": "4.3"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions src/__mocks__/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// tslint:disable:no-any

/**
* mockReq
* @returns {{header, accepts, acceptsEncodings, acceptsEncoding, acceptsCharsets, acceptsCharset, acceptsLanguages, acceptsLanguage, range, param, is, reset: resetMock}}
Expand Down