Skip to content

Commit

Permalink
Fix ESlint inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Jul 30, 2024
1 parent 2cf59e5 commit 1d47b83
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 30 deletions.
44 changes: 14 additions & 30 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import jsdoc from "eslint-plugin-jsdoc";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import {fileURLToPath} from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import {FlatCompat} from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -26,6 +26,7 @@ export default [
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},

ecmaVersion: 8,
Expand All @@ -41,18 +42,18 @@ export default [
},

rules: {
indent: ["error", "tab"],
"indent": ["error", "tab"],
"linebreak-style": ["error", "unix"],

quotes: [
"quotes": [
"error",
"double",
{
allowTemplateLiterals: true,
},
],

semi: ["error", "always"],
"semi": ["error", "always"],
"no-negated-condition": "off",
"require-jsdoc": "off",
"no-mixed-requires": "off",
Expand All @@ -77,34 +78,17 @@ export default [
"no-tabs": "off",

"valid-jsdoc": 0,
// Starting with ESLint v8, it needs to be disabled as it currently can't be supported
// See: https://github.com/eslint/eslint/issues/14745
"jsdoc/check-examples": 0,
"jsdoc/check-param-names": 2,
"jsdoc/check-tag-names": 2,
"jsdoc/check-types": 2,
"jsdoc/no-undefined-types": 0,
"jsdoc/require-description": 0,
"jsdoc/require-description-complete-sentence": 0,
"jsdoc/require-example": 0,
"jsdoc/require-hyphen-before-param-description": 0,
"jsdoc/require-param": 2,
"jsdoc/require-param-description": 0,
"jsdoc/require-param-name": 2,
"jsdoc/require-param-type": 2,
"jsdoc/require-returns": 0,
"jsdoc/require-returns-description": 0,
"jsdoc/require-returns-type": 2,

"jsdoc/tag-lines": [
2,
"any",
{
startLines: 1,
},
],
"jsdoc/require-returns": 0,
},
},
{
files: ["**/*.mjs"],

"jsdoc/valid-types": 0,
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
},
},
];
1 change: 1 addition & 0 deletions lib/plugin/variable-collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ VariableCollector.prototype = {
filename: node.currentFileInfo.filename,
rootFilename: node.currentFileInfo.rootFilename
};
// eslint-disable-next-line no-unused-vars
} catch (err) {
// Errors might occur within mixins.
// But as we only collect global variables, this doesn't matter...
Expand Down

0 comments on commit 1d47b83

Please sign in to comment.