Skip to content

Commit 47b6992

Browse files
authored
Merge pull request #1 from jmgayosso/feature/storybook
Storybook added [webpack5]
2 parents 955fb01 + f963164 commit 47b6992

26 files changed

+64946
-1047
lines changed

.eslintrc.js

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,27 @@ module.exports = {
33
// This option interrupts the configuration hierarchy at this file
44
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
55
root: true,
6-
76
parserOptions: {
87
parser: '@babel/eslint-parser',
9-
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
8+
ecmaVersion: 2018,
9+
// Allows for the parsing of modern ECMAScript features
1010
sourceType: 'module' // Allows for the use of imports
11-
},
1211

12+
},
1313
env: {
1414
browser: true
1515
},
16-
1716
// Rules order is important, please avoid shuffling them
18-
extends: [
19-
// Base ESLint recommended rules
20-
// 'eslint:recommended',
21-
22-
23-
// Uncomment any of the lines below to choose desired strictness,
24-
// but leave only one uncommented!
25-
// See https://eslint.vuejs.org/rules/#available-rules
26-
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
27-
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
28-
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
29-
30-
// https://github.com/prettier/eslint-config-prettier#installation
31-
// usage with Prettier, provided by 'eslint-config-prettier'.
32-
'prettier'
17+
extends: ["plugin:vue/vue3-essential", "prettier", "plugin:storybook/recommended"],
18+
plugins: [// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
19+
// required to lint *.vue files
20+
'vue' // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
21+
// Prettier has not been included as plugin to avoid performance impact
22+
// add it as an extension for your IDE
3323
],
34-
35-
plugins: [
36-
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
37-
// required to lint *.vue files
38-
'vue',
39-
40-
// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
41-
// Prettier has not been included as plugin to avoid performance impact
42-
// add it as an extension for your IDE
43-
],
44-
4524
globals: {
46-
ga: 'readonly', // Google Analytics
25+
ga: 'readonly',
26+
// Google Analytics
4727
cordova: 'readonly',
4828
__statics: 'readonly',
4929
__QUASAR_SSR__: 'readonly',
@@ -54,13 +34,10 @@ module.exports = {
5434
Capacitor: 'readonly',
5535
chrome: 'readonly'
5636
},
57-
5837
// add your custom rules here
5938
rules: {
6039
'prefer-promise-reject-errors': 'off',
61-
62-
6340
// allow debugger during development only
6441
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
6542
}
66-
}
43+
};

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.DS_Store
2+
.thumbs.db
3+
node_modules
4+
5+
# Quasar core related directories
6+
.quasar
7+
/dist
8+
9+
# Cordova related directories and files
10+
/src-cordova/node_modules
11+
/src-cordova/platforms
12+
/src-cordova/plugins
13+
/src-cordova/www
14+
15+
# Capacitor related directories and files
16+
/src-capacitor/www
17+
/src-capacitor/node_modules
18+
19+
# BEX related directories and files
20+
/src-bex/www
21+
/src-bex/js/core
22+
23+
# Log files
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# Editor directories and files
29+
.idea
30+
*.suo
31+
*.ntvs*
32+
*.njsproj
33+
*.sln

.storybook/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
"stories": ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
3+
"addons": ["@storybook/addon-links", "@storybook/addon-essentials"],
4+
"framework": "@storybook/vue3",
5+
core: {
6+
builder: "webpack5"
7+
}
8+
};

.storybook/preview.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const parameters = {
2+
actions: { argTypesRegex: "^on[A-Z].*" },
3+
controls: {
4+
matchers: {
5+
color: /(background|color)$/i,
6+
date: /Date$/,
7+
},
8+
},
9+
}

0 commit comments

Comments
 (0)