Skip to content

Commit

Permalink
migrate eslint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
Black-Thunder committed Oct 7, 2024
1 parent cd42165 commit d0a05cb
Show file tree
Hide file tree
Showing 5 changed files with 234 additions and 88 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc.json

This file was deleted.

52 changes: 52 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
const globals = require("globals");
const js = require("@eslint/js");

const {
FlatCompat,
} = require("@eslint/eslintrc");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = [{
ignores: ["**/.eslintrc.js", "admin/words.js"],
}, ...compat.extends("eslint:recommended"), {
plugins: {},

languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},

ecmaVersion: 2020,
sourceType: "commonjs",
},

rules: {
indent: ["error", "tab", {
SwitchCase: 1,
}],

"no-console": "off",

"no-unused-vars": ["error", {
ignoreRestSiblings: true,
argsIgnorePattern: "^_",
}],

"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",

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

semi: ["error", "always"],
},
}];
Loading

0 comments on commit d0a05cb

Please sign in to comment.