@lobehub/lint
Version:
<a name="readme-top"></a><div align="center">
109 lines (107 loc) • 3.9 kB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/eslint/index.ts
var eslint_exports = {};
__export(eslint_exports, {
default: () => eslint_default
});
module.exports = __toCommonJS(eslint_exports);
var eslint_default = {
$schema: "https://json.schemastore.org/eslintrc",
extends: [
"eslint:recommended",
require.resolve("@umijs/lint/dist/config/eslint"),
"plugin:unicorn/recommended"
],
plugins: [
"unicorn",
"import",
"unused-imports",
"simple-import-sort",
"sort-keys-fix",
"typescript-sort-keys"
],
rules: {
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-explicit-any": 0,
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"no-empty": "warn",
"no-extra-boolean-cast": 0,
"no-unused-vars": 0,
"react/display-name": 0,
"react/jsx-no-useless-fragment": "error",
"react/jsx-sort-props": "error",
"react/no-unknown-property": "warn",
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
"react/self-closing-comp": [
"warn",
{
component: true,
html: true
}
],
"simple-import-sort/exports": "error",
"sort-keys-fix/sort-keys-fix": "error",
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error",
"unicorn/catch-error-name": "warn",
"unicorn/explicit-length-check": 0,
"unicorn/filename-case": 0,
"unicorn/import-style": 0,
"unicorn/no-anonymous-default-export": 0,
"unicorn/no-array-callback-reference": 0,
"unicorn/no-array-for-each": 0,
"unicorn/no-array-reduce": 0,
"unicorn/no-empty-file": "warn",
"unicorn/no-negated-condition": 0,
"unicorn/no-nested-ternary": 0,
"unicorn/no-null": 0,
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-useless-undefined": 0,
"unicorn/prefer-code-point": 0,
"unicorn/prefer-logical-operator-over-ternary": 0,
"unicorn/prefer-module": 0,
"unicorn/prefer-number-properties": 0,
"unicorn/prefer-query-selector": 0,
"unicorn/prefer-spread": 0,
"unicorn/prefer-string-raw": 0,
"unicorn/prefer-string-replace-all": "warn",
"unicorn/prefer-ternary": 0,
"unicorn/prefer-type-error": 0,
"unicorn/prevent-abbreviations": 0,
"unicorn/switch-case-braces": "warn",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{ args: "after-used", argsIgnorePattern: "^_", vars: "all", varsIgnorePattern: "^_" }
]
}
};