Skip to content

Commit

Permalink
fix(eslint): resolve the conflict between 'config-base' and 'config-f…
Browse files Browse the repository at this point in the history
…lat' in a monorepo
  • Loading branch information
alanlu-zyl committed Apr 23, 2024
1 parent 9b34bce commit 10a0e9c
Show file tree
Hide file tree
Showing 11 changed files with 552 additions and 545 deletions.
7 changes: 7 additions & 0 deletions .changeset/eleven-parents-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@alanlu-dev/eslint-config-base": patch
"@alanlu-dev/eslint-config-flat": patch
"@alanlu-dev/nuxt-base": patch
---

fix(eslint): resolve the conflict between 'config-base' and 'config-flat' in a monorepo
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
auto-install-peers=true
public-hoist-pattern[]=*types*
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=*stylelint*
Expand All @@ -9,5 +8,4 @@ public-hoist-pattern[]=czg
public-hoist-pattern[]=lint-staged
public-hoist-pattern[]=sass
public-hoist-pattern[]=postcss*

Check warning on line 10 in .npmrc

View workflow job for this annotation

GitHub Actions / Lint

Unknown word (postcss)
public-hoist-pattern[]=@alanlu-dev/*
public-hoist-pattern[]=@master/*
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "html", "json", "jsonc", "yaml", "toml"],

// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
"eslint.experimental.useFlatConfig": false,

// Silent the stylistic rules in you IDE, but still auto fix them
// "eslint.rules.customizations": [
Expand Down
7 changes: 7 additions & 0 deletions apps/nuxt-base/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
const { resolve } = require('node:path')

module.exports = {
root: true,
extends: ['@alanlu-dev/base'],
settings: {
'@master/css': {
config: resolve(__dirname, 'master.css'),
},
},
}
1 change: 1 addition & 0 deletions apps/nuxt-base/components/Modal/ModalBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ 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
7 changes: 7 additions & 0 deletions apps/nuxt-demo/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
const { resolve } = require('node:path')

module.exports = {
root: true,
extends: ['@alanlu-dev/base'],
settings: {
'@master/css': {
config: resolve(__dirname, 'master.css'),
},
},
}
3 changes: 0 additions & 3 deletions eslint.config.mjs

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@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 Down
4 changes: 4 additions & 0 deletions packages/linters/eslint-config/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"@master/eslint-config-css": "2.0.0-rc.28",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-antfu": "0.43.1",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vitest": "^0.4.1"
},
Expand All @@ -38,6 +40,8 @@
"@master/eslint-config-css": "2.0.0-rc.28",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-antfu": "0.43.1",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vitest": "^0.4.1"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/linters/eslint-config/flat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"@master/eslint-config-css": "2.0.0-rc.28",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vitest": "^0.5.3"
"eslint-plugin-antfu": "2.1.2",
"eslint-plugin-prettier": "^5.1.3"
},
"devDependencies": {
"@antfu/eslint-config": "^2.15.0",
"@master/eslint-config-css": "2.0.0-rc.28",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vitest": "^0.5.3"
"eslint-plugin-antfu": "2.1.2",
"eslint-plugin-prettier": "^5.1.3"
}
}
1,055 changes: 521 additions & 534 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 10a0e9c

Please sign in to comment.