mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-03-23 01:49:28 +01:00
40 lines
953 B
JavaScript
40 lines
953 B
JavaScript
import { defineConfig } from "eslint/config";
|
|
import globals from "globals";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import js from "@eslint/js";
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
import babelParser from "@babel/eslint-parser";
|
|
|
|
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 defineConfig([{
|
|
extends: compat.extends("eslint:recommended"),
|
|
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
|
|
ecmaVersion: 8,
|
|
sourceType: "module",
|
|
parser: babelParser,
|
|
|
|
parserOptions: {
|
|
requireConfigFile: false,
|
|
},
|
|
},
|
|
|
|
rules: {
|
|
semi: 2,
|
|
"no-unused-vars": "warn",
|
|
},
|
|
}]);
|