Skip to content

Commit

Permalink
feat: update beam with Vite + Histoire + TS
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Bansal committed Apr 12, 2024
1 parent e743095 commit 9286a6a
Show file tree
Hide file tree
Showing 62 changed files with 1,421 additions and 1,005 deletions.
8 changes: 4 additions & 4 deletions aform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"@agritheory/themes": "workspace:*",
"@agritheory/utilities": "workspace:*",
"uuid": "^9.0.0",
"vue": "^3.2.47"
"vue": "^3.4.21"
},
"devDependencies": {
"@agritheory/atable": "workspace:*",
"@histoire/plugin-vue": "^0.17.17",
"@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": "^4.2.1",
"@vitest/coverage-v8": "^1.5.0",
"@vitest/ui": "^1.5.0",
Expand All @@ -51,7 +51,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.8",
"vitest": "^1.5.0",
"vue-router": "^4"
Expand Down
12 changes: 8 additions & 4 deletions aform/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ export default defineConfig({
globals: true,
environment: 'jsdom',
coverage: {
lines: 50,
branches: 50,
functions: 50,
statements: 50,
provider: 'v8',
thresholds: {
lines: 50,
branches: 50,
functions: 50,
statements: 50,
autoUpdate: true,
},
// required for Github Actions CI
reporter: ['text', 'json-summary', 'json'],
reportsDirectory: './coverage',
Expand Down
8 changes: 4 additions & 4 deletions atable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"@agritheory/themes": "workspace:*",
"@agritheory/utilities": "workspace:*",
"uuid": "^9.0.0",
"vue": "^3.2.47"
"vue": "^3.4.21"
},
"devDependencies": {
"@agritheory/aform": "workspace:*",
"@histoire/plugin-vue": "^0.17.17",
"@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": "^4.2.1",
"@vitest/coverage-v8": "^1.5.0",
"@vitest/ui": "^1.5.0",
Expand All @@ -51,7 +51,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.8",
"vitest": "^1.5.0",
"vue-router": "^4"
Expand Down
12 changes: 8 additions & 4 deletions atable/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ export default defineConfig({
globals: true,
environment: 'jsdom',
coverage: {
lines: 10,
branches: 10,
functions: 10,
statements: 10,
provider: 'v8',
thresholds: {
lines: 80,
branches: 80,
functions: 80,
statements: 80,
autoUpdate: true,
},
// required for Github Actions CI
reporter: ['text', 'json-summary', 'json'],
reportsDirectory: './coverage',
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/'],
}
235 changes: 0 additions & 235 deletions beam/dev/Dev.vue

This file was deleted.

Loading

0 comments on commit 9286a6a

Please sign in to comment.