Skip to content

Commit

Permalink
chore: chore: use eslint flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlu-zyl committed Apr 26, 2024
1 parent 3e8f33b commit ee78c15
Show file tree
Hide file tree
Showing 48 changed files with 1,018 additions and 1,379 deletions.
18 changes: 18 additions & 0 deletions .changeset/odd-olives-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@alanlu-dev/markdownlint-config": patch
"@alanlu-dev/eslint-config-flat": patch
"@alanlu-dev/lint-staged-config": patch
"@alanlu-dev/commitlint-config": patch
"@alanlu-dev/stylelint-config": patch
"@alanlu-dev/prettier-config": patch
"@alanlu-dev/notion-api-zod-schema": patch
"@alanlu-dev/mastercss-helpers": patch
"@alanlu-dev/tsconfig": patch
"@alanlu-dev/mastercss-config": patch
"@alanlu-dev/changeset": patch
"@alanlu-dev/nuxt-base": patch
"@alanlu-dev/types": patch
"@alanlu-dev/utils": patch
---

chore: use eslint flat config
4 changes: 0 additions & 4 deletions .eslintrc.cjs

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/.cspell/other.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ infile
jiti
multistep
noborder
noobserver
Noto
Overriden
preinstall
shellcheck
stroustrup
toggleable
typecheck
unref
wght
zod's
shellcheck
1 change: 1 addition & 0 deletions .vscode/.cspell/repo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Stylelint
stylelintrc
taze
toastify
tseslint
tsup
Turborepo
unplugin
Expand Down
5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
},

"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "html", "json", "jsonc", "yaml", "toml"],

// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": false,
"eslint.workingDirectories": [{ "pattern": "./apps/*" }, { "pattern": "./packages/*" }],
// "eslint.trace.server": "verbose",

