Skip to content

Commit

Permalink
chore: updates React version support
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonmarcello committed Jan 6, 2025
1 parent bc617ad commit a61ab67
Show file tree
Hide file tree
Showing 5 changed files with 2,540 additions and 1,689 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-glasses-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wethegit/react-marquee": minor
---

Updates React version support
85 changes: 85 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"
import typescriptEslint from "@typescript-eslint/eslint-plugin"
import reactRefresh from "eslint-plugin-react-refresh"
import globals from "globals"
import tsParser from "@typescript-eslint/parser"
import path from "node:path"
import { fileURLToPath } from "node:url"
import js from "@eslint/js"
import { FlatCompat } from "@eslint/eslintrc"

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default [
{
ignores: [
"**/node_modules/",
"**/dist/",
"**/*.\\{css, scss}",
"**/.eslintrc.*",
"**/vite.config.ts",
"**/docs/",
"**/dist",
"**/node_modules",
"**/.turbo",
"**/vite.config.ts",
],
},
...fixupConfigRules(
compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"prettier"
)
),
{
plugins: {
"@typescript-eslint": fixupPluginRules(typescriptEslint),
"react-refresh": reactRefresh,
},

languageOptions: {
globals: {
...globals.browser,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},

settings: {
react: {
version: "detect",
},

jest: {
version: 26,
},
},

rules: {
"react-refresh/only-export-components": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",

"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
},
},
]
Loading

0 comments on commit a61ab67

Please sign in to comment.