Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
"semi": true,
"experimentalSortImports": {
"groups": [
["side-effect"],
["builtin"],
["external", "external-type"],
["internal", "internal-type"],
["external"],
["internal"],
["side-effect"],
["external-type"],
["internal-type"],
["parent", "parent-type"],
["sibling", "sibling-type"],
["index", "index-type"]
["index", "style", "index-type", "import"]
]
},
"experimentalTailwindcss": {
Expand Down
283 changes: 73 additions & 210 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,169 +1,81 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["import", "unicorn"],
"plugins": [],
"categories": {
"correctness": "off"
},
"env": {
"builtin": true
},
"ignorePatterns": [
"**/node_modules",
"**/package-lock.json",
"**/yarn.lock",
"**/pnpm-lock.yaml",
"**/fixtures",
"**/.changeset",
"**/CHANGELOG*.md",
"**/*.min.*",
"**/LICENSE*",
"**/__snapshots__",
"eslint.config.mjs",
"eslint.config.js",
"**/.DS_Store",
"dist",
"lib",
"examples/dist",
"**/auto-imports.d.ts",
"**/components.d.ts",
"**/.env.local",
"**/.env.*.local",
"**/npm-debug.log*",
"**/yarn-debug.log*",
"**/yarn-error.log*",
"**/.idea",
"**/.vscode",
"**/*.suo",
"**/*.ntvs*",
"**/*.njsproj",
"**/*.sln",
"**/*.sw?",
"**/.env",
"**/.vercel",
"docs/.vitepress/dist",
"docs/.vitepress/node_modules",
"docs/.vitepress/.temp",
"docs/.vitepress/cache",
"dist/**/*.ts",
"dist/**",
"contributorkit.config.ts",
"tailwind.config.js",
"postcss.config.js",
"animate.js",
"playground/**"
],
"rules": {
"constructor-super": "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-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",
"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": "warn",
"no-unused-labels": "error",
"no-unused-private-class-members": "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",
"import/first": "warn",
"import/no-mutable-exports": "warn",
"unicorn/error-message": "error",
"unicorn/escape-case": "error",
"unicorn/no-instanceof-array": "error",
"unicorn/no-new-buffer": "error",
"unicorn/number-literal-case": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-string-starts-ends-with": "error",
"unicorn/prefer-type-error": "error",
"unicorn/throw-new-error": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/explicit-length-check": "error",
"unicorn/prefer-array-index-of": "error",
"unicorn/no-abusive-eslint-disable": "error",
"unicorn/prefer-add-event-listener": "error",
"unicorn/prefer-array-find": "error",
"unicorn/prefer-array-flat-map": "error",
"unicorn/prefer-array-some": "error",
"unicorn/prefer-keyboard-event-key": "error",
"unicorn/prefer-math-trunc": "warn",
"unicorn/prefer-negative-index": "error",
"unicorn/prefer-number-properties": "warn",
"unicorn/prefer-regexp-test": "warn",
"unicorn/prefer-structured-clone": "warn",
"unicorn/prefer-string-raw": "warn"
},
"ignorePatterns": ["dist"],
"overrides": [
{
"files": ["**/*.?([cm])ts", "**/*.?([cm])tsx", "**/*.?([cm])js", "**/*.?([cm])jsx"],
"files": ["**/*.{ts,tsx}"],
"rules": {
"constructor-super": "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-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",
"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": "warn",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "warn",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-escape": "error",
"no-with": "error",
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error"
}
},
{
"files": ["**/*.{ts,tsx}"],
"rules": {
"constructor-super": "off",
"no-class-assign": "off",
"no-const-assign": "off",
"no-dupe-class-members": "off",
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
"no-new-native-nonconstructor": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
"no-setter-return": "off",
"no-this-before-super": "off",
"no-unsafe-negation": "off",
"no-var": "error",
"no-with": "off",
"prefer-rest-params": "error",
"prefer-spread": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-ts-comment": "off",
"no-array-constructor": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-empty-object-type": [
"error",
{
"allowInterfaces": "with-single-extends"
}
],
"@typescript-eslint/no-empty-object-type": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-misused-new": "error",
Expand All @@ -175,77 +87,28 @@
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-function-type": "error",
"no-unused-expressions": "error",
"no-unused-vars": "error",
"no-unused-vars": "warn",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-tslint-comment": "error",
"@typescript-eslint/consistent-generic-constructors": "error",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"no-empty-function": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/consistent-type-imports": [
"warn",
{
"fixStyle": "inline-type-imports"
}
],
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/triple-slash-reference": "error"
},
"plugins": ["typescript"]
},
{
"files": ["**/*.?([cm])js", "**/*.?([cm])jsx"],
"files": ["**/*.{ts,tsx}"],
"rules": {
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "off"
},
"plugins": ["typescript"]
},
{
"files": ["**/*.(spec|test).?([cm])[jt]s?(x)"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"no-empty-function": "off"
},
"plugins": ["typescript"]
},
{
"files": ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
"rules": {
"react/jsx-key": "error",
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-target-blank": "error",
"react/jsx-no-undef": "error",
"react/no-children-prop": "error",
"react/no-danger-with-children": "error",
"react/no-direct-mutation-state": "error",
"react/no-find-dom-node": "error",
"react/no-is-mounted": "error",
"react/no-render-return-value": "error",
"react/no-string-refs": "error",
"react/no-unescaped-entities": "error",
"react/no-unknown-property": "error",
"react/no-unsafe": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
"plugins": ["react"]
},
{
"files": ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
"plugins": ["react"]
"files": ["**/*.{ts,tsx}"],
"env": {
"es2020": true,
"browser": true
}
}
]
}
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"source.organizeImports": "never"
},

// OXC Formatter
// OXC Formatter
"oxc.fmt.experimental": true,
"editor.defaultFormatter": "oxc.oxc-vscode",

"[json]": {
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
Expand Down Expand Up @@ -59,7 +59,7 @@
}
]
},
"[typescriptreact]": {
"[typescriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.rulers": [
{
Expand All @@ -69,5 +69,5 @@
]
},
"oxc.fmt.configPath": ".oxfmtrc.json",
"editor.formatOnSave": true,
"editor.formatOnSave": true
}
1 change: 1 addition & 0 deletions docs/.vitepress/i18n/composable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { useData } from 'vitepress';
import { t } from './utils';

export function useTranslate(lang?: string) {
// oxlint-disable-next-line eslint-plugin-react-hooks/rules-of-hooks
return (key: string) => t(key, lang || useData().lang.value);
}
5 changes: 3 additions & 2 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import CopyOrDownloadAsMarkdownButtons from 'vitepress-plugin-llms/vitepress-components/CopyOrDownloadAsMarkdownButtons.vue';
import Theme from 'vitepress/theme';

// import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import './style.css';
import 'uno.css';

import type { EnhanceAppContext } from 'vitepress';
import CopyOrDownloadAsMarkdownButtons from 'vitepress-plugin-llms/vitepress-components/CopyOrDownloadAsMarkdownButtons.vue';
import Theme from 'vitepress/theme';

import Changelog from '../components/Changelog.vue';
import Contributors from '../components/Contributors.vue';
Expand Down
Loading