Skip to content

Commit 2cf9cfa

Browse files
committed
testing: update parser to absolute path per eslint 6 requirements
chore: bump @typescript-eslint/parser version
1 parent 519bf87 commit 2cf9cfa

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
2020
"@babel/preset-env": "^7.4.5",
2121
"@babel/register": "^7.4.4",
22-
"@typescript-eslint/parser": "^1.5.0",
22+
"@typescript-eslint/parser": "^1.10.2",
2323
"babel-eslint": "^10.0.2",
2424
"babel-plugin-add-module-exports": "^1.0.2",
2525
"babel-plugin-istanbul": "^5.1.4",

test/rules/assertions/checkParamNames.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
// After `importMeta` no longer experimental, we can use this ESM
2+
// approach over `__dirname`?
3+
// import {fileURLToPath} from 'url';
4+
// import {join, dirname} from 'path';
5+
// join(dirname(fileURLToPath(import.meta.url)), 'babel-eslint')
6+
import {join} from 'path';
7+
18
export default {
29
invalid: [
310
{
@@ -284,7 +291,7 @@ export default {
284291
constructor(private property: string) {}
285292
}
286293
`,
287-
parser: '@typescript-eslint/parser',
294+
parser: join(__dirname, '../../../node_modules', '@typescript-eslint/parser'),
288295
parserOptions: {
289296
sourceType: 'module'
290297
}

test/rules/assertions/requireParam.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ export default {
690690
constructor(private property: string) {}
691691
}
692692
`,
693-
parser: '@typescript-eslint/parser',
693+
parser: join(__dirname, '../../../node_modules', '@typescript-eslint/parser'),
694694
parserOptions: {
695695
sourceType: 'module'
696696
}

0 commit comments

Comments
 (0)