Skip to content

Commit 77687dc

Browse files
committed
chore: fix release workflow
1 parent a311f0e commit 77687dc

File tree

4 files changed

+7
-21
lines changed

4 files changed

+7
-21
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"changelog": [
44
"@changesets/changelog-github",
55
{
6-
"repo": "@intlify/eslint-plugin-svelte"
6+
"repo": "intlify/eslint-plugin-svelte"
77
}
88
],
99
"commit": false,

.changeset/moody-adults-camp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"@intlify/eslint-plugin-svelte": minor
2+
'@intlify/eslint-plugin-svelte': minor
33
---
44

55
Apply rule against root-level strings

scripts/lib/utils.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
*/
66
import { readdirSync, existsSync } from 'fs'
77
import { basename, extname, join } from 'path'
8-
import { CLIEngine } from 'eslint'
9-
const linter = new CLIEngine({ fix: true })
10-
11-
function format(text: string, filename: string): string {
12-
const lintResult = linter.executeOnText(text, filename)
13-
return lintResult.results[0].output || text
14-
}
158

169
/**
1710
* Convert text to camelCase
@@ -28,8 +21,7 @@ function createIndex(dirPath: string, prefix = '', all = false): string {
2821
file.endsWith('.ts') || existsSync(join(dirPath, file, 'index.ts'))
2922
)
3023
.map(file => basename(file, extname(file)))
31-
return format(
32-
`/** DON'T EDIT THIS FILE; was created by scripts. */
24+
return `/** DON'T EDIT THIS FILE; was created by scripts. */
3325
${tsFiles
3426
.map(
3527
id =>
@@ -40,9 +32,7 @@ ${tsFiles
4032
export = {
4133
${tsFiles.map(id => `'${prefix}${id}': ${camelCase(id)},`).join('\n ')}
4234
}
43-
`,
44-
'input.ts'
45-
)
35+
`
4636
}
4737

48-
export { createIndex, format }
38+
export { createIndex }

scripts/update-recommended-rules.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
*/
66
import { resolve } from 'path'
77
import rules from './lib/rules'
8-
import { format } from './lib/utils'
98
import { writeAndFormat } from './lib/write'
109

1110
// recommended.ts
1211
writeAndFormat(
1312
resolve(__dirname, '../lib/configs/recommended.ts'),
14-
format(
15-
`/** DON'T EDIT THIS FILE; was created by scripts. */
13+
`/** DON'T EDIT THIS FILE; was created by scripts. */
1614
export = {
1715
extends: [require.resolve('./base')],
1816
parserOptions: {
@@ -32,7 +30,5 @@ export = {
3230
.map(rule => `'${rule.id}': 'warn',`)
3331
.join('\n ')}
3432
},
35-
}`,
36-
resolve(__dirname, '../lib/configs/recommended.ts')
37-
)
33+
}`
3834
)

0 commit comments

Comments
 (0)