Skip to content

Commit 33ba630

Browse files
committed
refactor: centralize ESLint file targeting within eslint.config.mjs to process only TypeScript files and ignore JavaScript files
This is needed as the glob is no longer being parsed from the CLI. ``` Run pnpm lint --cache-strategy content > @angular/devkit-repo@22.0.0-next.0 lint /home/runner/work/angular-cli/angular-cli > eslint --cache --max-warnings=0 "**/*.@(ts|mts|cts)" --cache-strategy content Oops! Something went wrong! :( ESLint: 10.0.2 No files matching the pattern "**/*.@(ts|mts|cts)" were found. Please check for typing mistakes in the pattern.  ELIFECYCLE  Command failed with exit code 2. ```
1 parent 9d167ca commit 33ba630

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

eslint.config.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
1010
import { FlatCompat } from '@eslint/eslintrc';
1111
import js from '@eslint/js';
1212
import stylistic from '@stylistic/eslint-plugin';
13+
import header from '@tony.ganchev/eslint-plugin-header';
1314
import typescriptEslint from '@typescript-eslint/eslint-plugin';
1415
import tsParser from '@typescript-eslint/parser';
15-
import header from '@tony.ganchev/eslint-plugin-header';
1616
import _import from 'eslint-plugin-import';
1717
import globals from 'globals';
1818

@@ -23,8 +23,14 @@ const compat = new FlatCompat({
2323
});
2424

2525
export default [
26+
{
27+
files: ['**/*.ts', '**/*.mts', '**/*.cts'],
28+
},
2629
{
2730
ignores: [
31+
'**/*.js',
32+
'**/*.mjs',
33+
'**/*.cjs',
2834
'**/bazel-out',
2935
'**/dist-schema',
3036
'goldens/public-api',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test": "bazel test //packages/...",
1717
"build": "pnpm -s admin build",
1818
"build-schema": "bazel build //... --build_tag_filters schema --symlink_prefix dist-schema/",
19-
"lint": "eslint --cache --max-warnings=0 \"**/*.@(ts|mts|cts)\"",
19+
"lint": "eslint --cache --max-warnings=0",
2020
"templates": "pnpm -s admin templates",
2121
"validate": "pnpm -s admin validate",
2222
"postinstall": "husky",

0 commit comments

Comments
 (0)