Skip to content
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

migrate to latest Nx and Angular 19 #1

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
report modern Angular category for Code PushUp
  • Loading branch information
vmasek committed Dec 13, 2024
commit 337bb367dc63f844ffa88fb5704142dcbb826e14
24 changes: 11 additions & 13 deletions apps/ng-demo/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ import storybook from '@code-pushup/eslint-config/storybook';
import tsESLint from 'typescript-eslint';
import baseConfig from '../../eslint.config.js';

export default tsESLint.config(
...baseConfig,
...angular,
...storybook,
{
files: ['**/*.ts'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
export default tsESLint.config(...baseConfig, ...angular, ...storybook, {
files: ['**/*.ts'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
}
);
},
rules: {
'@angular-eslint/prefer-standalone': 'error',
},
});
56 changes: 55 additions & 1 deletion code-pushup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import eslintPlugin, {
eslintConfigFromAllNxProjects,
} from '@code-pushup/eslint-plugin';
import jsPackagesPlugin from '@code-pushup/js-packages-plugin';
import { mergeConfigs } from '@code-pushup/utils';
import { mergeConfigs, slugify } from '@code-pushup/utils';
import type { CoreConfig } from '@code-pushup/models';
import 'dotenv/config';

Expand All @@ -24,6 +24,60 @@ const esLintConfig: CoreConfig = {
{ type: 'group', plugin: 'eslint', slug: 'suggestions', weight: 1 },
],
},
{
slug: 'modern-angular',
title: 'Modern Angular',
refs: [
{
type: 'audit' as const,
plugin: 'eslint',
slug: '@angular-eslint/template/prefer-control-flow',
weight: 3,
},
{
type: 'audit' as const,
plugin: 'eslint',
slug: '@angular-eslint/template/prefer-ngsrc',
weight: 1,
},
{
type: 'audit' as const,
plugin: 'eslint',
slug: '@angular-eslint/template/prefer-self-closing-tags',
weight: 1,
},
{
type: 'audit' as const,
plugin: 'eslint',
slug: '@angular-eslint/prefer-standalone',
weight: 3,
},
{
type: 'audit' as const,
plugin: 'eslint',
slug: '@angular-eslint/use-injectable-provided-in',
weight: 1,
},
{
type: 'audit' as const,
plugin: 'eslint',
slug: '@angular-eslint/prefer-output-readonly',
weight: 1,
},
{
type: 'audit' as const,
plugin: 'eslint',
slug: '@angular-eslint/prefer-on-push-component-change-detection',
weight: 1,
},
{
type: 'audit' as const,
plugin: 'eslint',
slug: '@angular-eslint/use-lifecycle-interface',
weight: 1,
},
].map((ref) => ({ ...ref, slug: slugify(ref.slug) })),
},
],
};

Expand Down