mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-11-24 06:25:46 +00:00
47 lines
1.0 KiB
JavaScript
47 lines
1.0 KiB
JavaScript
const {
|
|
defineConfig,
|
|
} = require("eslint/config");
|
|
|
|
const globals = require("globals");
|
|
const tsParser = require("@typescript-eslint/parser");
|
|
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
|
|
const js = require("@eslint/js");
|
|
|
|
const {
|
|
FlatCompat,
|
|
} = require("@eslint/eslintrc");
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
recommendedConfig: js.configs.recommended,
|
|
allConfig: js.configs.all
|
|
});
|
|
|
|
module.exports = defineConfig([{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
|
|
parser: tsParser,
|
|
ecmaVersion: 12,
|
|
sourceType: "module",
|
|
parserOptions: {},
|
|
},
|
|
|
|
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
|
|
|
|
plugins: {
|
|
"@typescript-eslint": typescriptEslint,
|
|
},
|
|
|
|
rules: {
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/ban-types": "off",
|
|
indent: ["error", 2],
|
|
"linebreak-style": ["error", "unix"],
|
|
quotes: ["error", "double"],
|
|
semi: ["error", "always"],
|
|
},
|
|
}]);
|