Skip to content

Commit ddcd572

Browse files
committed
fix: eslint config to apply on spec folder without emitting files during compilation
1 parent 7b03f63 commit ddcd572

File tree

4 files changed

+13
-29
lines changed

4 files changed

+13
-29
lines changed

cloud/functions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Parse.Cloud.define('hello', req => {
2-
// @ts-ignore
2+
// @ts-expect-error req.log exists, but it was not added to types/parse
33
req.log.info(req);
44
return 'Hi';
55
});
66

77
Parse.Cloud.define('helloAsyncFunction', async req => {
88
await new Promise(resolve => setTimeout(resolve, 1000));
9-
// @ts-ignore
9+
// @ts-expect-error req.log exists, but it was not added to types/parse
1010
req.log.info(req);
1111
return 'Hi async';
1212
});

eslint.config.js

-26
This file was deleted.

eslint.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default tseslint.config(js.configs.recommended, ...tseslint.configs.recom
1212
sourceType: 'module',
1313
parser: tseslint.parser,
1414
parserOptions: {
15-
project: './tsconfig.json',
15+
project: ['./tsconfig.json', './spec/tsconfig.spec.json'],
1616
tsconfigRootDir: __dirname,
1717
},
1818
globals: {

spec/tsconfig.spec.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"noEmit": true
5+
},
6+
"include": [
7+
"**/*.ts"
8+
],
9+
"exclude": []
10+
}

0 commit comments

Comments
 (0)