31 lines
703 B
JavaScript
31 lines
703 B
JavaScript
import js from "@eslint/js";
|
|
import prettierConfig from "eslint-config-prettier";
|
|
import prettier from "eslint-plugin-prettier";
|
|
import globals from "globals";
|
|
|
|
export default [
|
|
{
|
|
ignores: ["eslint.config.mjs"],
|
|
},
|
|
js.configs.recommended,
|
|
{
|
|
files: ["**/*.{js,mjs,cjs}"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "commonjs",
|
|
globals: globals.node,
|
|
},
|
|
plugins: {
|
|
prettier,
|
|
},
|
|
rules: {
|
|
"prettier/prettier": "error",
|
|
"no-console": "off",
|
|
"no-empty-function": "off",
|
|
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
|
"prefer-const": "error",
|
|
"no-var": "error"
|
|
},
|
|
},
|
|
prettierConfig,
|
|
]; |