Skip to content

Conversation

@grixu
Copy link
Contributor

@grixu grixu commented Nov 8, 2024

  • Migration to ESLint v9 and adoption of FlatConfig for a more modern and flexible configuration approach.
  • Each module (ecma, typescript, nextjs, playwright, style, architecture) is a factory for ESLint configurations, which can be used individually or together in projects.
  • Enhanced support for ECMAScript, TypeScript, Next.js, Playwright, and architectural rules.
  • Integration of Prettier and Perfectionist plugins for improved code formatting and consistency.
  • Updated rules and settings to align with the latest best practices and standards.
  • Improved handling of import/export rules and JSON file sorting.
  • Removal of deprecated and non-compliant plugins.

I've added the resolutions field to the root package.json to allow local linting in this repo, due to its using the ESLint v8 and Prettier v2. The package itself is linted & formatted using itself.

@grixu grixu requested a review from a team as a code owner November 8, 2024 12:20
@changeset-bot
Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: 6b4f0ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vue-storefront/eslint-config Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@grixu grixu self-assigned this Nov 8, 2024
Comment on lines 19 to 34
ecma({
files: "**/*.{js,jsx,ts,tsx}",
// Enabling extra rules, for stricter checking, enabled by default
isStrict: true,
// Enabling eslint-plugin-import, enabled by default
withImport: true,
}),
typescript({
files: "**/*.{ts,tsx}",
isStrict: true,
withImport: true,
}),
style({
files: "**/*.{js,jsx,ts,tsx}"
})
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I'd write down somewhere here that there are sensible defaults set and none of those need to be specified explicitly. (and maybe write down what the defaults are 🤷 )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, README.md updated, pls take a look ;)

@FRSgit
Copy link
Contributor

FRSgit commented Nov 8, 2024

I've added the resolutions field to the root package.json to allow local linting in this repo, due to its using the ESLint v9 and Prettier v2. The package itself is linted & formatted using itself.

I think you meant ESLint v8, right?

Copy link
Contributor

@FRSgit FRSgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can do a bit more in the docs, but other than that - great work!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 8, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
14.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@grixu grixu merged commit 59e2cd1 into main Nov 8, 2024
2 of 3 checks passed
@grixu grixu deleted the chore/eslint-9 branch November 8, 2024 14:03
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

Successfully merging this pull request may close these issues.

3 participants