Skip to content

Commit

Permalink
refactor: update dependencies and fix vue 3.4 and mdx compatibility i…
Browse files Browse the repository at this point in the history
…ssues

By @TechAkayy
  • Loading branch information
ElMassimo committed Sep 13, 2024
1 parent a88ee6f commit 34c1abd
Show file tree
Hide file tree
Showing 35 changed files with 11,494 additions and 8,572 deletions.
151 changes: 151 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
import antfu from '@antfu/eslint-config'

// https://github.com/antfu/eslint-config#customization
export default antfu(
// Configures for antfu's config
{
ignores: ['**/dist', 'packages/iles/turbo.js', 'docs/cypress'],
lessOpinionated: true,
languageOptions: {
globals: {
usePage: 'readonly',
useRoute: 'readonly',
useHead: 'readonly',
definePageComponent: 'readonly',
},
},

// https://github.com/antfu/eslint-config#optional-configs
jsx: true,
solid: true,
svelte: true,
markdown: false,
// unocss: true,
formatters: {
/**
* Format CSS, LESS, SCSS files, also the `<style>` blocks in Vue
* By default uses Prettier
*/
css: true,
/**
* Format HTML files
* By default uses Prettier
*/
html: true,
/**
* Format Markdown files
* Supports Prettier and dprint
* By default uses Prettier
*/
markdown: 'prettier',
},
},
{
// Remember to specify the file glob here, otherwise it might cause the vue plugin to handle non-vue files
files: ['**/*.vue'],
rules: {
'vue/attribute-hyphenation': ['warn', 'never', {
ignore: ['http-equiv'],
}],
},
},
{
// Without `files`, they are general rules for all files
rules: {
'prefer-const': 'off',
'no-unused-vars': 'off',
'import/named': 'off',
'import/first': 'off',
'no-restricted-syntax': 'off',
'no-use-before-define': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-vars': 'off',
'style/max-statements-per-line': 'off',
'no-console': 'off',
'node/prefer-global/process': 'off',
'antfu/no-import-dist': 'off',
'vue/html-closing-bracket-spacing': ['warn', {
selfClosingTag: 'never',
}],
'vue/multiline-html-element-content-newline': 'off',
'vue/html-self-closing': 'off',
'vue/valid-v-for': 'off',

// 'style/arrow-parens': ['error', 'always'],
// 'style/space-before-function-paren': ['error', 'always'],

// Consider enabling at some point.
'format/prettier': 'off',
'ts/consistent-type-imports': 'off',
'unused-imports/no-unused-imports': 'off',
'no-undef': 'off',
'unicorn/prefer-node-protocol': 'off',
'curly': 'off',
'test/consistent-test-it': 'off',
'antfu/consistent-list-newline': 'off',
'import/newline-after-import': 'off',
'import/no-duplicates': 'off',
'import/order': 'off',
'jsonc/sort-array-values': 'off',
'jsonc/sort-keys': 'off',
'regexp/confusing-quantifier': 'off',
'regexp/match-any': 'off',
'regexp/no-contradiction-with-assertion': 'off',
'regexp/no-dupe-characters-character-class': 'off',
'regexp/no-super-linear-backtracking': 'off',
'regexp/no-trivially-nested-quantifier': 'off',
'regexp/no-unused-capturing-group': 'off',
'regexp/no-useless-assertions': 'off',
'regexp/no-useless-flag': 'off',
'regexp/no-useless-non-capturing-group': 'off',
'regexp/prefer-w': 'off',
'regexp/sort-flags': 'off',
'regexp/strict': 'off',
'sort-imports': 'off',
'style/arrow-parens': 'off',
'style/comma-dangle': 'off',
'style/indent-binary-ops': 'off',
'style/member-delimiter-style': 'off',
'style/object-curly-spacing': 'off',
'style/semi': 'off',
'style/space-before-blocks': 'off',
'style/space-before-function-paren': 'off',
'style/type-generic-spacing': 'off',
'vue/no-reserved-component-names': 'off',
'vue/singleline-html-element-content-newline': 'off',
'ts/ban-ts-comment': 'off',
'no-restricted-globals': 'off',
'ts/no-unsafe-function-type': 'off',
'yaml/plain-scalar': 'off',
'yaml/quotes': 'off',
'style/no-trailing-spaces': 'off',
'style/no-multiple-empty-lines': 'off',
'prefer-regex-literals': 'off',
'unicorn/prefer-number-properties': 'off',
'style/multiline-ternary': 'off',
'style/jsx-wrap-multilines': 'off',
'style/jsx-curly-spacing': 'off',
'style/quote-props': 'off',
'node/no-path-concat': 'off',
'svelte/html-quotes': 'off',
'svelte/indent': 'off',
'style/jsx-one-expression-per-line': 'off',
'solid/no-destructure': 'off',
'vue/prefer-template': 'off',
'style/padded-block': 'off',
'style/type-annotation-spacing': 'off',
'style/no-multi-spaces': 'off',
'style/padded-blocks': 'off',
'ts/no-use-before-define': 'off',
'ts/no-unused-expressions': 'off',
'jsdoc/check-param-names': 'off',
'toml/indent': 'off',
'toml/tables-order': 'off',
'vue/block-tag-newline': 'off',
'regexp/no-useless-lazy': 'off',
'style/eol-last': 'off',
},
},
)
2 changes: 1 addition & 1 deletion iles.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const testConfig = {
test: {
deps: {
inline: [
"@vue/devtools-api",
'@vue/devtools-api',
],
},
},
Expand Down
83 changes: 26 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "root",
"private": true,
"packageManager": "pnpm@8.8.0",
"type": "module",
"private": true,
"packageManager": "pnpm@9.6.0",
"scripts": {
"build:all": "pnpm nx run-many --target=build --all --exclude docs --exclude vue-blog",
"lint:all": "pnpm nx run-many --target=lint --all",
"lint:fix:all": "pnpm nx run-many --target=lint:fix --all",
"dev": "pnpm -r --parallel --filter './packages/**' run dev",
"docs": "npm -C docs run dev",
"docs:build": "npm -C docs run build",
Expand All @@ -20,66 +21,34 @@
"test": "packages/iles/bin/iles.js test"
},
"devDependencies": {
"@mussi/eslint-config": "^0.5.1",
"@mussi/stylelint-config": "^0.1.1",
"@nrwl/cli": "^13.10.6",
"@nrwl/nx-cloud": "^13.3.1",
"@nrwl/tao": "^13.10.6",
"@nrwl/workspace": "^13.10.6",
"concurrently": "^6.5.1",
"conventional-changelog-cli": "^2.2.2",
"@antfu/eslint-config": "^2.24.0",
"@nrwl/cli": "^15.9.3",
"@nrwl/nx-cloud": "^19.0.0",
"@nrwl/tao": "^19.5.3",
"@nrwl/workspace": "^19.5.3",
"concurrently": "^8.2.2",
"conventional-changelog-cli": "^5.0.0",
"enquirer": "^2.4.1",
"eslint": "^8.51.0",
"execa": "^5.1.1",
"iles": "^0.9.5",
"eslint": "^9.8.0",
"eslint-plugin-format": "^0.1.2",
"eslint-plugin-solid": "^0.14.1",
"eslint-plugin-svelte": "^2.43.0",
"execa": "^9.3.0",
"iles": "*",
"minimist": "^1.2.8",
"pkg-dir": "^6.0.1",
"semver": "^7.5.4",
"pkg-dir": "^8.0.0",
"semver": "^7.6.3",
"typescript": "5.2.2",
"vitest": "^0.16.0"
},
"resolutions": {
"eslint-plugin-vue": "7.17.0",
"typescript": "5.2.2"
"vitest": "^2.0.4"
},
"eslintConfig": {
"extends": "@mussi/eslint-config",
"globals": {
"$ref": "readonly",
"$computed": "readonly",
"$shallowRef": "readonly",
"$$": "readonly",
"$": "readonly",
"usePage": "readonly",
"useRoute": "readonly",
"useHead": "readonly",
"definePageComponent": "readonly"
"pnpm": {
"overrides": {
"@typescript-eslint/typescript-estree": "8.5.0"
},
"ignorePatterns": [
"dist",
"node_modules",
"packages/iles/turbo.js",
"docs/cypress"
],
"rules": {
"prefer-const": "off",
"no-unused-vars": "off",
"import/named": "off",
"import/first": "off",
"no-restricted-syntax": "off",
"no-use-before-define": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": "off",
"vue/attribute-hyphenation": [
"warn",
"never",
{
"ignore": [
"http-equiv"
]
}
]
"peerDependencyRules": {
"allowedVersions": {
"eslint": "9"
}
}
}
}
15 changes: 8 additions & 7 deletions packages/excerpt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"dev": "npm run build -- --watch",
"build": "tsup src/excerpt.ts",
"lint": "eslint ."
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"type": "module",
"files": [
Expand Down Expand Up @@ -32,12 +33,12 @@
"hast-util-to-string": "^3.0.0"
},
"devDependencies": {
"@types/estree": "^1.0.2",
"@types/estree-jsx": "^0.0.1",
"@types/hast": "^3.0.0",
"@types/estree": "^1.0.5",
"@types/estree-jsx": "^1.0.5",
"@types/hast": "^3.0.4",
"iles": "workspace:*",
"tsup": "7.2.0",
"typescript": "^5.2.2",
"unified": "^11.0.0"
"tsup": "8.2.3",
"typescript": "5.2.2",
"unified": "^11.0.5"
}
}
7 changes: 4 additions & 3 deletions packages/feed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"dev": "npm run build -- --watch",
"build": "tsup src/types.ts src/feed.ts src/render-feed.ts",
"lint": "eslint ."
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"files": [
"dist",
Expand All @@ -29,14 +30,14 @@
"bugs": "https://github.com/ElMassimo/iles/issues",
"devDependencies": {
"iles": "workspace:*",
"vue": "^3.3.4"
"vue": "^3.4.34"
},
"peerDependencies": {
"iles": "workspace:*",
"vue": "^3.3.4"
},
"dependencies": {
"feed": "^4.2",
"pathe": "^1.1.1"
"pathe": "^1.1.2"
}
}
11 changes: 6 additions & 5 deletions packages/headings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"dev": "npm run build -- --watch",
"build": "tsup src/headings.ts",
"lint": "eslint ."
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"type": "module",
"files": [
Expand Down Expand Up @@ -32,11 +33,11 @@
"hast-util-to-string": "^3.0.0"
},
"devDependencies": {
"@types/estree": "^1.0.2",
"@types/estree": "^1.0.5",
"iles": "workspace:*",
"slugo": "^0.4.0",
"tsup": "7.2.0",
"typescript": "^5.2.2",
"unified": "^11.0.0"
"tsup": "8.2.3",
"typescript": "5.2.2",
"unified": "^11.0.5"
}
}
19 changes: 10 additions & 9 deletions packages/hydration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"dev": "npm run build -- --watch",
"build": "tsup hydration.ts preact.ts vue.ts vanilla.ts solid.ts svelte.ts",
"lint": "eslint ."
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"type": "module",
"files": [
Expand Down Expand Up @@ -37,13 +38,13 @@
"url": "https://github.com/ElMassimo/iles/issues"
},
"devDependencies": {
"preact": "^10.18.1",
"preact-render-to-string": "^6.2.2",
"solid-js": "^1.8.0",
"svelte": "^4.2.1",
"tsup": "7.2.0",
"typescript": "^5.2.2",
"vite": "^5.0.0-beta.6",
"vue": "^3.3.4"
"preact": "^10.23.1",
"preact-render-to-string": "^6.5.7",
"solid-js": "^1.8.19",
"svelte": "^4.2.18",
"tsup": "8.2.3",
"typescript": "5.2.2",
"vite": "^5.3.5",
"vue": "^3.4.34"
}
}
Loading

0 comments on commit 34c1abd

Please sign in to comment.