Skip to content

Commit bd35c03

Browse files
Updated the playground to allow a validator selection (#2941)
* Updated the playground to allow a validator selection - Defaults to the `ajv6` validator - Updated `package*.json` to add `@rjsf/utils` and `@rjsf/validator-ajv6` - Also removed a bunch of unnecessary packages - Bumped a bunch of other packages to the latest minor and patch version - Bumped a few select packages to the latest major version - Updated `.eslintrc` to switch from `babel-eslint` to `@babel/eslint-parser` - Updated the `index.js` file to add a `validators` object containing the `AJV6` validator choice, passing it into `Playground` - Updated the `app.js` file to get `shouldRender()` from `@rjsf/utils` instead of copying it from core - Also extracted `validators` from the props for `Playground`, storing `validator` in the state, initially set to `AJV6` - Added a `ValidatorSelector` component that is used to update the selected `validator` in state - Rendered a `ValidagtorSelector` just before the `CopyLink` component - Passed `validators[validator]` as the `validator` prop on `FormComponent` * - Ran `cs-format` to fix formatting issues and fix the build
1 parent fe26c36 commit bd35c03

13 files changed

+35081
-38936
lines changed

packages/playground/.eslintrc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"parser": "babel-eslint",
2+
"parser": "@babel/eslint-parser",
33
"rules": {
44
"react/jsx-uses-react": 2,
55
"react/jsx-uses-vars": 2,
@@ -26,11 +26,6 @@
2626
"node": true
2727
},
2828
"extends": "eslint:recommended",
29-
"ecmaFeatures": {
30-
"modules": true,
31-
"jsx": true,
32-
"experimentalObjectRestSpread": true
33-
},
3429
"plugins": [
3530
"jsx-a11y",
3631
"react"

packages/playground/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Use legacy peer deps to allow things to install with node 16
2+
legacy-peer-deps=true

0 commit comments

Comments
 (0)