Skip to content

Commit 8c8068d

Browse files
committed
build: upgrade eslint, clean up dev env
1 parent bdadb9e commit 8c8068d

File tree

7 files changed

+1087
-579
lines changed

7 files changed

+1087
-579
lines changed

.dockerignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
.git
22
.gitignore
3+
.github
34
node_modules
45
logs/*.log
56
lib/state.json
6-
*.md
7+
*.md
8+
.eslintrc.json
9+
test
10+
.eslintignore

.eslintrc renamed to .eslintrc.json

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{
2-
"extends": "airbnb",
3-
"ignorePatterns":[
4-
"node_modules"
5-
],
2+
"extends": "airbnb-base",
3+
4+
"env": {
5+
"node": true,
6+
"mocha": true,
7+
"es6": true
8+
},
9+
610
"parserOptions": {
7-
"ecmaVersion": 2018,
11+
"ecmaVersion": 2021,
812
"sourceType": "script",
913
"ecmaFeatures": {
1014
"impliedStrict": true
1115
}
1216
},
13-
14-
"env": {
15-
"node": true,
16-
"mocha": true
17-
},
18-
17+
1918
"plugins": [
2019
"chai-friendly",
2120
"import",
@@ -90,25 +89,5 @@
9089
"node/no-deprecated-api": "warn",
9190
"no-useless-constructor": "warn",
9291
"no-return-await": "off"
93-
},
94-
"overrides": [
95-
{
96-
"plugins": ["jest"],
97-
"env": {
98-
"jest": true
99-
},
100-
"files": [
101-
"**/__tests__/**/*.[jt]s?(x)",
102-
"__mocks__/**/*.js",
103-
"**/__mocks__/**/*.js"
104-
],
105-
"rules": {
106-
"jest/no-disabled-tests": "warn",
107-
"jest/no-focused-tests": "error",
108-
"jest/no-identical-title": "error",
109-
"jest/prefer-to-have-length": "warn",
110-
"jest/valid-expect": "error"
111-
}
112-
}
113-
]
92+
}
11493
}

lib/addNewMask.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ async function updateMasks(secret) {
66
console.debug(`server address: ${serverAddress}`);
77
const url = new URL('secrets', serverAddress);
88

9+
// eslint-disable-next-line import/no-unresolved
910
const { default: httpClient } = await import('got');
1011
const response = await httpClient.post(url, {
1112
json: secret,
1213
});
13-
14+
1415
if (response.statusCode !== 201) {
1516
console.error(`could not create mask for secret: ${secret.key}, because server responded with: ${response.statusCode}\n\n${JSON.stringify(response.body)}`);
1617
process.exit(1);

lib/logger.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,11 @@ class Logger {
187187
const receivedLoggerId = _.get(container, 'Labels', _.get(container, 'Actor.Attributes'))['io.codefresh.logger.id'];
188188
const runCreationLogic = _.get(container, 'Labels', _.get(container, 'Actor.Attributes'))['io.codefresh.runCreationLogic'];
189189
const stepName = _.get(container, 'Labels', _.get(container, 'Actor.Attributes'))['io.codefresh.logger.stepName'];
190-
const receivedLogSizeLimit = _.get(container,
190+
const receivedLogSizeLimit = _.get(
191+
container,
191192
'Labels',
192-
_.get(container, 'Actor.Attributes'))['io.codefresh.logger.logSizeLimit'];
193+
_.get(container, 'Actor.Attributes')
194+
)['io.codefresh.logger.logSizeLimit'];
193195
const loggerStrategy = _.get(container, 'Labels', _.get(container, 'Actor.Attributes'))['io.codefresh.logger.strategy'];
194196

195197
if (!containerId) {

no-onlys.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424
},
2525
"devDependencies": {
2626
"chai": "^4.4.1",
27-
"eslint": "^7.32.0",
28-
"eslint-config-airbnb": "^18.2.1",
29-
"eslint-plugin-chai-friendly": "^0.6.0",
30-
"eslint-plugin-import": "^2.25.4",
31-
"eslint-plugin-jsx-a11y": "^6.5.1",
32-
"eslint-plugin-mocha": "^8.2.0",
27+
"eslint": "^8.57.0",
28+
"eslint-config-airbnb-base": "^15.0.0",
29+
"eslint-plugin-chai-friendly": "^1.0.0",
30+
"eslint-plugin-import": "^2.29.1",
31+
"eslint-plugin-jsx-a11y": "^6.9.0",
32+
"eslint-plugin-mocha": "^10.4.3",
3333
"eslint-plugin-node": "^11.1.0",
34-
"eslint-plugin-promise": "^4.3.1",
35-
"eslint-plugin-react": "^7.29.4",
34+
"eslint-plugin-promise": "^6.4.0",
3635
"isparta": "^4.1.1",
3736
"mocha": "^10.6.0",
3837
"proxyquire": "^1.8.0",

0 commit comments

Comments
 (0)