Skip to content

Commit

Permalink
Merge branch 'main' into air2-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
air2 committed Apr 15, 2024
2 parents c9cedfe + 4bc9ba7 commit b6181ad
Show file tree
Hide file tree
Showing 18 changed files with 663 additions and 493 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
yarn --ignore-engines --frozen-lockfile --prefer-offline --ignore-scripts
yarn check-clean-workspace-after-install
- name: Run parallel distributed tasks for build, typecheck, check-rule-docs, lint and test targets
- name: Run parallel distributed tasks for build, typecheck, check-rule-docs, check-rule-lists, lint and test targets
uses: jameshenry/parallel-bash-commands@v1
with:
# Note that the typecheck target *also* typechecks tests and tools,
# whereas the build only checks src files
cmd1: npx nx run-many -t build,typecheck,check-rule-docs,lint
cmd1: npx nx run-many -t build,typecheck,check-rule-docs,lint,check-rule-lists
cmd2: npx nx run-many -t test --codeCoverage
cmd3: npx nx-cloud record -- yarn lint
cmd4: npx nx-cloud record -- yarn format-check
Expand Down
4 changes: 1 addition & 3 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"*.{ts,js,json,md}": [
"prettier --write"
]
"*.{ts,js,json,md}": ["node node_modules/prettier/bin/prettier.cjs --write"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ exports[`new-workspace-create-application-false-ng-add-then-project it should pa
"@angular/cli": "^17.X.X",
"@angular/compiler-cli": "^17.X.X",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"eslint": "^8.57.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ exports[`new-workspace-create-application-false-project-then-ng-add it should pa
"@angular/cli": "^17.X.X",
"@angular/compiler-cli": "^17.X.X",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"eslint": "^8.57.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
Expand Down
4 changes: 2 additions & 2 deletions e2e/src/__snapshots__/new-workspace.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ exports[`new-workspace it should pass linting after creating a new workspace fro
"@angular/cli": "^17.X.X",
"@angular/compiler-cli": "^17.X.X",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"eslint": "^8.57.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
Expand Down
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@angular-eslint/angular-eslint",
"private": true,
"volta": {
"node": "20.11.1",
"node": "20.12.2",
"yarn": "1.22.22"
},
"workspaces": [
Expand Down Expand Up @@ -52,31 +52,31 @@
"devDependencies": {
"@actions/core": "1.10.1",
"@actions/github": "6.0.0",
"@angular/cli": "17.3.0",
"@angular/compiler": "17.3.0",
"@commitlint/cli": "19.2.0",
"@commitlint/config-conventional": "19.1.0",
"@nx/devkit": "18.0.8",
"@nx/eslint-plugin": "18.0.8",
"@nx/jest": "18.0.8",
"@nx/js": "18.0.8",
"@nx/plugin": "18.0.8",
"@nx/workspace": "18.0.8",
"@angular/cli": "17.3.4",
"@angular/compiler": "17.3.4",
"@commitlint/cli": "19.2.2",
"@commitlint/config-conventional": "19.2.2",
"@nx/devkit": "18.1.1",
"@nx/eslint-plugin": "18.1.1",
"@nx/jest": "18.1.1",
"@nx/js": "18.1.1",
"@nx/plugin": "18.1.1",
"@nx/workspace": "18.1.1",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-typescript": "^11.1.0",
"@schematics/angular": "17.3.0",
"@schematics/angular": "17.3.4",
"@swc-node/register": "1.8.0",
"@swc/cli": "0.3.10",
"@swc/core": "1.3.104",
"@swc/helpers": "0.5.3",
"@types/eslint": "8.56.5",
"@types/eslint": "8.56.9",
"@types/eslint-scope": "3.7.7",
"@types/jest": "29.4.4",
"@types/node": "20.11.28",
"@types/node": "20.12.7",
"@types/prettier": "2.7.3",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"commitizen": "4.3.0",
"cz-conventional-changelog": "3.3.0",
"env-cmd": "10.1.0",
Expand All @@ -90,18 +90,18 @@
"jsonc-eslint-parser": "^2.1.0",
"lint-staged": "15.2.2",
"ncp": "2.0.0",
"nx": "18.0.8",
"nx": "18.1.1",
"prettier": "3.1.1",
"prettier-v2-for-jest-inline-snapshots": "npm:prettier@^2",
"rimraf": "5.0.5",
"rollup": "^4.0.0",
"strip-ansi": "6.0.1",
"terser": "5.29.2",
"terser": "5.30.3",
"tree-kill": "1.2.2",
"ts-jest": "29.1.0",
"ts-node": "10.9.2",
"tslib": "^2.4.1",
"typescript": "5.3.3",
"verdaccio": "5.29.2"
"typescript": "5.4.5",
"verdaccio": "5.30.3"
}
}
2 changes: 1 addition & 1 deletion packages/builder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-eslint/builder",
"version": "17.3.0",
"version": "0.0.0-e2e",
"description": "Angular CLI builder for ESLint",
"license": "MIT",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/bundled-angular-compiler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-eslint/bundled-angular-compiler",
"version": "17.3.0",
"version": "0.0.0-e2e",
"description": "A CJS bundled version of @angular/compiler",
"license": "MIT",
"main": "dist/index.js",
Expand Down
10 changes: 5 additions & 5 deletions packages/eslint-plugin-template/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-eslint/eslint-plugin-template",
"version": "17.3.0",
"version": "0.0.0-e2e",
"description": "ESLint plugin for Angular Templates",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -17,10 +17,10 @@
"LICENSE"
],
"dependencies": {
"@angular-eslint/bundled-angular-compiler": "17.3.0",
"@angular-eslint/utils": "17.3.0",
"@typescript-eslint/type-utils": "7.2.0",
"@typescript-eslint/utils": "7.2.0",
"@angular-eslint/bundled-angular-compiler": "0.0.0-e2e",
"@angular-eslint/utils": "0.0.0-e2e",
"@typescript-eslint/type-utils": "7.6.0",
"@typescript-eslint/utils": "7.6.0",
"aria-query": "5.3.0",
"axobject-query": "4.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
| [`component-class-suffix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md) | Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03 | :white_check_mark: | | |
| [`component-max-inline-declarations`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-max-inline-declarations.md) | Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.io/guide/styleguide#style-05-04 | | | |
| [`component-selector`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-selector.md) | Component selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-07, https://angular.io/guide/styleguide#style-05-02 and https://angular.io/guide/styleguide#style-05-03. | | | |
| [`consistent-component-styles`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-component-styles.md) | Ensures component `styles`/`styleUrl` with `string` is used over `styles`/`styleUrls` when there is only a single string in the array | | :wrench: | |
| [`consistent-component-styles`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-component-styles.md) | Ensures consistent usage of `styles`/`styleUrls`/`styleUrl` within Component metadata | | :wrench: | |
| [`contextual-decorator`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md) | Ensures that classes use contextual decorators in its body | | | |
| [`directive-class-suffix`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md) | Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03 | :white_check_mark: | | |
| [`directive-selector`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-selector.md) | Directive selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-06 and https://angular.io/guide/styleguide#style-02-08. | | | |
Expand Down Expand Up @@ -88,7 +88,7 @@
<!-- prettier-ignore-start -->
| Rule | Replaced by |
| --- | --- |
| [`prefer-standalone-component`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone-component.md) | [`prefer-standalone`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone-component.md) |
| [`prefer-standalone-component`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone-component.md) | [`prefer-standalone`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md) |
<!-- prettier-ignore-end -->

<!-- end deprecated rule list -->
6 changes: 3 additions & 3 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-eslint/eslint-plugin",
"version": "17.3.0",
"version": "0.0.0-e2e",
"description": "ESLint plugin for Angular applications, following angular.io/styleguide",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -17,8 +17,8 @@
"LICENSE"
],
"dependencies": {
"@angular-eslint/utils": "17.3.0",
"@typescript-eslint/utils": "7.2.0"
"@angular-eslint/utils": "0.0.0-e2e",
"@typescript-eslint/utils": "7.6.0"
},
"peerDependencies": {
"eslint": "^7.20.0 || ^8.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/schematics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-eslint/schematics",
"version": "17.3.0",
"version": "0.0.0-e2e",
"description": "Angular Schematics for angular-eslint",
"license": "MIT",
"main": "dist/index.js",
Expand Down Expand Up @@ -33,8 +33,8 @@
"save": "devDependencies"
},
"dependencies": {
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/eslint-plugin": "0.0.0-e2e",
"@angular-eslint/eslint-plugin-template": "0.0.0-e2e",
"@nx/devkit": "^17.2.8 || ^18.0.0",
"ignore": "5.3.1",
"nx": "^17.2.8 || ^18.0.0",
Expand All @@ -43,7 +43,7 @@
},
"devDependencies": {
"@types/tmp": "0.2.6",
"@typescript-eslint/utils": "7.2.0",
"@typescript-eslint/utils": "7.6.0",
"eslint": "8.57.0"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/template-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-eslint/template-parser",
"version": "17.3.0",
"version": "0.0.0-e2e",
"description": "Angular Template parser for ESLint",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -17,7 +17,7 @@
"LICENSE"
],
"dependencies": {
"@angular-eslint/bundled-angular-compiler": "17.3.0",
"@angular-eslint/bundled-angular-compiler": "0.0.0-e2e",
"eslint-scope": "^8.0.0"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-eslint/utils",
"version": "17.3.0",
"version": "0.0.0-e2e",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -20,8 +20,8 @@
"typescript": "*"
},
"dependencies": {
"@angular-eslint/bundled-angular-compiler": "17.3.0",
"@typescript-eslint/utils": "7.2.0"
"@angular-eslint/bundled-angular-compiler": "0.0.0-e2e",
"@typescript-eslint/utils": "7.6.0"
},
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"
}
4 changes: 3 additions & 1 deletion tools/scripts/generate-rule-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const testDirs = readdirSync(testDirsDir);
testCasesFilePath,
} = ruleData;

const docs = ruleData.ruleConfig.meta.docs as TSESLint.RuleMetaDataDocs;
const docs = ruleData.ruleConfig.meta.docs as TSESLint.RuleMetaDataDocs<
unknown[]
>;
const { description } = docs;

let schemaAsInterface = '';
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/generate-rule-lists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const columnsDeprecated: Column[] = [
dataFn: ([name, rule]: RuleItem, plugin: Plugin) =>
(rule.meta.replacedBy || [])
.map((replacer) =>
createRuleLink([name, rule], plugin).replace(name, replacer),
createRuleLink([name, rule], plugin).replaceAll(name, replacer),
)
.join(', '),
},
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"pretty": true,
"sourceMap": false,
"strict": true,
"target": "es2017",
"lib": ["es2017"],
"target": "ES2022",
"lib": ["ES2022"],
"skipLibCheck": true,
"paths": {
"@angular-eslint/bundled-angular-compiler": [
Expand Down

0 comments on commit b6181ad

Please sign in to comment.