Skip to content

Commit

Permalink
feat: update stylistic plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 30, 2023
1 parent 413895a commit 9326e10
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 193 deletions.
10 changes: 10 additions & 0 deletions eslint.config.js
@@ -1,4 +1,5 @@
import sortKeys from 'eslint-plugin-sort-keys'
import styleMigrate from '@stylistic/eslint-plugin-migrate'
import antfu from './dist/index.js'

export default antfu(
Expand All @@ -20,4 +21,13 @@ export default antfu(
'sort-keys/sort-keys-fix': 'error',
},
},
{
files: ['src/configs/*.ts'],
plugins: {
'style-migrate': styleMigrate,
},
rules: {
'style-migrate/migrate': ['error', { namespaceTo: 'style' }],
},
},
)
2 changes: 1 addition & 1 deletion fixtures/output/no-style/typescript.ts
Expand Up @@ -72,7 +72,7 @@ class Dog extends Animal {
const dog = new Dog('Buddy');
dog.bark();

function fn (): string {
const fn = (): string => {
return `hello${ 1}`
}

Expand Down
4 changes: 2 additions & 2 deletions fixtures/output/no-style/vue-ts.vue
Expand Up @@ -6,9 +6,9 @@ const greeting = ref('Hello, Vue 3!');
const counter = ref<number | string>(0);
// Define a function
function incrementCounter () {
const incrementCounter = () => {
counter.value++;
}
};
</script>

<template>
Expand Down
4 changes: 2 additions & 2 deletions fixtures/output/no-style/vue.vue
Expand Up @@ -6,9 +6,9 @@ const greeting = ref(`Hello, Vue 3!${ 1}`);
const counter = ref(0)
// Define a function
function incrementCounter () {
const incrementCounter = () => {
counter.value++;
}
};
</script>

<template>
Expand Down
11 changes: 6 additions & 5 deletions package.json
Expand Up @@ -37,12 +37,12 @@
"eslint": ">=8.0.0"
},
"dependencies": {
"@stylistic/eslint-plugin": "0.0.5",
"@stylistic/eslint-plugin": "0.0.6",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"eslint-config-flat-gitignore": "^0.1.0",
"eslint-define-config": "^1.23.0",
"eslint-plugin-antfu": "^1.0.0-beta.7",
"eslint-plugin-antfu": "^1.0.0-beta.8",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-i": "^2.28.1",
"eslint-plugin-jsdoc": "^46.8.2",
Expand All @@ -64,12 +64,13 @@
"devDependencies": {
"@antfu/eslint-config": "workspace:*",
"@antfu/ni": "^0.21.8",
"@stylistic/eslint-plugin-migrate": "^0.0.6",
"@types/eslint": "^8.44.3",
"@types/fs-extra": "^11.0.2",
"@types/node": "^20.7.1",
"@types/node": "^20.7.2",
"bumpp": "^9.2.0",
"eslint": "^8.50.0",
"eslint-flat-config-viewer": "^0.0.7",
"eslint-flat-config-viewer": "^0.0.8",
"eslint-plugin-sort-keys": "^2.3.5",
"esno": "^0.17.0",
"fast-glob": "^3.3.1",
Expand All @@ -81,6 +82,6 @@
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vitest": "^0.34.5"
"vitest": "^0.34.6"
}
}

0 comments on commit 9326e10

Please sign in to comment.