Skip to content

Instantly share code, notes, and snippets.

@nickbclifford
Last active July 18, 2020 19:35
Show Gist options
  • Save nickbclifford/a886e1c9013a8f0971cce7642d1e7979 to your computer and use it in GitHub Desktop.
Save nickbclifford/a886e1c9013a8f0971cce7642d1e7979 to your computer and use it in GitHub Desktop.
ESLint minimal example
{
"extends": "@mymicds",
"parserOptions": {
"project": "./tsconfig.json"
}
}
> npx eslint test.ts
Oops! Something went wrong! :(
ESLint: 7.4.0
Error: Failed to load parser '@typescript-eslint/parser' declared in '.eslintrc.json » @mymicds/eslint-config': Cannot find module 'typescript'
Require stack:
- /home/nick/Desktop/eslint-config/node_modules/@typescript-eslint/typescript-estree/dist/parser.js
- /home/nick/Desktop/eslint-config/node_modules/@typescript-eslint/typescript-estree/dist/index.js
- /home/nick/Desktop/eslint-config/node_modules/@typescript-eslint/parser/dist/parser.js
- /home/nick/Desktop/eslint-config/node_modules/@typescript-eslint/parser/dist/index.js
- /home/nick/Desktop/test/node_modules/eslint/lib/cli-engine/config-array-factory.js
- /home/nick/Desktop/test/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js
- /home/nick/Desktop/test/node_modules/eslint/lib/cli-engine/cli-engine.js
- /home/nick/Desktop/test/node_modules/eslint/lib/eslint/eslint.js
- /home/nick/Desktop/test/node_modules/eslint/lib/eslint/index.js
- /home/nick/Desktop/test/node_modules/eslint/lib/cli.js
- /home/nick/Desktop/test/node_modules/eslint/bin/eslint.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
at Function.Module._load (internal/modules/cjs/loader.js:899:27)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (/home/nick/Desktop/test/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/home/nick/Desktop/eslint-config/node_modules/@typescript-eslint/typescript-estree/dist/parser.js:30:25)
at Module._compile (/home/nick/Desktop/test/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19)
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@mymicds/eslint-config": "file:../eslint-config",
"@typescript-eslint/eslint-plugin": "^3.6.1",
"eslint": "^7.4.0",
"typescript": "^3.9.7"
}
}
console.log('Hello, world!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment