-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support for eslint 9.0.0 #137
Comments
Thanks for reminding, that reference is only for tracking: when can upgrade my eslint config package to eslint 9.0.0. At the same time, I'd be happy to make some contributions to this project. But at the moment, I don't know the guidelines for this update. For example, should new version be compatible with eslint 8.x? We should create a minor version or major version? |
I would love to know it also. Maybe @joshwilsonvu can answer that? And let us know next steps? In the meanwhile, for your reference, you can use the following with eslint 9.0.0 compatible using this in your package.json:
You can code review the changes on that commit. |
Hello, thank you all for taking the reins on this so far. (Started a new job recently and have been busy 🙂) Currently, the plugin is tested with ESLint v8 down to v6. From what I understand, the breaking changes in ESLint v9 are fairly minor for plugin authors. I don't see a compelling reason to drop support for any old versions, until it becomes difficult to pass tests for those versions while supporting the newest version. Re: versioning, since we're still in v0.x, it technically doesn't matter too much, but adding support for v9 would count as a new feature and could go in a minor. I may take the opportunity to release a v1 major version bump (without breaking changes) once the current batch of PRs and issues are resolved. The pace of rapid changes has slowed enough for that to make sense to me, and I think big changes to I intend to do as much of that as I can tomorrow, and make a few infra updates soon to make releases a less manual, time-intensive process. I'm very thankful for all the community involvement and would like to make this project more collaborative, so that I'm less of a bottleneck. |
When can it be released? |
It looks like the build failed due to the lint script failing:
|
@Crazytieguy @Borber It was just released in the latest 4 commits, including v9 and flat config support |
Yes--v9 support was released in v0.14.0! This v0.14.1 release just fixes the peer dependency and makes some internal updates to use ESLint v9, which don't affect users. |
If you are looking for an example config, its for the most part quite simple. You can see my config on my site here However, the most basic configuration can be seen in the project readme, https://github.com/solidjs-community/eslint-plugin-solid?tab=readme-ov-file#flat-configuration |
Whoops accidentally deleted my comment and meant to append. @SomeAspy I'm getting this error when running my lint, even when using your version 🤔 import pluginJs from "@eslint/js";
import solidEslintPlugin from "eslint-plugin-solid";
import globals from "globals";
import typescriptESLint from "typescript-eslint";
export default [
{
languageOptions: { globals: globals.browser },
},
{
/**
* @note Must be in its own object
* @see https://github.com/eslint/eslint/discussions/18304
* @docs https://eslint.org/docs/latest/use/configure/configuration-files#configuration-objects
*/
ignores: [
"**/dist/*",
"**/i18n/*",
"**/*.d.ts",
"**/*.generated.*",
"**/storybook-static/*",
],
},
pluginJs.configs.recommended,
...typescriptESLint.configs.recommended,
...solidEslintPlugin.configs["flat/typescript"],
]; I got this format from https://github.com/solidjs-community/eslint-plugin-solid?tab=readme-ov-file#flat-configuration.
Would definitely appreciate any insight, I don't seem to have this issue with any other plugin |
It looks like the issue here might be the spread operator in front of |
Oh boy... 🤦🏼 this is what I get for doing multiple things at once. Thank you. |
So, this can be resolved once and for all now 🎉. // @ts-check
import { fixupConfigRules } from "@eslint/compat";
import js from "@eslint/js";
import gitignore from "eslint-config-flat-gitignore";
import jsxA111y from "eslint-plugin-jsx-a11y";
import perfectionist from "eslint-plugin-perfectionist";
import prettier from "eslint-plugin-prettier/recommended";
import solid from "eslint-plugin-solid/configs/typescript.js";
import tailwind from "eslint-plugin-tailwindcss";
import ts from "typescript-eslint";
/* @type {import("eslint").Linter.FlatConfig[]} */
export default [
// Respect the .gitignore
gitignore(),
// JavaScript
js.configs.recommended,
// TypeScript
...ts.configs.recommendedTypeChecked,
...ts.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
// JavaScript...again
{
files: ["**/*.cjs", "**/*.js", "**/*.jsx", "**/*.mjs"],
...ts.configs.disableTypeChecked,
},
// Pedanticism
perfectionist.configs["recommended-natural"],
// JSX/Solid/TailwindCSS
...fixupConfigRules(jsxA111y.flatConfigs.recommended),
solid,
...tailwind.configs["flat/recommended"],
// Prettier...because prettier
prettier,
// Rule overrides
{
rules: {
"perfectionist/sort-imports": [
"error",
{
groups: [
["builtin", "builtin-type"],
["external", "external-type"],
["internal", "internal-type"],
["parent", "parent-type"],
["sibling", "sibling-type"],
["index", "index-type"],
["side-effect", "side-effect-style"],
["object", "unknown"],
],
ignoreCase: true,
internalPattern: ["@/**"],
newlinesBetween: "always",
order: "asc",
type: "natural",
},
],
},
},
]; |
This can be closed, the only thing missing is bumping our internal use of typescript-eslint@v8 |
Describe the need
ESLint 9.0.0 has been released as stable.
Currently, the ESlint version of this package is pointing to version 8.43.0, which has many deprecation notices for version 9.0.0.
This version updates the code to prevent using deprecated fn from version 8.x and start using the new fns of 9.x
The version has been updated to 8.56.0 and migrated to a non-deprecated FNS.
ESLint has not been bumped to version 9, as many changes are required to maintain backward compatibility. However, the package works well in the new version.
Tests are passing. And I tested a bit on my end. This is not a guarantee that I did not break anything. And Code reviews will be really appreciated :)
Note that the package has been bumped to 0.14.0.
Suggested Solution
Make it work
Possible Alternatives
NA
Additional context
#136
The text was updated successfully, but these errors were encountered: