Skip to content

Instantly share code, notes, and snippets.

@jangjunha
Created January 13, 2020 06:44
Show Gist options
  • Save jangjunha/4e5928793c33fadfcde3a17bf4a54405 to your computer and use it in GitHub Desktop.
Save jangjunha/4e5928793c33fadfcde3a17bf4a54405 to your computer and use it in GitHub Desktop.
parser: "@typescript-eslint/parser"
parserOptions:
ecmaVersion: 7
sourceType: module
extends:
- eslint:recommended
- plugin:import/errors
- plugin:import/warnings
- plugin:import/typescript
settings:
import/resolver:
typescript: {}
$ yarn eslint index.ts
yarn run v1.21.1
warning ../package.json: No license field
$ /path/to/eslint-import-firebase/node_modules/.bin/eslint index.ts
TypeError: moduleDecl.body.body.forEach is not a function
Occurred while linting /path/to/eslint-import-firebase/index.ts:1
at /path/to/eslint-import-firebase/node_modules/eslint-plugin-import/lib/ExportMap.js:564:32
at Array.forEach (<anonymous>)
at /path/to/eslint-import-firebase/node_modules/eslint-plugin-import/lib/ExportMap.js:562:19
at Array.forEach (<anonymous>)
at Function.ExportMap.parse (/path/to/eslint-import-firebase/node_modules/eslint-plugin-import/lib/ExportMap.js:476:12)
at Function.ExportMap.for (/path/to/eslint-import-firebase/node_modules/eslint-plugin-import/lib/ExportMap.js:360:25)
at Function.ExportMap.get (/path/to/eslint-import-firebase/node_modules/eslint-plugin-import/lib/ExportMap.js:315:23)
at processBodyStatement (/path/to/eslint-import-firebase/node_modules/eslint-plugin-import/lib/rules/namespace.js:67:47)
at Array.forEach (<anonymous>)
at Program (/path/to/eslint-import-firebase/node_modules/eslint-plugin-import/lib/rules/namespace.js:96:14)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
import * as firebase from 'firebase/app';
firebase.analytics();
{
"name": "eslint-import-firebase",
"version": "1.0.0",
"devDependencies": {
"@typescript-eslint/parser": "^2.15.0",
"eslint": "^6.8.0",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-import": "^2.20.0",
"typescript": "^3.7.4"
},
"dependencies": {
"firebase": "^7.6.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment