Skip to content

Commit 2dbfcff

Browse files
committed
chore(*): Updated linting config for example apps
1 parent e82c9a2 commit 2dbfcff

File tree

6 files changed

+1201
-22
lines changed

6 files changed

+1201
-22
lines changed

examples/angular/eslint.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
import js from "@eslint/js";
1818
import prettier from "eslint-config-prettier";
19+
import typescript from "@typescript-eslint/eslint-plugin";
20+
import typescriptParser from "@typescript-eslint/parser";
1921

2022
export default [
2123
{ ignores: ["dist/**", "node_modules/**", ".angular/**"] },
@@ -26,13 +28,18 @@ export default [
2628
languageOptions: {
2729
ecmaVersion: 2022,
2830
sourceType: "module",
31+
parser: typescriptParser,
2932
parserOptions: {
3033
project: "./tsconfig.json",
3134
},
3235
},
36+
plugins: {
37+
"@typescript-eslint": typescript,
38+
},
3339
rules: {
34-
"no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
35-
"no-console": "warn",
40+
"no-unused-vars": "off", // Use TypeScript version instead
41+
"no-console": "off", // Allow console in examples
42+
"no-undef": "off", // TypeScript handles this
3643
"prefer-const": "error",
3744
"no-var": "error",
3845
"@typescript-eslint/no-explicit-any": "warn",

examples/angular/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "angular-example",
33
"version": "0.0.0",
4+
"type": "module",
45
"scripts": {
56
"ng": "ng",
67
"start": "ng serve",
@@ -51,6 +52,8 @@
5152
"@types/jasmine": "~5.1.0",
5253
"@types/node": "^20.19.0",
5354
"eslint": "^9.22.0",
55+
"@typescript-eslint/eslint-plugin": "^8.43.0",
56+
"@typescript-eslint/parser": "^8.43.0",
5457
"eslint-config-prettier": "^9.1.0",
5558
"firebase": "^11",
5659
"jasmine-core": "~5.5.0",

examples/nextjs/.eslintrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": ["next/core-web-vitals"],
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint"],
5+
"rules": {
6+
"@typescript-eslint/no-explicit-any": "warn",
7+
"no-console": "off"
8+
}
9+
}

examples/nextjs/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"@types/node": "^20",
2828
"@types/react": "^19",
2929
"@types/react-dom": "^19",
30+
"eslint": "^9.22.0",
31+
"eslint-config-next": "^15.1.7",
32+
"@typescript-eslint/eslint-plugin": "^8.43.0",
33+
"@typescript-eslint/parser": "^8.43.0",
3034
"postcss": "^8.5.2",
3135
"postcss-load-config": "^6.0.1",
3236
"prettier": "^3.1.1",

0 commit comments

Comments
 (0)