Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: updated eslint devDepencencies #1306

Draft
wants to merge 105 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 100 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
26db979
Merge pull request #1 from pattern-lab/dev
mfranzke Apr 24, 2020
7812878
Merge pull request #2 from pattern-lab/dev
mfranzke Apr 25, 2020
271dc8d
chore(docs): some typos
Apr 25, 2020
ccdf238
Revert "Merge pull request #2 from pattern-lab/dev"
Apr 25, 2020
4c2070f
Revert "Merge pull request #1 from pattern-lab/dev"
Apr 25, 2020
117ca22
Revert "chore(docs): some typos"
Apr 25, 2020
4f5bff6
Merge remote-tracking branch 'upstream/dev' into dev
Apr 28, 2020
73df9d3
Merge remote-tracking branch 'upstream/dev' into dev
Apr 30, 2020
9115c17
Merge remote-tracking branch 'upstream/dev' into dev
May 2, 2020
e86272f
Merge remote-tracking branch 'upstream/dev' into dev
May 8, 2020
a243f5d
Merge remote-tracking branch 'upstream/dev' into dev
May 11, 2020
3238ac7
Merge remote-tracking branch 'upstream/dev' into dev
May 23, 2020
7f4ba39
Merge remote-tracking branch 'upstream/dev' into dev
Jun 11, 2020
f7b514b
Merge remote-tracking branch 'upstream/dev' into dev
Jun 13, 2020
37f9749
Merge remote-tracking branch 'upstream/dev' into dev
Jun 28, 2020
572afec
Merge branch 'dev' of https://github.com/mfranzke/patternlab-node int…
Jun 28, 2020
e4a5245
Merge remote-tracking branch 'upstream/dev' into dev
Sep 6, 2020
4aa9366
Merge remote-tracking branch 'upstream/dev' into dev
Sep 11, 2020
155c253
Merge remote-tracking branch 'upstream/dev' into dev
Oct 11, 2020
3b95604
Merge remote-tracking branch 'upstream/dev' into dev
Jan 12, 2021
6b4a6fb
Merge remote-tracking branch 'upstream/dev' into dev
Feb 5, 2021
6431987
Merge remote-tracking branch 'upstream/dev' into dev
Feb 20, 2021
d486051
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Mar 23, 2021
be17657
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Mar 24, 2021
6c18bdc
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Mar 26, 2021
2e802d6
refactor(eslint): moved configuration to external file
mfranzke Mar 28, 2021
f13c69a
refactor: updated eslint dependency to version 6.8.0
mfranzke Mar 28, 2021
e77cd03
refactor: updated eslint-plugin-import dependency
mfranzke Mar 28, 2021
c352ce9
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Mar 28, 2021
99dfe5f
refactor: updated eslint-config-airbnb-base dependency
mfranzke Mar 28, 2021
4e8ab16
Merge branch 'refactor-updated-depencencies-eslint' of https://github…
mfranzke Mar 28, 2021
5584d12
build: regenerated yarn.lock file
mfranzke Mar 28, 2021
b52e833
test(lint): integrated code formatting feedback
mfranzke Mar 28, 2021
3f08102
test(lint): integrated code formatting feedback
mfranzke Mar 28, 2021
84a3bbc
refactor(eslint): added necessary additional plugin
mfranzke Mar 28, 2021
e20aca5
refactor: updated eslint dependency to version 7.23.0
mfranzke Mar 28, 2021
d1883eb
refactor(eslint): replaced babel-eslint by @babel/eslint-parser
mfranzke Mar 28, 2021
239a2b3
Revert "refactor(eslint): replaced babel-eslint by @babel/eslint-parser"
mfranzke Mar 28, 2021
0a856f7
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Mar 28, 2021
46eb7dc
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Mar 29, 2021
f75705f
chore: removed duplicate object key
mfranzke Apr 3, 2021
6e333ad
chore: updated prettier to the least compatible version
mfranzke Apr 3, 2021
77238e7
refactor: updated eslint-plugin-prettier dependency to version 3.3.1
mfranzke Apr 3, 2021
e4cf179
refactor: updated eslint-config-prettier dependency to version 8.1.0
mfranzke Apr 3, 2021
250620a
refactor: using the recommended prettier settings
mfranzke Apr 3, 2021
67d70c9
refactor: replaced babel-eslint by @babel/eslint-parser and added the…
mfranzke Apr 3, 2021
8cba4a3
refactor: added relevant babel modules to the root package as well
mfranzke Apr 5, 2021
ed5c10c
chore: made some final adjustments
mfranzke Apr 5, 2021
819a9d4
refactor: this was previously deleted
mfranzke Apr 5, 2021
25f7628
refactor(babel): enabling eslint and babel config
mfranzke Apr 5, 2021
a456d97
docs(contributing): corrected the filename
mfranzke Apr 5, 2021
0f22311
refactor(babel): added necessary plugin entries to babel config
mfranzke Apr 5, 2021
13b014f
refactor: updated @babel/eslint-plugin dependency to version 7.13.15
mfranzke Apr 10, 2021
44a4460
refactor: updated eslint dependency to version 7.24.0
mfranzke Apr 10, 2021
239b1d1
Merge branch 'dev' into pr/1306
JosefBredereck Apr 17, 2021
90a2074
#1306: Regenerate yarn.lock
JosefBredereck Apr 17, 2021
ce0dedd
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Apr 18, 2021
7584b93
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Apr 18, 2021
2dc4ce1
build: regenerated yarn.lock file
mfranzke Apr 18, 2021
e536cb2
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke May 17, 2021
0869a50
Merge remote-tracking branch 'upstream/dev' into refactor-updated-dep…
mfranzke May 17, 2021
309138d
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke May 19, 2021
97543d4
Merge branch 'dev' into refactor-updated-depencencies-eslint
JosefBredereck Jun 9, 2021
f4fd4dd
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Jun 12, 2021
fa140cf
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Jun 24, 2021
2a15f56
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Aug 7, 2021
9b60cf2
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Aug 30, 2021
51c1d00
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Oct 3, 2021
4617540
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Oct 5, 2021
5ffb32a
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Oct 5, 2021
688ced6
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Oct 5, 2021
f9e5b0e
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Oct 5, 2021
e3524db
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Oct 6, 2021
5426328
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Oct 7, 2021
ced1a85
build: regenerated yarn.lock file
mfranzke Oct 7, 2021
20d3573
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Oct 16, 2021
47d0fad
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Nov 3, 2021
fbf5f46
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Nov 10, 2021
a5a5166
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Nov 13, 2021
da469b9
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Nov 21, 2021
82a52f0
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Nov 21, 2021
8249a87
Merge remote-tracking branch 'upstream/dev' into dev
mfranzke Nov 22, 2021
9e3ffc6
chore: code optimizations
mfranzke Nov 23, 2021
e75fb79
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Nov 23, 2021
0593efe
chore: rebuild yarn.lock file
mfranzke Nov 24, 2021
0b380a1
chore: rebuild yarn.lock file
mfranzke Nov 24, 2021
157a78c
chore: formatting
mfranzke Dec 14, 2021
7a748ff
Merge remote-tracking branch 'upstream/dev' into refactor-updated-dep…
mfranzke Dec 14, 2021
b671804
build: regenerated yarn.lock
mfranzke Dec 14, 2021
c691cc2
Merge remote-tracking branch 'upstream/dev' into refactor-updated-dep…
mfranzke Jan 23, 2022
7b75735
build: regenerated yarn.lock file
mfranzke Jan 23, 2022
41f4ae7
refactor: updated eslint to its latest 7.x minor version
mfranzke Jan 23, 2022
9bde632
Merge remote-tracking branch 'upstream/dev' into refactor-updated-dep…
mfranzke Jan 29, 2022
2e6cafa
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Jan 30, 2022
9173c1b
fix: this wasn't meant to get checked in like this
mfranzke Jan 30, 2022
ea18664
fix: this wasn't meant to get checked in like this
mfranzke Jan 30, 2022
3fb60d3
Merge branch 'dev' into refactor-updated-depencencies-eslint
JosefBredereck Sep 21, 2022
a85cf4b
Merge remote-tracking branch 'upstream/dev' into refactor-updated-dep…
mfranzke Dec 31, 2022
4138cb2
chore: regenerated yarn.lock
mfranzke Jan 1, 2023
d2722a4
Merge branch 'dev' into refactor-updated-depencencies-eslint
JosefBredereck Jan 7, 2023
66bfaec
Merge remote-tracking branch 'upstream/dev' into refactor-updated-dep…
mfranzke Jan 8, 2023
da6da4d
chore: regenerated yarn.lock
mfranzke Jan 8, 2023
b14290f
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Jan 9, 2023
29444dc
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Jan 14, 2023
8198b2e
Merge branch 'dev' into refactor-updated-depencencies-eslint
mfranzke Jan 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = {
es6: true,
browser: true,
},
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
// TODO: Check for "Note: The parserOptions described in the official documentation are for the default parser and are not necessarily supported by @babel/eslint-parser. Please see the section directly below for supported parserOptions.": https://www.npmjs.com/package/@babel/eslint-parser
parserOptions: {
Copy link
Contributor Author

@mfranzke mfranzke Apr 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for "Note: The parserOptions described in the official documentation are for the default parser and are not necessarily supported by @babel/eslint-parser. Please see the section directly below for supported parserOptions.": https://www.npmjs.com/package/@babel/eslint-parser

ecmaVersion: 2018,
sourceType: 'module',
Expand All @@ -17,8 +18,9 @@ module.exports = {
},
},
globals: {},
plugins: ['prettier'],
extends: ['eslint-config-prettier'].map(require.resolve),
plugins: ['@babel', 'prettier'],
extends: ['plugin:prettier/recommended'],
// TODO: Check for "ESLint rules relating to code formatting", compare to "This plugin works best if you disable all other ESLint rules relating to code formatting, and only enable rules that detect potential bugs. (If another active ESLint rule disagrees with prettier about how code should be formatted, it will be impossible to avoid lint errors.)", source: https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
rules: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for "ESLint rules relating to code formatting", compare to "This plugin works best if you disable all other ESLint rules relating to code formatting, and only enable rules that detect potential bugs. (If another active ESLint rule disagrees with prettier about how code should be formatted, it will be impossible to avoid lint errors.) You can use eslint-config-prettier to disable all formatting-related ESLint rules.", source: https://github.com/prettier/eslint-plugin-prettier#recommended-configuration

