chore: replace eslint & prettier with oxc
This commit is contained in:
+112
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
|
||||
"plugins": ["typescript", "react", "jsx-a11y", "import"],
|
||||
"rules": {
|
||||
"no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
"ignoreRestSiblings": true
|
||||
}
|
||||
],
|
||||
"curly": "warn",
|
||||
"no-console": [
|
||||
"warn",
|
||||
{
|
||||
"allow": ["info", "warn", "error"]
|
||||
}
|
||||
],
|
||||
"no-else-return": "warn",
|
||||
"no-lonely-if": "warn",
|
||||
"no-unneeded-ternary": "warn",
|
||||
"no-unused-expressions": "warn",
|
||||
"no-useless-return": "warn",
|
||||
"no-var": "warn",
|
||||
"one-var": "warn",
|
||||
"prefer-arrow-callback": "warn",
|
||||
"prefer-const": "warn",
|
||||
"prefer-template": "warn",
|
||||
"typescript/consistent-type-imports": [
|
||||
"error",
|
||||
{
|
||||
"disallowTypeAnnotations": false
|
||||
}
|
||||
],
|
||||
"typescript/no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"patterns": [
|
||||
{
|
||||
"group": [
|
||||
"../../excalidraw",
|
||||
"../../../packages/excalidraw",
|
||||
"@excalidraw/excalidraw"
|
||||
],
|
||||
"message": "Do not import from '@excalidraw/excalidraw' package anything but types, as this package must be independent.",
|
||||
"allowTypeImports": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"eslint/no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"paths": [
|
||||
{
|
||||
"name": "jotai",
|
||||
"message": "Do not import from \"jotai\" directly. Use our app-specific modules (\"editor-jotai\" or \"app-jotai\")."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"react/jsx-no-target-blank": [
|
||||
"error",
|
||||
{
|
||||
"allowReferrer": true
|
||||
}
|
||||
],
|
||||
"jsx-a11y/no-autofocus": "off",
|
||||
"eslint/no-async-promise-executor": "off",
|
||||
"eslint-plugin-jsx-a11y/click-events-have-key-events": "off",
|
||||
"eslint-plugin-jsx-a11y/label-has-associated-control": "off"
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"node_modules/",
|
||||
"build/",
|
||||
"dist/",
|
||||
".vscode/",
|
||||
"firebase/",
|
||||
"public/workbox",
|
||||
"packages/excalidraw/types",
|
||||
"examples/**/public",
|
||||
"dev-dist",
|
||||
"coverage"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"packages/common/src/**/*.ts",
|
||||
"packages/common/src/**/*.tsx",
|
||||
"packages/element/src/**/*.ts",
|
||||
"packages/element/src/**/*.tsx"
|
||||
],
|
||||
"rules": {
|
||||
"typescript/no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"patterns": [
|
||||
{
|
||||
"group": [
|
||||
"../../excalidraw",
|
||||
"../../../packages/excalidraw",
|
||||
"@excalidraw/excalidraw"
|
||||
],
|
||||
"message": "Do not import from '@excalidraw/excalidraw' package anything but types, as this package must be independent.",
|
||||
"allowTypeImports": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user