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

Migrate ESLint config file to new syntax #459

Closed
MindTooth opened this issue Aug 12, 2023 · 2 comments · Fixed by #460
Closed

Migrate ESLint config file to new syntax #459

MindTooth opened this issue Aug 12, 2023 · 2 comments · Fixed by #460
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MindTooth
Copy link
Member

Seems I've left some bits out of #458 and it needs some updating.

Guide: https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options

@MindTooth MindTooth added bug Something isn't working help wanted Extra attention is needed labels Aug 12, 2023
@MindTooth MindTooth self-assigned this Aug 12, 2023
@MindTooth
Copy link
Member Author

@roosta some of the options in eslint.config.js, do you have a relation to them? Like the custom parser, etc. I'm asking as it require some changes to transfer them over.

Cleaned it down to:

// ESLint Config

import js from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
// import babelParser from "@babel/eslint-parser";

const config = [
  js.configs.recommended,
  // {
  //   files: ["**/*.js", "**/*.mjs"],
  //   languageOptions: {
  //     parser: babelParser,
  //   },
  // },
  eslintConfigPrettier,
];

//   {
//   env: {
//     browser: true,
//     node: true,
//     es2021: true,
//   },
//   extends: ["eslint:recommended", "prettier"],
//   parserOptions: {
//     ecmaVersion: 13,
//     sourceType: "module",
//   },
//   rules: {
//     "no-unused-vars": "warn",
//   },
// };

export default config;

I actually found a few bugs:


/Users/birgerjn/Sites/srcery.sh/src/main.js
  54:3  error  Duplicate key 'lua'      no-dupe-keys
  69:3  error  'window' is not defined  no-undef

@roosta
Copy link
Member

roosta commented Aug 12, 2023

Feel free to change it, I might have used some of those settings for the fetch data script, but some or all of it might have been lazily copied from a different project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants