Skip to content

fix(cli): bump eslint to 9 #1888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/builder@DEP-0.0.0-PLACEHOLDER`,
`@angular-eslint/eslint-plugin@DEP-0.0.0-PLACEHOLDER`,
`@angular-eslint/eslint-plugin-template@DEP-0.0.0-PLACEHOLDER`,
`@angular-eslint/schematics@DEP-0.0.0-PLACEHOLDER`,
`@angular-eslint/template-parser@DEP-0.0.0-PLACEHOLDER`,
`angular-eslint@DEP-0.0.0-PLACEHOLDER`,
`@typescript-eslint/eslint-plugin@DEP-0.0.0-PLACEHOLDER`,
`@typescript-eslint/parser@DEP-0.0.0-PLACEHOLDER`,
`@typescript-eslint/utils@DEP-0.0.0-PLACEHOLDER`,
`eslint@DEP-0.0.0-PLACEHOLDER`,
`eslint-config-prettier@DEP-0.0.0-PLACEHOLDER`,
`eslint-plugin-import@DEP-0.0.0-PLACEHOLDER`,
`eslint-plugin-jsdoc@DEP-0.0.0-PLACEHOLDER`,
`eslint-plugin-prefer-arrow@DEP-0.0.0-PLACEHOLDER`,
`eslint-plugin-prettier@DEP-0.0.0-PLACEHOLDER`,
`eslint-plugin-deprecation@DEP-0.0.0-PLACEHOLDER`,
`eslint-plugin-unused-imports@DEP-0.0.0-PLACEHOLDER`,
`typescript-eslint@DEP-0.0.0-PLACEHOLDER`,
`prettier@DEP-0.0.0-PLACEHOLDER`,
`husky@DEP-0.0.0-PLACEHOLDER`,
`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
Loading