Last active
July 18, 2020 19:35
-
-
Save nickbclifford/a886e1c9013a8f0971cce7642d1e7979 to your computer and use it in GitHub Desktop.
ESLint minimal example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"extends": "@mymicds", | |
"parserOptions": { | |
"project": "./tsconfig.json" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Hello, world!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment