Skip to content

Error: Cannot find module 'eslint/use-at-your-own-risk' #53

Closed
@mike-kelly

Description

@mike-kelly

Hi, as per the title, I'm getting the following error:

Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js » @vue/eslint-config-typescript': Cannot find module 'eslint/use-at-your-own-risk'

I have tried different node versions and various different eslint plugin versions, with the same result.

Current node version: 18.14.2

Here is my .eslintrc.js file:

require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
  root: true,
  env: {
    es2021: true
  },
  extends: [
    'eslint:recommended',
    'plugin:vue/vue3-recommended',
    '@vue/eslint-config-typescript'
  ],
  rules: {
    'prefer-regex-literals': 'off',
    'vue/multi-word-component-names': 'off',
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'padded-blocks': [0],
    'key-spacing': [1, { mode: 'minimum' }],
    // no spaces before function paren
    'space-before-function-paren': [2, 'never'],
    // require parenthesis in arrow functions
    'arrow-parens': [1, 'always'],
    // allow debugger during development
    // allow semi-colons
    semi: [1, 'always'],
    // allow indentation inside vue <script> tags
    // https://github.com/vuejs/eslint-plugin-vue/issues/362
    indent: ['error', 2, { SwitchCase: 1 }],
    'vue/script-indent': [
      'error',
      2,
      { baseIndent: 1, switchCase: 1 }
    ],
    'vue/no-use-v-if-with-v-for': ['error', {
      allowUsingIterationVar: true
    }]
  },
  overrides: [
    {
      files: ['*.vue'],
      rules: {
        indent: 'off'
      }
    }
  ],
  globals: {
    jquery: true,
    $: true,
    _: true
  },
  parserOptions: {
    parser: '@typescript-eslint/parser'
  }
};

Extract from package.json:

"dependencies": {
    "@vue/compat": "^3.1.0-0",
    "vue": "^3.2.47",
    "vue-burger-menu": "^1.0.9",
    "vue-clipboard2": "^0.3.1",
    "vue-grid-layout": "^2.4.0",
    "vue-router": "^4.1.6",
    "vue-swatches": "^2.1.0",
    "vue2-ace-editor": "0.0.15",
    "vue3-click-away": "^1.2.4",
    "vuedraggable": "^2.19.3",
    "vuex": "^4.1.0",
    "vuex-router-sync": "6.0.0-rc.1"
  },
"devDependencies": {
    "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
    "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
    "@rushstack/eslint-patch": "^1.2.0",
    "@typescript-eslint/eslint-plugin": "^5.54.0",
    "@typescript-eslint/parser": "^5.54.0",
    "@vitejs/plugin-vue": "^4.0.0",
    "@vue/compiler-sfc": "^3.1.0-0",
    "@vue/eslint-config-typescript": "^11.0.2",
    "@vue/test-utils": "^2.3.0",
    "chromedriver": "106",
    "dotenv": "^8.6.0",
    "eslint": "^8.0.1",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^6.1.1",
    "eslint-plugin-vue": "^9.9.0",
    "flush-promises": "^1.0.2",
    "geckodriver": "^3.0.1",
    "http-proxy-middleware": "^0.19.1",
    "msw": "^1.1.0",
    "rollup-plugin-node-polyfills": "^0.2.1",
    "rollup-plugin-visualizer": "^5.9.0",
    "sass": "^1.32.7",
    "typescript": "~4.5.5",
    "vite": "^4.1.4",
    "vite-plugin-dynamic-import": "^1.2.7",
    "vitest": "^0.29.2"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions