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

TypeError: Failed to load plugin '@typescript-eslint' in v3.0.1 #2102

Closed
deraw opened this issue May 25, 2020 · 1 comment
Closed

TypeError: Failed to load plugin '@typescript-eslint' in v3.0.1 #2102

deraw opened this issue May 25, 2020 · 1 comment
Labels
package: utils Issues related to the @typescript-eslint/utils package triage Waiting for maintainers to take a look

Comments

@deraw
Copy link

deraw commented May 25, 2020

Repro

I don't really have a repro right now but I can provide one if it's necessary. You can find the error log here:
https://travis-ci.com/github/assurance-maladie-digital/design-system/jobs/339772266

eslintrc.js

module.exports = {
	root: true,
	env: {
		node: true
	},
	extends: [
		'plugin:vue/recommended',
		'eslint:recommended',
		'@vue/typescript',
		'plugin:jsdoc/recommended'
	],
	rules: {
		// Allow logs in development but not in production
		'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
		'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',

		// Tab indent in templates
		'vue/html-indent': ['error', 'tab'],
		'indent': 'off',

		// Disallow spaces around equal in HTML attributes
		// eg. attr= "value" is invalid
		'vue/no-spaces-around-equal-signs-in-attribute': ['error'],

		// Force semi-colons
		'semi': 'off',
		'@typescript-eslint/semi': ['error'],

		// Remove space in functions, eg. function()
		'space-before-function-paren': ['error', 'never'],

		// .vue <script> indent
		'vue/script-indent': ['error', 'tab', {
			'baseIndent': 1,
			'switchCase': 1,
			'ignores': []
		}],

		// Maximum 1 empty line
		'no-multiple-empty-lines': ['error', { 'max': 1 }],

		// Remove trailing coma
		'comma-dangle': ['error', 'never'],

		// Force PascalCase for component names
		'vue/component-name-in-template-casing': [
			'error',
			'PascalCase',
			{
				'ignores': [
					'keep-alive',
					'component',
					'transition',
					'transition-group'
				]
			}
		],

		// Force single quotes
		'quotes': ['error', 'single'],

		// No trailing spaces
		'no-trailing-spaces': 'error',

		// Enforces one true brace style, eg.
		// if () {
		// }
		'brace-style': ['error', '1tbs'],

		// Allow v-html
		'vue/no-v-html': ['off'],

		// Limit .vue files to 330 lines
		'max-lines': ['error', {
			'max': 330,
			'skipBlankLines': true,
			'skipComments': true
		}],

		'object-curly-spacing': ['error', 'always'],

		// Force arrow functions
		'prefer-arrow-callback': 'error',

		'no-prototype-builtins': 'off',

		// Don't force all params & return
		'jsdoc/require-param': 0,
		'jsdoc/require-returns': 0
	},
	overrides: [
		{
			files: ['*.vue'],
			rules: {
				// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
				// does not work with type definitions
				'no-unused-vars': 'off'
			}
		}
	],
	parserOptions: {
		parser: '@typescript-eslint/parser'
	},
	plugins: [
		'jsdoc'
	]
};

Additional Info

I didn't get any error in version 3.0.0

yarn run v1.22.4
$ vue-cli-service lint --debug
 ERROR  TypeError: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js » @vue/eslint-config-typescript': Class extends value undefined is not a constructor or null
Referenced from: /home/deraw/dev/CNAM/design-system/node_modules/@vue/eslint-config-typescript/index.js
TypeError: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js » @vue/eslint-config-typescript': Class extends value undefined is not a constructor or null
Referenced from: /home/deraw/dev/CNAM/design-system/node_modules/@vue/eslint-config-typescript/index.js
    at Object.<anonymous> (/home/deraw/dev/CNAM/design-system/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/ESLint.js:14:31)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/deraw/dev/CNAM/design-system/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/index.js:15:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Versions

package version
@typescript-eslint/experimental-utils 3.0.1
TypeScript 3.8.3
node 10.20.1
npm 6.14.4
@deraw deraw added package: utils Issues related to the @typescript-eslint/utils package triage Waiting for maintainers to take a look labels May 25, 2020
@deraw
Copy link
Author

deraw commented May 25, 2020

Well, someone was quicker! #2100

@deraw deraw closed this as completed May 25, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: utils Issues related to the @typescript-eslint/utils package triage Waiting for maintainers to take a look
Projects
None yet
Development

No branches or pull requests

1 participant