-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to support React 19 and support ESM projects (#813)
* Updating to support React 19, including necessary package updates * Adding esm export to build and changing current to explicit umd identifier * fixing accidentally commited local dev package dependency issue * fixing yarn.lock * Adding testing-library/dom to fix testing issue from library update
- Loading branch information
1 parent
2483062
commit b290c5f
Showing
11 changed files
with
18,452 additions
and
5,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"; | ||
import react from "eslint-plugin-react"; | ||
import jest from "eslint-plugin-jest"; | ||
import globals from "globals"; | ||
import babelParser from "@babel/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 [ | ||
...fixupConfigRules( | ||
compat.extends( | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
"plugin:jsx-a11y/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:jest/recommended" | ||
) | ||
), | ||
{ | ||
plugins: { | ||
react: fixupPluginRules(react), | ||
jest: fixupPluginRules(jest), | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
|
||
parser: babelParser, | ||
ecmaVersion: 12, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
|
||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
|
||
"import/resolver": { | ||
alias: { | ||
map: [["src", "./src"]], | ||
extensions: [".ts", ".js", ".jsx", ".json"], | ||
}, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"react/display-name": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["**/*.js", "**/*.jsx"], | ||
|
||
rules: { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
trailingComma: "es5", | ||
}, | ||
], | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.