Skip to content

Commit

Permalink
chore: lint ok.
Browse files Browse the repository at this point in the history
  • Loading branch information
lvjiaxuan committed Feb 21, 2024
1 parent bec3dbc commit b3f5e55
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release and Publish
name: Release and Publish

on:
push:
Expand All @@ -17,4 +17,4 @@ jobs:
uses: lvjiaxuan/github-action-templates/.github/workflows/lvr-publish.yml@main
with:
sync_cnpm: true
secrets: inherit
secrets: inherit
41 changes: 40 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
{
"eslint.experimental.useFlatConfig": true
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml"
]
}
2 changes: 1 addition & 1 deletion playgrounds/vue2/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "vue2.7",
"type": "module",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "nr type-check && nr build-only",
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/vue2/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ options.immediate.value = sessionStorage.getItem('immediate') === 'true'
text-center
mb5
>
<number-roll
<NumberRoll
ref="numberRollRef"
:start="options.start.value"
:end="options.end.value"
Expand Down
1 change: 1 addition & 0 deletions playgrounds/vue2/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import App from './App.vue'
import 'virtual:uno.css'
import '@unocss/reset/normalize.css'

// eslint-disable-next-line ts/no-unsafe-argument
new Vue({ render: h => h(App) }).$mount('#app')
3 changes: 0 additions & 3 deletions playgrounds/vue2/tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion playgrounds/vue3/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue3",
"version": "0.0.0",
"type": "module",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
Expand Down
11 changes: 5 additions & 6 deletions playgrounds/vue3/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<script setup lang="ts">
import { reactive, ref, version, watch, defineAsyncComponent } from 'vue'
import { defineAsyncComponent, reactive, ref, version, watch } from 'vue'
const NumberRoll = defineAsyncComponent(() => {
if(import.meta.env.DEV) {
console.log('hi')
if (import.meta.env.DEV) {
import('./../../../dist/index.css')
return import('./../../../src')
} else {
}
else {
return import('vue-number-roll')
}
})
Expand Down Expand Up @@ -87,7 +86,7 @@ options.immediate.value = sessionStorage.getItem('immediate') === 'true'
text-center
mb5
>
<number-roll
<NumberRoll
ref="numberRollRef"
:start="options.start.value"
:end="options.end.value"
Expand Down
1 change: 1 addition & 0 deletions playgrounds/vue3/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import App from './App.vue'
import 'virtual:uno.css'
import '@unocss/reset/normalize.css'

// eslint-disable-next-line ts/no-unsafe-argument
createApp(App).mount('#app')
3 changes: 0 additions & 3 deletions playgrounds/vue3/tsconfig.json

This file was deleted.

5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"extends": "@vue/tsconfig/tsconfig.json",
"compilerOptions": {
"lib": ["ESNext", "DOM", "DOM.Iterable"]
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"baseUrl": "."
},
"references": [
{
"path": "./tsconfig.node.json"
}
],
"include": ["playgrounds/**/*.ts", "playgrounds/**/*.vue", "src/*.ts"]
"include": ["playgrounds/**/*.ts", "playgrounds/**/*.vue", "src/**/*.ts"]
}
6 changes: 4 additions & 2 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "@tsconfig/node18/tsconfig.json",
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"composite": true,
"module": "ESNext",
"types": ["node"]
"moduleResolution": "Bundler",
"types": ["node"],
"noEmit": true
},
"include": ["**/*.config.ts"]
}

0 comments on commit b3f5e55

Please sign in to comment.