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

eslint flat-config support #133

Closed
nikolaiessel opened this issue May 8, 2024 · 1 comment
Closed

eslint flat-config support #133

nikolaiessel opened this issue May 8, 2024 · 1 comment

Comments

@nikolaiessel
Copy link

I`m already using the new eslint flat-config fomat.

It seems this is actually not supported by fast-serve?

OoB I get the same error as in #126.
If I add the following to the transformConfig:

	initialWebpackConfig.plugins.forEach(plugin =>
	{
		if (plugin.constructor.name === "ESLintWebpackPlugin")
		{
			plugin.options.configType = "flat";
			plugin.options.eslintPath = "eslint/use-at-your-own-risk";
		}
	});

I get still an error: ERROR in ESLint is not a constructor

It seems included Eslint/Plugin versions are to old to support this config-type?

@s-KaiNet
Copy link
Owner

s-KaiNet commented May 8, 2024

It seems included Eslint/Plugin versions are to old to support this config-type?

Yes, and the short answer is that we have to wait SPFx 1.19 release to use flat configs with fast-serve.

Currently, I cannot do anything with that, because flat-configs were introduced in eslint-webpack-plugin@4.1.0, but 4.1.0 supports webpack 5 only, while the latest released SPFx 1.18 is based on webpack 4.

In SPFx 1.19 beta webpack 5 was introduced and I already added support for 4.1.0 eslint plugin in next fast-serve beta.

@s-KaiNet s-KaiNet closed this as completed May 8, 2024
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

2 participants