diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..8b5ca43 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,153 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": [ + "nextjs", + "typescript" + ], + "categories": { + "correctness": "off" + }, + "env": { + "builtin": true + }, + "ignorePatterns": [ + ".next/**", + "out/**", + "build/**", + "next-env.d.ts" + ], + "rules": { + "@next/next/google-font-display": "warn", + "@next/next/google-font-preconnect": "warn", + "@next/next/next-script-for-ga": "warn", + "@next/next/no-async-client-component": "warn", + "@next/next/no-before-interactive-script-outside-document": "warn", + "@next/next/no-css-tags": "warn", + "@next/next/no-head-element": "warn", + "@next/next/no-html-link-for-pages": "error", + "@next/next/no-img-element": "warn", + "@next/next/no-page-custom-font": "warn", + "@next/next/no-styled-jsx-in-document": "warn", + "@next/next/no-sync-scripts": "error", + "@next/next/no-title-in-document-head": "warn", + "@next/next/no-typos": "warn", + "@next/next/no-unwanted-polyfillio": "warn", + "@next/next/inline-script-id": "error", + "@next/next/no-assign-module-variable": "error", + "@next/next/no-document-import-in-page": "error", + "@next/next/no-duplicate-head": "error", + "@next/next/no-head-import-in-document": "error", + "@next/next/no-script-component-in-head": "error", + "@typescript-eslint/ban-ts-comment": "error", + "no-array-constructor": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-empty-object-type": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-require-imports": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "error", + "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unsafe-function-type": "error", + "no-unused-expressions": "warn", + "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" + }, + "overrides": [ + { + "files": [ + "**/*.{js,jsx,mjs,ts,tsx,mts,cts}" + ], + "rules": { + "react/display-name": "error", + "react/jsx-key": "error", + "react/jsx-no-comment-textnodes": "error", + "react/jsx-no-duplicate-props": "error", + "react/jsx-no-target-blank": "off", + "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": "off", + "react/no-unsafe": "off", + "react/react-in-jsx-scope": "off", + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn", + "import/no-anonymous-default-export": "warn", + "jsx-a11y/alt-text": [ + "warn", + { + "elements": [ + "img" + ], + "img": [ + "Image" + ] + } + ], + "jsx-a11y/aria-props": "warn", + "jsx-a11y/aria-proptypes": "warn", + "jsx-a11y/aria-unsupported-elements": "warn", + "jsx-a11y/role-has-required-aria-props": "warn", + "jsx-a11y/role-supports-aria-props": "warn" + }, + "globals": { + "AudioWorkletGlobalScope": "readonly", + "AudioWorkletProcessor": "readonly", + "currentFrame": "readonly", + "currentTime": "readonly", + "registerProcessor": "readonly", + "sampleRate": "readonly", + "WorkletGlobalScope": "readonly" + }, + "plugins": [ + "react", + "import", + "jsx-a11y" + ], + "env": { + "browser": true, + "node": true + } + }, + { + "files": [ + "**/*.ts", + "**/*.tsx", + "**/*.mts", + "**/*.cts" + ], + "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-const": "error", + "prefer-rest-params": "error", + "prefer-spread": "error" + } + } + ] +} \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 05e726d..0000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { defineConfig, globalIgnores } from "eslint/config"; -import nextVitals from "eslint-config-next/core-web-vitals"; -import nextTs from "eslint-config-next/typescript"; - -const eslintConfig = defineConfig([ - ...nextVitals, - ...nextTs, - // Override default ignores of eslint-config-next. - globalIgnores([ - // Default ignores of eslint-config-next: - ".next/**", - "out/**", - "build/**", - "next-env.d.ts", - ]), -]); - -export default eslintConfig; diff --git a/package.json b/package.json index 2a83f4f..928e274 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", - "eslint": "^9", "eslint-config-next": "16.2.1", "tailwindcss": "^4", "typescript": "^5" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 66400ca..56bb192 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,9 +36,6 @@ importers: '@types/react-dom': specifier: ^19 version: 19.2.3(@types/react@19.2.14) - eslint: - specifier: ^9 - version: 9.39.4(jiti@2.6.1) eslint-config-next: specifier: 16.2.1 version: 16.2.1(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)