diff --git a/.npmignore b/.npmignore index 2c10ff3..f3ee3dd 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,5 @@ .github/ .ncurc -eslint.config.js +eslint.config.mjs node_modules/ test/ diff --git a/flat/modern.js b/flat/modern.js index 4272488..a115f7d 100644 --- a/flat/modern.js +++ b/flat/modern.js @@ -5,6 +5,6 @@ const globals = require("globals"); module.exports = { languageOptions: { globals: globals.node, - ecmaVersion: 2020, + ecmaVersion: 2022, }, }; diff --git a/rules/js.js b/rules/js.js index 1d08de9..4096068 100644 --- a/rules/js.js +++ b/rules/js.js @@ -96,7 +96,13 @@ module.exports = { "no-unsafe-negation": "error", "no-unsafe-optional-chaining": "error", "no-unused-private-class-members": "off", // Not using private yet - "no-unused-vars": ["error", { "varsIgnorePattern": "^_" }], + "no-unused-vars": ["error", { + argsIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^(_|ignore)", + destructuredArrayIgnorePattern: "^_", + varsIgnorePattern: "^_[^_]", + reportUsedIgnorePattern: true, + }], // This is going to cause problems, but I don't care. "no-use-before-define": "error",