Files
outline/.oxlintrc.json

195 lines
6.0 KiB
JSON

{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": [
"build/**",
"node_modules/**",
"public/**",
"server/migrations/**",
"server/scripts/**",
"patches/**",
"*.d.ts"
],
"jsPlugins": [
"./.oxlint/mobx.mjs",
"./.oxlint/bundle.mjs",
"./.oxlint/sequelize.mjs",
"./.oxlint/vitest.mjs",
"./.oxlint/editor.mjs",
"./.oxlint/koa.mjs",
"./.oxlint/react-router.mjs",
"./.oxlint/classes.mjs",
"./.oxlint/node.mjs"
],
"plugins": ["eslint", "typescript", "unicorn", "oxc", "vitest"],
"rules": {
"mobx/observable-needs-initializer": "error",
"sequelize/prefer-after-commit-helper": "error",
"vitest/consistent-test-it": [
"error",
{ "fn": "it", "withinDescribe": "it" }
],
"vitest/no-focused-tests": "error",
"vitest/no-disabled-tests": "error",
"vitest/no-identical-title": "error",
"vitest/expect-expect": "off",
"vitest/no-conditional-expect": "off",
"vitest/require-mock-type-parameters": "off",
"vitest/require-to-throw-message": "off",
"vitest/valid-expect": "off",
"vitest/valid-title": "off",
"vitest-local/require-isolate-directive": "error",
"editor/sanitize-url-in-to-dom": "error",
"koa/no-request-origin": "error",
"react-router/no-deferred-use-location": "error",
"classes/no-private-identifier": "error",
"node-local/no-url-parse": "error",
"for-direction": "error",
"no-async-promise-executor": "error",
"no-case-declarations": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-dupe-class-members": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-empty-static-block": "error",
"no-ex-assign": "error",
"no-explicit-any": "error",
"no-extra-boolean-cast": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-import-assign": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-new-native-nonconstructor": "error",
"unicorn/no-new-array": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
"no-prototype-builtins": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-self-assign": "error",
"no-setter-return": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-this-before-super": "error",
"no-unexpected-multiline": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-escape": "error",
"no-with": "error",
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error"
},
"overrides": [
{
"files": ["plugins/*/client/**/*.{js,jsx,ts,tsx}"],
"rules": {
"bundle/no-constructor-name": "error"
}
},
{
"files": ["plugins/*/server/**/*.{js,ts}"],
"rules": {
"no-restricted-properties": [
"error",
{
"property": "isBot",
"message": "Use `isbot` from the `isbot` package instead"
}
]
}
},
{
"files": ["**/*.{ts,tsx}"],
"rules": {
"no-redeclare": "off"
}
},
{
"files": ["**/*.{js,jsx,ts,tsx}"],
"rules": {
"eqeqeq": "error",
"curly": "error",
"no-console": "error",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "prosemirror-tables",
"importNames": [
"addRowBefore",
"addRowAfter",
"addColumnBefore",
"addColumnAfter"
],
"message": "Use the wrappers from shared/editor/commands/table instead, which respect the target index and place the cursor in the inserted cell."
}
],
"patterns": [
{
"group": ["lodash", "lodash/*", "lodash.*", "lodash-es"],
"message": "Use es-toolkit instead."
}
]
}
],
"no-unused-expressions": "error",
"arrow-body-style": ["error", "as-needed"],
"react/react-in-jsx-scope": "off",
"react/button-has-type": "error",
"typescript/await-thenable": "error",
"typescript/no-duplicate-type-constituents": "error",
"typescript/no-meaningless-void-operator": "error",
"typescript/require-array-sort-compare": "error",
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
],
"typescript/no-require-imports": "error",
"import/no-named-as-default": "off",
"import/no-named-as-default-member": "off",
"typescript/consistent-type-imports": "error",
"typescript/restrict-template-expressions": "error",
"typescript/no-floating-promises": "error",
"typescript/no-useless-default-assignment": "error",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"args": "after-used",
"ignoreRestSiblings": true
}
],
"react/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error"
},
"plugins": ["eslint", "oxc", "react", "typescript", "import"]
}
]
}