Skip to content

Commit

Permalink
eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
bugsounet committed Oct 29, 2024
1 parent 3dbe6ce commit 6b40e39
Show file tree
Hide file tree
Showing 3 changed files with 359 additions and 512 deletions.
22 changes: 2 additions & 20 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const globals = require("globals");
const { configs: eslintConfigs } = require("@eslint/js");
const eslintPluginImport = require("eslint-plugin-import");
const eslintPluginStylistic = require("@stylistic/eslint-plugin");
const eslintPluginImport = require("eslint-plugin-import");

const config = [
{
Expand All @@ -21,7 +20,7 @@ const config = [
}
},
plugins: {
...eslintPluginStylistic.configs["all-flat"].plugins,
"@stylistic": eslintPluginStylistic,
import: eslintPluginImport
},
rules: {
Expand Down Expand Up @@ -69,21 +68,4 @@ const config = [
}
];

/*
* Set debug to true for testing purposes.
* Since some plugins have not yet been optimized for the flat config,
* we will be able to optimize this file in the future. It can be helpful
* to write the ESLint config to a file and compare it after changes.
*/
const debug = false;

if (debug === true) {
const FileSystem = require("fs");
FileSystem.writeFile("eslint-config-DEBUG.json", JSON.stringify(config, null, 2), (error) => {
if (error) {
throw error;
}
});
}

module.exports = config;
Loading

0 comments on commit 6b40e39

Please sign in to comment.