Skip to content

Commit 9326e10

Browse files
committed
feat: update stylistic plugins
1 parent 413895a commit 9326e10

File tree

10 files changed

+136
-193
lines changed

10 files changed

+136
-193
lines changed

eslint.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sortKeys from 'eslint-plugin-sort-keys'
2+
import styleMigrate from '@stylistic/eslint-plugin-migrate'
23
import antfu from './dist/index.js'
34

45
export default antfu(
@@ -20,4 +21,13 @@ export default antfu(
2021
'sort-keys/sort-keys-fix': 'error',
2122
},
2223
},
24+
{
25+
files: ['src/configs/*.ts'],
26+
plugins: {
27+
'style-migrate': styleMigrate,
28+
},
29+
rules: {
30+
'style-migrate/migrate': ['error', { namespaceTo: 'style' }],
31+
},
32+
},
2333
)

fixtures/output/no-style/typescript.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Dog extends Animal {
7272
const dog = new Dog('Buddy');
7373
dog.bark();
7474

75-
function fn (): string {
75+
const fn = (): string => {
7676
return `hello${ 1}`
7777
}
7878

fixtures/output/no-style/vue-ts.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const greeting = ref('Hello, Vue 3!');
66
const counter = ref<number | string>(0);
77
88
// Define a function
9-
function incrementCounter () {
9+
const incrementCounter = () => {
1010
counter.value++;
11-
}
11+
};
1212
</script>
1313

1414
<template>

fixtures/output/no-style/vue.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const greeting = ref(`Hello, Vue 3!${ 1}`);
66
const counter = ref(0)
77
88
// Define a function
9-
function incrementCounter () {
9+
const incrementCounter = () => {
1010
counter.value++;
11-
}
11+
};
1212
</script>
1313

1414
<template>

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
"eslint": ">=8.0.0"
3838
},
3939
"dependencies": {
40-
"@stylistic/eslint-plugin": "0.0.5",
40+
"@stylistic/eslint-plugin": "0.0.6",
4141
"@typescript-eslint/eslint-plugin": "^6.7.3",
4242
"@typescript-eslint/parser": "^6.7.3",
4343
"eslint-config-flat-gitignore": "^0.1.0",
4444
"eslint-define-config": "^1.23.0",
45-
"eslint-plugin-antfu": "^1.0.0-beta.7",
45+
"eslint-plugin-antfu": "^1.0.0-beta.8",
4646
"eslint-plugin-eslint-comments": "^3.2.0",
4747
"eslint-plugin-i": "^2.28.1",
4848
"eslint-plugin-jsdoc": "^46.8.2",
@@ -64,12 +64,13 @@
6464
"devDependencies": {
6565
"@antfu/eslint-config": "workspace:*",
6666
"@antfu/ni": "^0.21.8",
67+
"@stylistic/eslint-plugin-migrate": "^0.0.6",
6768
"@types/eslint": "^8.44.3",
6869
"@types/fs-extra": "^11.0.2",
69-
"@types/node": "^20.7.1",
70+
"@types/node": "^20.7.2",
7071
"bumpp": "^9.2.0",
7172
"eslint": "^8.50.0",
72-
"eslint-flat-config-viewer": "^0.0.7",
73+
"eslint-flat-config-viewer": "^0.0.8",
7374
"eslint-plugin-sort-keys": "^2.3.5",
7475
"esno": "^0.17.0",
7576
"fast-glob": "^3.3.1",
@@ -81,6 +82,6 @@
8182
"tsup": "^7.2.0",
8283
"typescript": "^5.2.2",
8384
"unbuild": "^2.0.0",
84-
"vitest": "^0.34.5"
85+
"vitest": "^0.34.6"
8586
}
8687
}

0 commit comments

Comments
 (0)