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

feat!: switch to eslint 9 flat config #202

Merged
merged 10 commits into from
Nov 26, 2024
Merged

feat!: switch to eslint 9 flat config #202

merged 10 commits into from
Nov 26, 2024

Conversation

egilsster
Copy link
Contributor

@egilsster egilsster commented Nov 20, 2024

Integration steps:

  1. Install package with latest configs (from this PR)
  2. Install eslint 9 and change your lint script to use it (e.g. eslint .)
  3. rename your config to eslint.config.js (if you have "type": "module" in your package json) / eslint.config.mjs (if otherwise)
    example config that uses typescript, react, vitest, react-query plugin:
// @ts-check
import qlik from "@qlik/eslint-config";
import pluginQuery from "@tanstack/eslint-plugin-query";

export default qlik.compose(
  ...qlik.configs.react,
  ...qlik.configs.vitest,
  ...pluginQuery.configs["flat/recommended"],
  {
    rules: {
      // Override rules if needed
    },
  },
  // In its own object so it's global
  {
    ignores: ["dist", "node_modules", "script"],
  },
);
  1. If you arent using typescript to build your project and use it solely as a 'linter', then make it include all files "include": [".*", "**/*"] in your tsconfig

run your lint script

Copy link

changeset-bot bot commented Nov 20, 2024

🦋 Changeset detected

Latest commit: 00e32d3

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

This PR includes changesets to release 1 package
Name Type
@qlik/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

@egilsster egilsster marked this pull request as ready for review November 21, 2024 09:26
@egilsster egilsster requested a review from a team as a code owner November 21, 2024 09:26
@egilsster egilsster merged commit bfdfaef into main Nov 26, 2024
6 checks passed
@egilsster egilsster deleted the next branch November 26, 2024 13:45
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.

2 participants