Skip to content

Commit

Permalink
[React]Upgrade 3rd party dependencies #1250
Browse files Browse the repository at this point in the history
[React]Upgrade 3rd party dependencies
  • Loading branch information
illiakovalenko authored Dec 19, 2022
2 parents 19c777f + de12047 commit 346311c
Show file tree
Hide file tree
Showing 16 changed files with 1,493 additions and 573 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"graphql-tag": "^2.11.0",
"next": "^12.3.1",
"next-localization": "^0.12.0",
"react": "^18.1.0",
"react-dom": "^18.1.0"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@graphql-codegen/cli": "^1.19.1",
Expand Down
160 changes: 82 additions & 78 deletions packages/create-sitecore-jss/src/templates/react/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,78 +1,82 @@
{
"root": true,
"extends": [
"prettier",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:react/recommended",
"plugin:yaml/recommended",
"plugin:prettier/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"import",
"react",
"yaml"
],
"settings": {
"import/ignore": [
"node_modules",
".png$",
".jpg$"
],
"react": {
"version": "detect"
}
},
"globals": {
"window": true,
"document": true
},
"rules": {
"import/no-unresolved": "off",
"import/no-duplicates": "off",
"import/no-named-as-default": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": true
}
],
"linebreak-style": "off",
"react/jsx-filename-extension": 0,
"jsx-quotes": ["error", "prefer-double"],
"import/prefer-default-export": "off",
"react/forbid-prop-types": "off",
"react/prop-types": 0,
"react/no-danger": "off",
"react/require-default-props": "off",
"react/no-array-index-key": "off",
"no-use-before-define": 0,
"global-require": 0,
"no-param-reassign": 0,
"no-useless-escape": "off",
"spaced-comment": "error",
"curly": ["error", "multi-line"],
"eol-last": ["error", "always"],
"guard-for-in": "error",
"no-unused-labels": "error",
"no-caller": "error",
"no-bitwise": "error",
"no-multiple-empty-lines": "error",
"no-new-wrappers": "error",
"no-eval": "error",
"dot-notation": "error",
"no-trailing-spaces": "error",
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
"brace-style": "error",
"quotes": ["error", "single"],
"default-case": "error",
"eqeqeq": "error"
}
}
{
"root": true,
"extends": [
"prettier",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:react/recommended",
"plugin:yaml/recommended",
"plugin:prettier/recommended"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"ecmaFeatures": {
"jsx": true
},
"babelOptions": {
"presets": ["@babel/preset-react"]
}
},
"plugins": [
"import",
"react",
"yaml"
],
"settings": {
"import/ignore": [
"node_modules",
".png$",
".jpg$"
],
"react": {
"version": "detect"
}
},
"globals": {
"window": true,
"document": true
},
"rules": {
"import/no-unresolved": "off",
"import/no-duplicates": "off",
"import/no-named-as-default": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": true
}
],
"linebreak-style": "off",
"react/jsx-filename-extension": 0,
"jsx-quotes": ["error", "prefer-double"],
"import/prefer-default-export": "off",
"react/forbid-prop-types": "off",
"react/prop-types": 0,
"react/no-danger": "off",
"react/require-default-props": "off",
"react/no-array-index-key": "off",
"no-use-before-define": 0,
"global-require": 0,
"no-param-reassign": 0,
"no-useless-escape": "off",
"spaced-comment": "error",
"curly": ["error", "multi-line"],
"eol-last": ["error", "always"],
"guard-for-in": "error",
"no-unused-labels": "error",
"no-caller": "error",
"no-bitwise": "error",
"no-multiple-empty-lines": "error",
"no-new-wrappers": "error",
"no-eval": "error",
"dot-notation": "error",
"no-trailing-spaces": "error",
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
"brace-style": "error",
"quotes": ["error", "single"],
"default-case": "error",
"eqeqeq": "error"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ module.exports = function override(config) {
// Provide alias to don't have duplicates of `react`
config.resolve.alias.react = path.resolve(process.cwd(), '.', 'node_modules', 'react');

// This will remove the CRA plugin that prevents to import modules from
// outside the `src` directory, useful for symlinks
config.resolve.plugins = config.resolve.plugins.filter(
(p) => p.constructor.name !== 'ModuleScopePlugin'
);

return config;
};
Loading

0 comments on commit 346311c

Please sign in to comment.