Make APIs more similar
This commit is contained in:
parent
9f0e1f8b61
commit
c40d7d056e
57 changed files with 3994 additions and 1801 deletions
52
packages/eslint-config/node.js
Normal file
52
packages/eslint-config/node.js
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import tseslint from "@typescript-eslint/eslint-plugin";
|
||||
import tsparser from "@typescript-eslint/parser";
|
||||
import prettier from "eslint-config-prettier";
|
||||
import unicorn from "eslint-plugin-unicorn";
|
||||
import importX from "eslint-plugin-import-x";
|
||||
|
||||
export default [
|
||||
{
|
||||
files: ["**/*.ts"],
|
||||
languageOptions: {
|
||||
parser: tsparser,
|
||||
parserOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: "module",
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
"@typescript-eslint": tseslint,
|
||||
unicorn,
|
||||
"import-x": importX,
|
||||
},
|
||||
rules: {
|
||||
...tseslint.configs.recommended.rules,
|
||||
...unicorn.configs.recommended.rules,
|
||||
|
||||
// Relax unicorn rules
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/prevent-abbreviations": "off",
|
||||
"unicorn/no-process-exit": "off",
|
||||
"unicorn/prefer-top-level-await": "off",
|
||||
|
||||
// Import rules
|
||||
"import-x/no-duplicates": "error",
|
||||
"import-x/order": [
|
||||
"error",
|
||||
{
|
||||
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
|
||||
"newlines-between": "always",
|
||||
alphabetize: { order: "asc" },
|
||||
},
|
||||
],
|
||||
|
||||
// TypeScript rules
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
},
|
||||
},
|
||||
prettier,
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue