fix frontend scripts lint
This commit is contained in:
parent
8a74f79378
commit
0c9fe00c12
3 changed files with 36 additions and 15 deletions
|
|
@ -217,11 +217,32 @@ export default [
|
|||
},
|
||||
},
|
||||
{
|
||||
files: ['*.js', '*.ts', 'lib/**/*.ts', 'lib/**/*.js'],
|
||||
files: [
|
||||
'*.js',
|
||||
'*.ts',
|
||||
'lib/**/*.ts',
|
||||
'lib/**/*.js',
|
||||
'scripts/**/*.ts',
|
||||
'scripts/**/*.js',
|
||||
'scripts/**/*.mjs',
|
||||
'scripts/**/*.cjs',
|
||||
],
|
||||
ignores: [
|
||||
'node_modules',
|
||||
'.storybook',
|
||||
'vue-shims.d.ts',
|
||||
'src',
|
||||
'test',
|
||||
'@types',
|
||||
'assets',
|
||||
],
|
||||
globals: {
|
||||
...globals.node,
|
||||
},
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
parser: tsParser,
|
||||
project: ['./tsconfig.scripts.json'],
|
||||
project: ['tsconfig.scripts.json'],
|
||||
sourceType: 'module',
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ const index_photos = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cs
|
|||
|
||||
export { index_photos as default };
|
||||
`.slice(1), { ecmaVersion: 'latest', sourceType: 'module' });
|
||||
// @ts-expect-error This is wrong, but not my problem
|
||||
unwindCssModuleClassName(ast);
|
||||
expect(generate(ast)).toBe(`
|
||||
import {c as api, d as store, i as i18n, aD as notePage, bN as ImgWithBlurhash, bY as getStaticImageUrl, _ as _export_sfc} from './app-!~{001}~.js';
|
||||
|
|
@ -438,6 +439,7 @@ const MkDateSeparatedList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModul
|
|||
|
||||
export { MkDateSeparatedList as M };
|
||||
`.slice(1), { ecmaVersion: 'latest', sourceType: 'module' });
|
||||
// @ts-expect-error This is wrong, but not my problem
|
||||
unwindCssModuleClassName(ast);
|
||||
expect(generate(ast)).toBe(`
|
||||
import {a7 as getCurrentInstance, b as defineComponent, G as useCssModule, a1 as h, H as TransitionGroup} from './!~{002}~.js';
|
||||
|
|
|
|||
|
|
@ -1,25 +1,23 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "../shared/tsconfig.scripts.jsonc",
|
||||
"compilerOptions": {
|
||||
"typeRoots": [
|
||||
"./node_modules/@types",
|
||||
"./node_modules"
|
||||
],
|
||||
"types": [
|
||||
"vite/client",
|
||||
"vitest/importMeta",
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"*.js",
|
||||
"*.ts",
|
||||
"lib/**/*.ts",
|
||||
"lib/**/*.js"
|
||||
"lib/**/*.js",
|
||||
"scripts/**/*.ts",
|
||||
"scripts/**/*.js",
|
||||
"scripts/**/*.mjs",
|
||||
"scripts/**/*.cjs"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
".storybook/**/*",
|
||||
"vue-shims.d.ts"
|
||||
".storybook",
|
||||
"vue-shims.d.ts",
|
||||
"src",
|
||||
"test",
|
||||
"@types",
|
||||
"assets"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue