Skip to content

Commit

Permalink
Merge pull request #94 from ccnmtl/eslint
Browse files Browse the repository at this point in the history
upgrade eslint
  • Loading branch information
nikolas authored Jul 19, 2024
2 parents 5bfca67 + 10ac5e0 commit bd7bdcd
Show file tree
Hide file tree
Showing 4 changed files with 334 additions and 435 deletions.
42 changes: 0 additions & 42 deletions .eslintrc.js

This file was deleted.

47 changes: 47 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import security from "eslint-plugin-security";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
...compat.extends("eslint:recommended", "plugin:security/recommended-legacy"),
{
plugins: {
security,
},

languageOptions: {
globals: {
...globals.browser,
...globals.amd,
...globals.jquery,
google: true,
lunr: true,
},
},

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

"no-unused-vars": ["error", {
vars: "all",
args: "none",
}],

quotes: ["error", "single"],
"security/detect-object-injection": "off",
semi: ["error", "always"],
},
},
];
Loading

0 comments on commit bd7bdcd

Please sign in to comment.