'prettier/prettier': 'error',
'block-scoped-var': 0,
Expand All @@ -27,7 +29,7 @@ module.exports = {
curly: [2, 'all'],
'dot-notation': [1, { allowKeywords: true }],
eqeqeq: [2, 'allow-null'],
'global-strict': [0, 'never'],
'strict': [0, 'never'],
'guard-for-in': 2,
'key-spacing': 0,
'new-cap': 0,
Expand All @@ -49,9 +51,9 @@ module.exports = {
'no-irregular-whitespace': 1,
'no-iterator': 2,
'no-loop-func': 2,
'no-mixed-requires': 0,
'node/no-mixed-requires': 0,
'no-multi-str': 2,
'no-native-reassign': 2,
'no-global-assign': 2,
'no-new': 2,
'no-param-reassign': 1,
'no-proto': 2,
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ module.exports = {
],
],
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
/**
* 1. Helps with our Web Component Preact renderer
*/
Expand Down
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@
},
"dependencies": {
"@auto-it/released": "^10.27.0",
"@babel/core": "^7.13.14",
"@babel/eslint-parser": "^7.13.14",
"@babel/eslint-plugin": "^7.13.15",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-decorators": "^7.13.5",
"@babel/plugin-syntax-jsx": "^7.12.13",
"@babel/plugin-transform-react-jsx": "^7.13.12",
"@babel/preset-env": "^7.13.12",
"auto": "^10.27.0",
"babel-eslint": "^10.0.2",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"lerna": "4.0.0",
"prettier": "^2.8.1",
"pretty-quick": "^3.1.3"
Expand Down
1 change: 1 addition & 0 deletions packages/cli/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": "../../babel.config.js" }
3 changes: 2 additions & 1 deletion packages/cli/bin/inquiries/starterkit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const starterkitSetup = [
message: 'What initial patterns do you want included in your project?',
choices: [
{
name: 'Handlebars base patterns (some basic patterns to get started with)',
name:
'Handlebars base patterns (some basic patterns to get started with)',
value: '@pattern-lab/starterkit-handlebars-vanilla',
},
{
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/bin/scaffold.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
const path = require('path');
const execa = require('execa');
const fs = require('fs-extra');
const fs = require('fs');
const wrapAsync = require('./utils').wrapAsync;
const mkdirsAsync = require('./utils').mkdirsAsync;

Expand All @@ -18,7 +18,6 @@ const scaffold = (projectDir, sourceDir, publicDir, exportDir) =>
wrapAsync(function* () {
const projectPath = path.join(process.cwd(), projectDir);
if (!fs.existsSync(path.join(projectPath, 'package.json'))) {
fs.ensureDirSync(projectPath);
execa.sync('npm', ['init', '-y'], {
cwd: projectPath,
});
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
},
"devDependencies": {
"dos2unix-cli": "^1.0.1",
"eslint": "4.18.2",
"eslint-config-prettier": "2.9.0",
"eslint-plugin-prettier": "2.6.0",
"eslint": "7.32.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-prettier": "3.3.1",
"prettier": "2.8.1",
"proxyquire": "2.1.3",
"tap": "14.11.0"
Expand Down
1 change: 1 addition & 0 deletions packages/core/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": "../../babel.config.js" }
3 changes: 0 additions & 3 deletions packages/core/.eslintrc.js

This file was deleted.

9 changes: 5 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
},
"devDependencies": {
"@babel/core": "^7.13.14",
"@babel/eslint-parser": "^7.13.14",
"@babel/eslint-plugin": "^7.13.15",
"@babel/plugin-proposal-decorators": "^7.13.5",
"@babel/plugin-syntax-jsx": "^7.12.13",
"babel-eslint": "^10.0.2",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.3.1",
"jsdoc-to-markdown": "6.0.1",
"prettier": "^2.8.1",
"rewire": "2.5.2",
Expand Down
24 changes: 0 additions & 24 deletions packages/core/src/lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,6 @@ const server = (patternlab) => {
patternlab.config.paths.public.root
)
);
defaults.assets = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is an old PR which is still WIP, but could you elaborate why this gets removed when the PR only is about ESLint changes?

path.resolve(
path.join(
process.cwd(),
patternlab.config.paths.source.js,
'**',
'*.js' // prevent preprocessors like typescript from reloading
)
),
path.resolve(
path.join(process.cwd(), patternlab.config.paths.source.images)
),
path.resolve(
path.join(process.cwd(), patternlab.config.paths.source.fonts)
),
path.resolve(
path.join(
process.cwd(),
patternlab.config.paths.source.css,
'**',
'*.css' // prevent preprocessors from reloading
)
),
];

// allow for overrides should they exist inside patternlab-config.json
const liveServerConfig = Object.assign(
Expand Down
3 changes: 2 additions & 1 deletion packages/core/test/files/_meta/_head.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
{{{ patternLabHead }}}
<!-- End Pattern Lab -->
</head>
<body class="{{ bodyClass }}">
<body class="{{ bodyClass }}"></body>
</html>
mfranzke marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 3 additions & 2 deletions packages/core/test/pattern_engines_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ var engineNames = Object.keys(patternEngines);
tap.test(
'getEngineNameForPattern returns "mustache" from test pattern',
function (test) {
var engineName =
patternEngines.getEngineNameForPattern(mustacheTestPattern);
var engineName = patternEngines.getEngineNameForPattern(
mustacheTestPattern
);
test.equal(engineName, 'mustache');
test.end();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
{{{ patternLabHead }}}
<!-- End Pattern Lab -->
</head>
<body class="{{ bodyClass }}">
<body class="{{ bodyClass }}"></body>
</html>
1 change: 0 additions & 1 deletion packages/edition-node-gulp/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function serve() {
return patternlab.server
.serve({
cleanPublic: config.cleanPublic,
watch: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same goes for the removal of this line

})
.then(() => {
// do something else when this promise resolves
Expand Down
14 changes: 14 additions & 0 deletions packages/live-server/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
env: {
node: true,
},
rules: {
quotes: 0,
curly: 0,
strict: 0,
'node/no-process-exit': 0,
eqeqeq: 1,
'no-unused-vars': 1,
'no-shadow': 1,
},
};
16 changes: 1 addition & 15 deletions packages/live-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"serve-index": "1.9.1"
},
"devDependencies": {
"eslint": "4.18.2",
"eslint": "7.32.0",
"jshint": "2.12.0",
"mocha": "4.0.1",
"supertest": "3.0.0"
Expand All @@ -51,19 +51,5 @@
},
"preferGlobal": true,
"license": "MIT",
"eslintConfig": {
"env": {
"node": true
},
"rules": {
"quotes": 0,
"curly": 0,
"strict": 0,
"no-process-exit": 0,
"eqeqeq": 1,
"no-unused-vars": 1,
"no-shadow": 1
}
},
"gitHead": "80f62be442223e09bafb30d0529cbd768e03f2ac"
}
2 changes: 1 addition & 1 deletion packages/plugin-tab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"license": "MIT",
"homepage": "https://github.com/pattern-lab/patternlab-node/tree/master/packages/plugin-tab",
"devDependencies": {
"eslint": "4.18.2"
"eslint": "7.32.0"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 1 addition & 0 deletions packages/uikit-workshop/src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

<!-- the template for the modal slider -->
<script type="text/x-handlebars-template" class="pl-js-panel-template-base">

${require('./partials/base-template.html') }
</script>

Expand Down
40 changes: 22 additions & 18 deletions packages/uikit-workshop/src/scripts/actions/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ export const UPDATE_CURRENT_URL = 'UPDATE_CURRENT_URL';
export const UPDATE_CURRENT_PATTERN = 'UPDATE_CURRENT_PATTERN';
export const IS_VIEWALL_PAGE = 'IS_VIEWALL_PAGE';

export const updateCurrentPattern =
(currentPattern) => (dispatch, getState) => {
if (getState().app.currentPattern !== currentPattern) {
dispatch({
type: UPDATE_CURRENT_PATTERN,
currentPattern,
});
}
};
export const updateCurrentPattern = (currentPattern) => (
dispatch,
getState
) => {
if (getState().app.currentPattern !== currentPattern) {
dispatch({
type: UPDATE_CURRENT_PATTERN,
currentPattern,
});
}
};

export const updateCurrentUrl = (currentUrl) => (dispatch, getState) => {
if (getState().app.currentUrl !== currentUrl) {
Expand Down Expand Up @@ -73,15 +75,17 @@ export const updateDrawerState = (opened) => (dispatch, getState) => {
}
};

export const updateDrawerAnimationState =
(drawerIsAnimating) => (dispatch, getState) => {
if (getState().app.drawerIsAnimating !== drawerIsAnimating) {
dispatch({
type: UPDATE_DRAWER_ANIMATION_STATE,
drawerIsAnimating,
});
}
};
export const updateDrawerAnimationState = (drawerIsAnimating) => (
dispatch,
getState
) => {
if (getState().app.drawerIsAnimating !== drawerIsAnimating) {
dispatch({
type: UPDATE_DRAWER_ANIMATION_STATE,
drawerIsAnimating,
});
}
};

export const updateDrawerHeight = (height) => (dispatch, getState) => {
if (getState().app.drawerHeight !== height) {
Expand Down
1 change: 1 addition & 0 deletions packages/uikit-workshop/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module.exports = function (apiConfig) {
],
],
plugins: [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand, we should even also be able to move those to the babel.config.js in root, to align both linting and building here

// TODO: From what I understand, we should even also be able to move those to the babel.config.js in root, to align both linting and building here
'@babel/plugin-proposal-optional-chaining',
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
Expand Down
Loading