Skip to content

Commit

Permalink
[beam] update beam with Vite + Histoire + TS (#103)
Browse files Browse the repository at this point in the history
* chore: update vitest dependencies

* chore: add change logs

* feat: update beam with Vite + Histoire + TS

* fix: beam story

---------

Co-authored-by: Rohan Bansal <[email protected]>
  • Loading branch information
Alchez and Rohan Bansal authored Apr 23, 2024
1 parent 34e6024 commit ae90c64
Show file tree
Hide file tree
Showing 71 changed files with 1,228 additions and 6,640 deletions.
8 changes: 4 additions & 4 deletions aform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stonecrop/aform",
"version": "0.2.5",
"version": "0.2.6",
"license": "MIT",
"type": "module",
"author": {
Expand Down Expand Up @@ -52,8 +52,8 @@
"@histoire/plugin-vue": "^0.17.17",
"@stonecrop/atable": "workspace:*",
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^1.5.0",
"@vitest/ui": "^1.5.0",
Expand All @@ -64,7 +64,7 @@
"eslint-plugin-vue": "^9.11.1",
"histoire": "^0.17.17",
"jsdom": "^22.0.0",
"typescript": "^5.0.4",
"typescript": "^5.4.5",
"vite": "^5.2.9",
"vitest": "^1.5.0",
"vue-router": "^4"
Expand Down
1 change: 1 addition & 0 deletions aform/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default defineConfig({
branches: 70,
functions: 70,
statements: 70,
autoUpdate: true,
},
// required for Github Actions CI
reporter: ['text', 'json-summary', 'json'],
Expand Down
8 changes: 4 additions & 4 deletions atable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stonecrop/atable",
"version": "0.2.5",
"version": "0.2.6",
"license": "MIT",
"type": "module",
"author": {
Expand Down Expand Up @@ -52,8 +52,8 @@
"@histoire/plugin-vue": "^0.17.17",
"@stonecrop/aform": "workspace:*",
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^1.5.0",
"@vitest/ui": "^1.5.0",
Expand All @@ -64,7 +64,7 @@
"eslint-plugin-vue": "^9.11.1",
"histoire": "^0.17.17",
"jsdom": "^22.0.0",
"typescript": "^5.0.4",
"typescript": "^5.4.5",
"vite": "^5.2.9",
"vitest": "^1.5.0",
"vue-router": "^4"
Expand Down
1 change: 1 addition & 0 deletions atable/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default defineConfig({
branches: 70,
functions: 70,
statements: 70,
autoUpdate: true,
},
// required for Github Actions CI
reporter: ['text', 'json-summary', 'json'],
Expand Down
3 changes: 3 additions & 0 deletions beam/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
node_modules
.eslintrc.cjs
65 changes: 65 additions & 0 deletions beam/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
module.exports = {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
// Remove this if you have a higher level ESLint config file (it usually happens into a monorepos)
root: true,

// https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
// Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
// `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
parser: require.resolve('@typescript-eslint/parser'),
extraFileExtensions: ['.vue'],
},

// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
'eslint:recommended',

// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
// ESLint typescript rules
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

// https://github.com/prettier/eslint-config-prettier#installation
// usage with Prettier, provided by 'eslint-config-prettier'.
'prettier',
],

plugins: [
// required to apply rules which need type information
'@typescript-eslint',

// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue',

// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
// Prettier has not been included as plugin to avoid performance impact
// add it as an extension for your IDE
],

// add your custom rules here
rules: {
'no-console': 2,
'prefer-promise-reject-errors': 'off',
quotes: ['warn', 'single', { avoidEscape: true }],
'vue/multi-word-component-names': 'off',
'vue/no-deprecated-slot-attribute': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
},

ignorePatterns: ['.eslintrc.cjs', '*.config.ts', 'node_modules/', 'dist/'],
}
226 changes: 0 additions & 226 deletions beam/dev/Dev.vue

This file was deleted.

9 changes: 0 additions & 9 deletions beam/dev/dev.js

This file was deleted.

12 changes: 0 additions & 12 deletions beam/dev/index.html

This file was deleted.

1 change: 0 additions & 1 deletion beam/dev/theme.css

This file was deleted.

1 change: 1 addition & 0 deletions beam/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="@histoire/plugin-vue/components" />
Loading

0 comments on commit ae90c64

Please sign in to comment.