Skip to content

Commit

Permalink
fix(cli): bump eslint to 9 (#1888)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored Jan 31, 2025
1 parent dfc9097 commit f359731
Show file tree
Hide file tree
Showing 9 changed files with 474 additions and 577 deletions.
2 changes: 1 addition & 1 deletion packages/abc/global-footer/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
<div style="height: 280px;"></div>
<global-footer [links]="links">
Copyright<nz-icon nzType="copyright" class="mx-sm" />
2023
2025
<a href="//github.com/cipchk" target="_blank" class="mx-sm">卡色</a>出品
</global-footer>
`,
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/global-footer/demo/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
</global-footer-item>
<global-footer-item href="https://ng-alain.surge.sh/" blankTarget>预览</global-footer-item>
Copyright<nz-icon nzType="copyright" class="mx-sm" />
2023
2025
<a href="//github.com/cipchk" target="_blank" class="mx-sm">卡色</a>出品
</global-footer>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ import { HeaderI18nComponent } from './widgets/i18n.component';<% } %>
`,
imports: [
RouterOutlet,
RouterLink,
I18nPipe,
RouterLink,<% if (i18n) { %>
I18nPipe,<% } %>
LayoutDefaultModule,
SettingDrawerModule,
ThemeBtnComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component, OnInit, inject } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { GlobalFooterModule } from '@delon/abc/global-footer';
import { DA_SERVICE_TOKEN } from '@delon/auth';
import { ThemeBtnComponent } from '@delon/theme/theme-btn';
import { NzIconModule } from 'ng-zorro-antd/icon';
<% if (i18n) { %>
import { HeaderI18nComponent } from '../basic/widgets/i18n.component';<% } %>
Expand All @@ -23,14 +22,14 @@ import { HeaderI18nComponent } from '../basic/widgets/i18n.component';<% } %>
<router-outlet />
<global-footer [links]="links">
Copyright
<i class="anticon anticon-copyright"></i> 2023
<i class="anticon anticon-copyright"></i> 2025
<a href="//github.com/cipchk" target="_blank">卡色</a>出品
</global-footer>
</div>
</div>
`,
styleUrls: ['./passport.component.less'],
imports: [RouterOutlet<% if (i18n) { %>, HeaderI18nComponent<% } %>, GlobalFooterModule, NzIconModule, ThemeBtnComponent]
imports: [RouterOutlet<% if (i18n) { %>, HeaderI18nComponent<% } %>, GlobalFooterModule, NzIconModule]
})
export class LayoutPassportComponent implements OnInit {
private tokenService = inject(DA_SERVICE_TOKEN);
Expand Down
2 changes: 1 addition & 1 deletion schematics/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function addCodeStylesToPackageJson(): Rule {
const json = readPackage(tree);
if (json == null) return tree;
json.scripts.lint = `npm run lint:ts && npm run lint:style`;
json.scripts['lint:ts'] = `ng lint --fix`;
json.scripts['lint:ts'] = `npx eslint --cache --fix`;
json.scripts['lint:style'] = `npx stylelint \\"src/**/*.less\\" --fix`;
json.scripts['prepare'] = 'husky install';
writePackage(tree, json);
Expand Down
10 changes: 4 additions & 6 deletions schematics/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@ export function UpgradeMainVersions(tree: Tree, version: string = VERSION): void
addPackage(
tree,
[
`@angular-eslint/[email protected]`,
`@angular-eslint/[email protected]`,
`@angular-eslint/[email protected]`,
`@angular-eslint/[email protected]`,
`@angular-eslint/[email protected]`,
`[email protected]`,
`@typescript-eslint/[email protected]`,
`@typescript-eslint/[email protected]`,
`@typescript-eslint/[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`[email protected]`,
`ng-alain@${version}`,
Expand Down
9 changes: 4 additions & 5 deletions scripts/ci/build-schematics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@ tsconfigFile=${SOURCE}/tsconfig.json
copyFiles() {
mkdir -p ${2}
readonly paths=(
"${1}.gitignore|${2}application/files/root/.gitignore"
# i18n data
"${1}src/assets/tmp/i18n|${2}application/files/i18n"
# code styles
"${1}.eslintignore|${2}application/files/root/"
"${1}.eslintrc.js|${2}application/files/root/.eslintrc.js"
"${1}eslint.config.mjs|${2}application/files/root/eslint.config.mjs"
"${1}.prettierignore|${2}application/files/root/.prettierignore"
"${1}.prettierrc.js|${2}application/files/root/.prettierrc.js"
"${1}.stylelintrc.js|${2}application/files/root/.stylelintrc.js"
"${1}.npmrc|${2}application/files/root"
"${1}stylelint.config.mjs|${2}application/files/root/stylelint.config.mjs"
"${1}.nvmrc|${2}application/files/root"
"${1}proxy.conf.js|${2}application/files/root"
"${1}.husky|${2}application/files/root/.husky"
Expand Down Expand Up @@ -252,7 +251,7 @@ echo "Finished!!"
if [[ ${DEBUG} == true ]]; then
cd ../../
DEBUG_FROM=${PWD}/work/delon/dist/ng-alain/*
DEBUG_TO=${PWD}/work/ng-alain/node_modules/ng-alain/
DEBUG_TO=${PWD}/work/ng19/node_modules/ng-alain/
echo "DEBUG_FROM:${DEBUG_FROM}"
echo "DEBUG_TO:${DEBUG_TO}"
rm -rf ${DEBUG_TO}
Expand Down
12 changes: 5 additions & 7 deletions scripts/ci/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,18 @@ DEPENDENCIES=$(node -p "
'ng-alain-plugin-theme',
'source-map-explorer',
'@angular/language-service',
'@angular-eslint/builder',
'@angular-eslint/eslint-plugin',
'@angular-eslint/eslint-plugin-template',
'@angular-eslint/schematics',
'@angular-eslint/template-parser',
'@typescript-eslint/eslint-plugin',
'@typescript-eslint/parser',
'eslint',
'@typescript-eslint/utils',
'typescript-eslint',
'angular-eslint',
'eslint-config-prettier',
'eslint-plugin-import',
'eslint-plugin-jsdoc',
'eslint-plugin-prefer-arrow',
'eslint-plugin-prettier',
'eslint-plugin-deprecation',
'eslint-plugin-unused-imports',
'eslint',
'prettier',
'husky',
'lint-staged',
Expand Down
Loading

0 comments on commit f359731

Please sign in to comment.