Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias Not Working with Serverless Framework Project #20

Open
jhoffmcd opened this issue Nov 29, 2020 · 0 comments
Open

Alias Not Working with Serverless Framework Project #20

jhoffmcd opened this issue Nov 29, 2020 · 0 comments

Comments

@jhoffmcd
Copy link

I am attempting to get a serverless framework project setup with es6 import/export support. I am able to get it to work with the serverless-webpack however there is an eslint-plugin-node rule that I can't seem to fix with this plugin.

error  "~/utils/logging" is not found  node/no-missing-import

This is my eslint configuration:

{
  "parser": "@babel/eslint-parser",
  "parserOptions": {
    "sourceType": "module"
  },
  "extends": [
    "eslint:recommended",
    "plugin:node/recommended",
    "plugin:jest/recommended",
    "prettier"
  ],
  "plugins": ["prettier"],
  "settings": {
    "import/resolver": {
      "alias": {
        "map": [["~", "./src"]],
        "extensions": [".js", ".json"]
      }
    }
  },
  "rules": {
    "prettier/prettier": "error",
    "node/no-unsupported-features/es-syntax": [
      "error",
      {
        "version": ">=12.10.0",
        "ignores": ["modules"]
      }
    ]
  }
}

For now, I will disable the rule but I wonder if this is expected to work when working with Node.js files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant