Skip to content

Commit 4dd2085

Browse files
MCMattialberrymage
authored andcommitted
Migrate ESLint config to use ESModule syntax
1 parent 966e37f commit 4dd2085

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

eslint.config.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
//
33
// SPDX-License-Identifier: AGPL-3.0-only
44

5-
const js = require("@eslint/js");
6-
7-
const {
8-
FlatCompat,
9-
} = require("@eslint/eslintrc");
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
107

118
const compat = new FlatCompat({
12-
baseDirectory: __dirname,
9+
baseDirectory: import.meta.dirname,
1310
recommendedConfig: js.configs.recommended,
1411
allConfig: js.configs.all
1512
});
1613

17-
module.exports = [{
14+
export default [{
1815
ignores: ["projects/**/*"],
1916
}, ...compat.extends(
2017
"eslint:recommended",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "frontend",
33
"version": "0.11.0",
4+
"type":"module",
45
"scripts": {
56
"ng": "ng",
67
"start": "ng serve",

0 commit comments

Comments
 (0)