// Silent the stylistic rules in you IDE, but still auto fix them
// "eslint.rules.customizations": [
Expand Down
11 changes: 0 additions & 11 deletions apps/nuxt-base/.eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions apps/nuxt-base/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const CSSRuntimeProvider = defineAsyncComponent(async () => (await import('@mast
<CSSRuntimeProvider :config="import('./master.css.mjs')">
<NuxtLoadingIndicator />
<NuxtPage />
<div class="bg:nuxt-base"></div>
</CSSRuntimeProvider>
</template>
1 change: 0 additions & 1 deletion apps/nuxt-base/components/Modal/ModalBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export interface IProps {
}
const localProps = computed(() => {
// eslint-disable-next-line unused-imports/no-unused-vars
const { header, content, footer, cancelText, confirmText, needCancel, modelValue, ...modalProps } = props
return {
modelValue: unref(modelValue),
Expand Down
4 changes: 2 additions & 2 deletions apps/nuxt-base/components/Quantity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ onUnmounted(() => {
<template>
<div tabindex="0" class="center-content flex rounded bg:white/.9 gap:4x" :class="{ show: isOpen, max: qty === maxQty }" @click="open" @onblur="done">
<div class="quantity-minus center-content flex pointer round b:2|G-30 bg:white f:md fg:G-30 size:8x" :class="{ 'hidden!': !isOpen, 'flex': isOpen }" @click="tryDecreaseQty">
<iconify-icon icon="ic:round-minus" size="18" />
<iconify-icon icon="ic:round-minus" size="18" noobserver />
</div>
<div class="abs center-content flex hidden:empty round .show_{rel!;fg:base-fg;bg:transparent} bg:error fg:white size:8x user-select:none z:1">
{{ qty > 0 || (alwaysOpen && isOpen) || (isOpen && qty >= 0) ? qty : null }}
</div>
<VDropdown v-model:shown="showPopper" :disabled="!maxQty || qty < maxQty" :triggers="[]" auto-hide placement="top" theme="tooltip">
<template #popper>{{ maxMsg }}</template>
<div class="quantity-plus center-content flex pointer round .max_{bg:G-30;b:2|G-30} b:2|B-30 bg:B-30 f:md fg:white size:8x" @click="tryIncreaseQty">
<iconify-icon icon="ic:round-plus" size="18" />
<iconify-icon icon="ic:round-plus" size="18" noobserver />
</div>
</VDropdown>
</div>
Expand Down
5 changes: 5 additions & 0 deletions apps/nuxt-base/master.css.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import config from '@alanlu-dev/mastercss-config'

console.log('master-base')

/** @type {import('@master/css').Config} */
export default {
extends: [config],
variables: {
'nuxt-base': '#00F',
},
}
10 changes: 4 additions & 6 deletions apps/nuxt-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"typecheck": "vue-tsc --noEmit"
},
"peerDependencies": {
"@alanlu-dev/eslint-config-base": "workspace:*",
"@alanlu-dev/mastercss-config": "workspace:*",
"@alanlu-dev/scss": "workspace:*",
"@alanlu-dev/types": "workspace:*",
Expand All @@ -42,8 +41,8 @@
"@formkit/themes": "^1.6.2",
"@formkit/vue": "^1.6.2",
"@formkit/zod": "^1.6.2",
"@master/css.nuxt": "2.0.0-rc.30",
"@master/css.vue": "2.0.0-rc.30",
"@master/css.nuxt": "2.0.0-rc.32",
"@master/css.vue": "2.0.0-rc.32",
"@nuxt/devtools": "^1.2.0",
"@nuxt/image": "^1.6.0",
"@nuxt/kit": "^3.11.2",
Expand Down Expand Up @@ -82,7 +81,6 @@
"zod": "^3.23.4"
},
"devDependencies": {
"@alanlu-dev/eslint-config-base": "workspace:*",
"@alanlu-dev/mastercss-config": "workspace:*",
"@alanlu-dev/mastercss-helpers": "workspace:*",
"@alanlu-dev/scss": "workspace:*",
Expand All @@ -97,8 +95,8 @@
"@formkit/themes": "^1.6.2",
"@formkit/vue": "^1.6.2",
"@formkit/zod": "^1.6.2",
"@master/css.nuxt": "2.0.0-rc.30",
"@master/css.vue": "2.0.0-rc.30",
"@master/css.nuxt": "2.0.0-rc.32",
"@master/css.vue": "2.0.0-rc.32",
"@nuxt/content": "^2.12.1",
"@nuxt/devtools": "^1.2.0",
"@nuxt/image": "^1.6.0",
Expand Down
11 changes: 0 additions & 11 deletions apps/nuxt-demo/.eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions apps/nuxt-demo/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const CSSRuntimeProvider = defineAsyncComponent(async () => (await import('@mast
<NuxtLoadingIndicator />
<ModalsContainer />
<NuxtPage />
<div class="bg:nuxt-demo"></div>
</NuxtLayout>
</CSSRuntimeProvider>
</template>
Expand Down
5 changes: 5 additions & 0 deletions apps/nuxt-demo/master.css.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import config from '@alanlu-dev/mastercss-config'
import floatingVueConfig from '@alanlu-dev/mastercss-config/vendors/floating-vue'
import formkitConfig from '@alanlu-dev/mastercss-config/vendors/formkit'

console.log('master-demo')

// import formkitFloatingLabelConfig from '@alanlu-dev/mastercss-config/vendors/formkit-floating-label'

/** @type {import('@master/css').Config} */
Expand All @@ -13,4 +15,7 @@ export default {
formkitConfig,
// formkitFloatingLabelConfig,
],
variables: {
'nuxt-demo': '#F00',
},
}
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@alanlu-dev/eslint-config-flat'

export default config
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alanlu-dev/web-kit",
"type": "commonjs",
"type": "module",
"private": true,
"packageManager": "[email protected]",
"description": "A monorepo build system and workflow for web projects.",
Expand Down Expand Up @@ -34,6 +34,7 @@
"check": "turbo run test lint typecheck --parallel && pnpm lint:cspell",
"test": "turbo run test",
"lint": "turbo run lint",
"lint:eslint": "turbo run lint:eslint",
"typecheck": "turbo run typecheck",
"lint:cspell": "pnpm cspell . --unique --no-progress --no-must-find-files",
"lint:cspell:only-changed": "git diff --name-only | npx cspell --file-list stdin",
Expand All @@ -51,7 +52,7 @@
"devDependencies": {
"@alanlu-dev/changeset": "workspace:*",
"@alanlu-dev/commitlint-config": "workspace:*",
"@alanlu-dev/eslint-config-base": "workspace:*",
"@alanlu-dev/eslint-config-flat": "workspace:*",
"@alanlu-dev/lint-staged-config": "workspace:*",
"@alanlu-dev/markdownlint-config": "workspace:*",
"@alanlu-dev/mastercss-config": "workspace:*",
Expand All @@ -62,17 +63,18 @@
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@types/node": "^20.12.7",
"@vitest/coverage-v8": "^1.5.1",
"@vitest/coverage-v8": "^1.5.2",
"cspell": "^8.7.0",
"dotenv": "^16.4.5",
"happy-dom": "^14.7.1",
"husky": "^9.0.11",
"playwright-core": "^1.43.1",
"tsup": "^8.0.2",
"tsx": "^4.7.2",
"turbo": "^1.13.2",
"tsx": "^4.7.3",
"turbo": "^1.13.3",
"typescript": "^5.4.5",
"unbuild": "3.0.0-rc.1",
"vite": "^5.2.10",
"vitest": "^1.5.1"
"vitest": "^1.5.2"
}
}
4 changes: 0 additions & 4 deletions packages/changeset/.eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion packages/changeset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"commander": "^12.0.0"
},
"devDependencies": {
"@alanlu-dev/eslint-config-base": "workspace:*",
"@alanlu-dev/tsconfig": "workspace:*",
"@changesets/types": "^6.0.0"
}
Expand Down
4 changes: 0 additions & 4 deletions packages/linters/commitlint-config/.eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion packages/linters/commitlint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"czg": "^1.9.1"
},
"devDependencies": {
"@alanlu-dev/eslint-config-base": "workspace:*",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"czg": "^1.9.1"
Expand Down
4 changes: 0 additions & 4 deletions packages/linters/eslint-config/base/.eslintrc.cjs

This file was deleted.

25 changes: 0 additions & 25 deletions packages/linters/eslint-config/base/CHANGELOG.md

This file was deleted.

26 changes: 0 additions & 26 deletions packages/linters/eslint-config/base/README.md

This file was deleted.

56 changes: 0 additions & 56 deletions packages/linters/eslint-config/base/package.json

This file was deleted.

Loading

0 comments on commit ee78c15

Please sign in to comment.