Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nemo-shen committed Jan 13, 2024
1 parent 3870e03 commit ac6b0b8
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 15 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
src
node_modules
dist
.eslint*
.eslint*

README.md
9 changes: 8 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
},
plugins: ['vue', '@typescript-eslint', 'markdown'],
rules: {
'import/prefer-default-export': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'import/no-extraneous-dependencies': [
'error',
Expand All @@ -30,11 +31,17 @@ module.exports = {
settings: {
'import/resolver': {
node: {
extensions: ['.ts'],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'],
},
},
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parserOptions: {
project: ['./tsconfig.json'],
},
},
{
files: ['*.md'],
processor: 'markdown/markdown',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"preview": "vite preview",
"test": "vitest",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"format": "prettier -w ."
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged"
Expand Down
2 changes: 2 additions & 0 deletions packages/core/useToast/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ const { open } = useToast()
open()

```;
```
10 changes: 5 additions & 5 deletions packages/core/useToast/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, test } from 'vitest';
import { useToast } from '@noi/core';
import { expect, test } from 'vitest'
import { useToast } from '@noi/core'

test('should be call', () => {
const { open } = useToast();
expect(open).toBeTypeOf('function');
});
const { open } = useToast()
expect(open).toBeTypeOf('function')
})
3 changes: 3 additions & 0 deletions packages/core/useToast/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { useToast } from './useToast'

export { useToast }
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const createInstance = () => {
message.value = options
} else if (options.content) {
message.value = options.content
console.log('message', message.value)
}
}
const close = () => {
Expand All @@ -48,8 +47,6 @@ const getInstance = () => {
return stack.values().next().value
}

export const unuse = () => {}

/**
* ```js
* mountRootComponent({ setup() {} })
Expand All @@ -73,4 +70,4 @@ export const useToast = (_options: UseToastOptions = {}) => {
open,
close,
}
}
}
2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- 'packages/*'
- '!**/test/**'
- '!**/test/**'
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@noi/core": ["./packages/core/index.ts"],
"@noi/core": ["./packages/core/index.ts"]
}
}
}
}

0 comments on commit ac6b0b8

Please sign in to comment.