Skip to content

Commit dc98569

Browse files
nuria-flismanapa
andauthored
style: replace tslint with eslint (#6)
* chore: add eslint and eslint-config-codely * style: autofix issues * style: some manual fixes * style: some manual fixes * refacotor: change some TypeScript types * fix: move baseUrl inside compilerOptions --------- Co-authored-by: Isma Navarro <[email protected]>
1 parent 3856c1f commit dc98569

File tree

25 files changed

+7698
-3820
lines changed

25 files changed

+7698
-3820
lines changed

.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
extends: ['eslint-config-codely/typescript'],
3+
rules: {
4+
'no-console': 'warn'
5+
},
6+
overrides: [
7+
{
8+
files: ['*.ts', '*.tsx'],
9+
parserOptions: {
10+
project: ['./tsconfig.json']
11+
},
12+
rules: {
13+
'@typescript-eslint/no-floating-promises': 'warn'
14+
}
15+
}
16+
]
17+
};

.github/workflows/nodejs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ jobs:
1818
- name: npm install
1919
run: |
2020
npm install
21+
- name: npm run lint
22+
run: |
23+
npm run lint
2124
- name: npm run build
2225
run: |
2326
npm run build --if-present
24-
npm run lint
2527
- name: npm test
2628
run: |
2729
npm test

cucumber.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
/* eslint-disable camelcase */
12
const common = [
2-
'--require-module ts-node/register' // Load TypeScript module
3+
'--require-module ts-node/register' // Load TypeScript module
34
];
45

56
const mooc_backend = [
6-
...common,
7-
'tests/apps/mooc/backend/features/**/*.feature',
8-
'--require tests/apps/mooc/backend/features/step_definitions/*.steps.ts'
7+
...common,
8+
'tests/apps/mooc/backend/features/**/*.feature',
9+
'--require tests/apps/mooc/backend/features/step_definitions/*.steps.ts'
910
].join(' ');
1011

1112
module.exports = {
12-
mooc_backend
13+
mooc_backend
1314
};

jest.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
preset: 'ts-jest',
3-
testEnvironment: 'node',
4-
cacheDirectory: '.tmp/jestCache'
2+
preset: 'ts-jest',
3+
testEnvironment: 'node',
4+
cacheDirectory: '.tmp/jestCache'
55
};

0 commit comments

Comments
 (0)