Skip to content

Commit

Permalink
Update to the latest eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
StorytellerCZ committed Jul 16, 2024
1 parent 057c12d commit 14fc02f
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 183 deletions.
1 change: 0 additions & 1 deletion collection-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ CollectionHooks.reassignPrototype = function reassignPrototype (
Object.setPrototypeOf(instance, constr.prototype)
// eslint-disable-next-line no-proto
} else if (instance.__proto__) {
// eslint-disable-line no-proto
instance.__proto__ = constr.prototype // eslint-disable-line no-proto
}
}
Expand Down
30 changes: 30 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import standard from "eslint-plugin-standard";
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("standard"), {
plugins: {
standard,
},

languageOptions: {
ecmaVersion: 2022,
sourceType: "module",

parserOptions: {
ecmaFeatures: {
modules: true,
},
},
},
}];
Loading

0 comments on commit 14fc02f

Please sign in to comment.