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

fix(package.json): upgrade storybook, eslint, vitest #285

Merged
merged 6 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions packages/vlossom/.eslintignore

This file was deleted.

88 changes: 0 additions & 88 deletions packages/vlossom/.eslintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/vlossom/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@ const config: StorybookConfig = {
name: getAbsolutePath('@storybook/vue3-vite'),
options: {},
},
docs: {
autodocs: 'tag',
},
};
export default config;
2 changes: 2 additions & 0 deletions packages/vlossom/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ const preview: Preview = {
},
},
},

decorators,
tags: ['autodocs'],
};

export default preview;
82 changes: 82 additions & 0 deletions packages/vlossom/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';

export default [
{ files: ['**/*.{js,mjs,cjs,ts,vue}'] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/essential'],
{ files: ['**/*.vue'], languageOptions: { parserOptions: { parser: tseslint.parser } } },
{ ignores: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/coverage/**', 'visualizer.html'] },
{
rules: {
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error', { before: false, after: true }],
semi: ['error', 'always'],
'no-extra-semi': 'error',
indent: ['error', 4, { SwitchCase: 1 }],
quotes: [
'error',
'single',
{
avoidEscape: true,
},
],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'computed-property-spacing': ['error', 'never'],
'no-trailing-spaces': 'error',
'array-element-newline': ['error', 'consistent'],
'arrow-parens': ['error', 'always'],
'space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'key-spacing': [
'error',
{
beforeColon: false,
afterColon: true,
},
],
'max-len': [
'warn',
{
code: 120,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignorePattern: '(d="([\\s\\S]*?)")|(<.+)',
ignoreRegExpLiterals: true,
},
],
curly: 'error',
'brace-style': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-multiple-empty-lines': 'error',
'no-var': 'error',
'no-with': 'error',
'one-var': ['error', 'never'],
'no-empty': 'error',
'no-cond-assign': ['error', 'always'],
'eol-last': ['error', 'always'],
'no-shadow': 'off',
'no-prototype-builtins': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
},
},
];
Loading