Skip to content

Commit 2948a1d

Browse files
authored
bugfix: wrong loading methods order (#37)
1 parent 21d628c commit 2948a1d

File tree

5 files changed

+29
-15
lines changed

5 files changed

+29
-15
lines changed

.eslintrc.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,27 @@
55

66
module.exports = {
77
env: {
8+
browser: true,
89
es6: true,
910
node: true,
1011
},
11-
parser: 'babel-eslint',
12+
parser: '@babel/eslint-parser',
1213
parserOptions: {
1314
sourceType: 'module',
1415
allowImportExportEverywhere: false,
16+
requireConfigFile: false,
17+
ecmaFeatures: {
18+
jsx: true,
19+
modules: true,
20+
},
1521
},
16-
plugins: ['notice', 'prettier'],
22+
plugins: ['react', 'react-hooks', 'notice', 'prettier'],
1723
extends: ['airbnb', 'prettier'],
24+
settings: {
25+
react: {
26+
version: '17.0.2',
27+
},
28+
},
1829
rules: {
1930
'prettier/prettier': [
2031
'error',

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ergonode/vuems",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"description": "A simple mechanism to transform a monolithic Vue application into an application based on Micro Services architecture.",
55
"author": "Bletek Piotr <p.bletek@gmail.com>",
66
"license": "OSL-3.0",
@@ -49,17 +49,18 @@
4949
"recursive-readdir-async": "^1.2.0"
5050
},
5151
"devDependencies": {
52+
"@babel/core": "^7.16.7",
53+
"@babel/eslint-parser": "^7.16.5",
5254
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
53-
"babel-eslint": "^10.1.0",
5455
"babel-plugin-dynamic-import-node": "^2.3.3",
55-
"eslint": "^8.4.0",
56-
"eslint-config-airbnb": "^19.0.2",
56+
"eslint": "^8.6.0",
57+
"eslint-config-airbnb": "^19.0.4",
5758
"eslint-config-prettier": "^8.3.0",
58-
"eslint-plugin-import": "^2.25.3",
59+
"eslint-plugin-import": "^2.25.4",
5960
"eslint-plugin-jsx-a11y": "^6.5.1",
6061
"eslint-plugin-notice": "^0.9.10",
6162
"eslint-plugin-prettier": "^4.0.0",
62-
"eslint-plugin-react": "^7.27.1",
63+
"eslint-plugin-react": "^7.28.0",
6364
"eslint-plugin-react-hooks": "^4.3.0",
6465
"prettier": "^2.5.1"
6566
}

src/helpers/tools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import { resolve as resolvePath, join as joinPath } from 'path';
7-
import { list } from 'recursive-readdir-async'
7+
import { list } from 'recursive-readdir-async';
88
import { existsSync, remove, ensureSymlink, chmod } from 'fs-extra';
99
import { success } from 'consola';
1010
import { DEFAULTS, DIRECTORIES } from './constants';

src/utils/beforeAll.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ function checkRequiredModules({ allModules, required }) {
9494
*/
9595
export default async function beforeModules({ options }) {
9696
const { verbose } = options;
97-
const logs = await Promise.all([
98-
symlinksCreator(options),
99-
checkDirectories(options),
100-
checkRequiredModules(options),
101-
]);
97+
const logs = [];
98+
99+
logs.push(await symlinksCreator(options));
100+
logs.push(await checkDirectories(options));
101+
logs.push(await checkRequiredModules(options));
102102

103103
if (verbose) {
104104
log({

src/utils/initModules.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import { DEFAULT_ORDER } from '../helpers/constants';
1717
function loadModules({ modules, options, configurations }) {
1818
const setOrder = (data) => ({
1919
...data,
20-
order: configurations.find((m) => m.name === data.name).order || DEFAULT_ORDER,
20+
order:
21+
configurations.find((m) => m.name === data.name).order ||
22+
DEFAULT_ORDER,
2123
});
2224
const sortByOrder = (a, b) => a.order - b.order;
2325
const loadModule = async ({ name, path }) => {

0 commit comments

Comments
 (0)