Skip to content

Commit 551449d

Browse files
committed
Fix ESLint configuration to exclude JavaScript tooling files
1 parent d792cf2 commit 551449d

File tree

190 files changed

+12071
-1285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+12071
-1285
lines changed

.archive/README.md

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!--
2+
generated-by: [email protected]
3+
source-ddd-kit: latest
4+
resolved-uids:
5+
6+
action-run-id: manual-run
7+
managed-block: begin
8+
-->
9+
10+
# Implementation Notes for T-001
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!--
2+
generated-by: [email protected]
3+
source-ddd-kit: latest
4+
resolved-uids:
5+
- tech:typescript/frameworks/[email protected]@sha256:...
6+
action-run-id: manual-run
7+
managed-block: begin
8+
-->
9+
10+
# Implementation Notes for t.2025.0924.08
11+
12+
<!-- dddctl-managed:start:key=tech:typescript/frameworks/[email protected] -->
13+
14+
## Guidance from tech:typescript/frameworks/[email protected]
15+
16+
> Summary: Opinionated Express 5 guide for Node 20 services.
17+
18+
## When to use
19+
20+
Use Express 5 for building REST APIs in Node.js.
21+
22+
## Pre-reqs
23+
24+
- Node 20
25+
- TypeScript
26+
27+
## Install / Setup
28+
29+
npm install express
30+
31+
## Code patterns
32+
33+
Use middleware for validation.
34+
35+
<!-- dddctl-managed:end:key=tech:typescript/frameworks/[email protected] -->

.eslintrc.cjs

Lines changed: 141 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,178 @@
11
module.exports = {
22
root: true,
3+
ignorePatterns: ['*.config.js', '*.config.cjs', 'tools/ci-scripts/**/*'],
34
parser: '@typescript-eslint/parser',
45
parserOptions: {
56
ecmaVersion: 2020,
67
sourceType: 'module',
8+
project: './tsconfig.json',
79
},
8-
plugins: ['@typescript-eslint', 'prettier'],
10+
plugins: ['@typescript-eslint', 'prettier', 'import', 'security'],
911
extends: [
1012
'eslint:recommended',
1113
'plugin:@typescript-eslint/recommended',
14+
'plugin:import/recommended',
15+
'plugin:import/typescript',
1216
'plugin:prettier/recommended',
1317
],
18+
settings: {
19+
// Removed problematic import resolver for now
20+
},
1421
env: {
1522
node: true,
1623
es6: true,
1724
},
25+
ignorePatterns: ['*.config.js', '*.config.ts', 'webpack.config.js', 'webpack.config.ts', 'tools/ci-scripts/**/*'],
26+
rules: {
27+
// Prettier integration
28+
'prettier/prettier': 'error',
29+
30+
// TypeScript strict rules
31+
'@typescript-eslint/no-explicit-any': 'error',
32+
'@typescript-eslint/no-non-null-assertion': 'warn',
33+
'@typescript-eslint/no-unnecessary-condition': 'error',
34+
'@typescript-eslint/strict-boolean-expressions': 'error',
35+
'@typescript-eslint/no-confusing-void-expression': 'error',
36+
'@typescript-eslint/prefer-readonly': 'error',
37+
'@typescript-eslint/prefer-readonly-parameter-types': 'off', // Too strict for current codebase
38+
39+
'import/no-unresolved': 'error',
40+
// 'import/no-cycle': 'error',
41+
'import/no-self-import': 'error',
42+
// 'import/no-absolute-path': 'error',
43+
// 'import/no-unused-modules': 'error',
44+
'import/no-deprecated': 'warn',
45+
'import/order': [
46+
'error',
47+
{
48+
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
49+
'newlines-between': 'always',
50+
},
51+
],
52+
53+
// Sorting and ordering rules
54+
'sort-keys': ['warn', 'asc', { caseSensitive: false, natural: true }],
55+
'sort-vars': 'error',
56+
'@typescript-eslint/member-ordering': [
57+
'error',
58+
{
59+
default: ['signature', 'field', 'constructor', 'method'],
60+
},
61+
],
62+
63+
// Security rules
64+
'security/detect-object-injection': 'warn',
65+
'security/detect-non-literal-fs-filename': 'warn',
66+
'security/detect-unsafe-regex': 'error',
67+
68+
// General code quality
69+
'no-unused-vars': 'off', // Use @typescript-eslint/no-unused-vars instead
70+
'@typescript-eslint/no-unused-vars': [
71+
'error',
72+
{
73+
argsIgnorePattern: '^_',
74+
varsIgnorePattern: '^_',
75+
ignoreRestSiblings: true,
76+
args: 'after-used',
77+
caughtErrorsIgnorePattern: '^_',
78+
},
79+
],
80+
81+
// Enforce consistent coding style
82+
eqeqeq: ['error', 'always', { null: 'ignore' }],
83+
'consistent-return': 'error',
84+
'no-implicit-coercion': 'error',
85+
yoda: 'error',
86+
'no-bitwise': 'warn',
87+
'no-lone-blocks': 'error',
88+
'no-multi-assign': 'error',
89+
'no-new-object': 'error',
90+
'no-array-constructor': 'error',
91+
'no-new-wrappers': 'error',
92+
'no-extend-native': 'error',
93+
'no-implicit-globals': 'error',
94+
'no-invalid-this': 'error',
95+
'no-shadow': 'off', // Disabled in favor of @typescript-eslint/no-shadow
96+
'@typescript-eslint/no-shadow': 'error',
97+
'no-undef': 'error',
98+
'no-undefined': 'error',
99+
'no-use-before-define': 'error',
100+
'@typescript-eslint/no-use-before-define': 'error',
101+
102+
// Code complexity and maintainability
103+
'max-lines-per-function': ['error', 50],
104+
'max-params': ['error', 4],
105+
'max-depth': ['error', 4],
106+
'max-nested-callbacks': ['error', 3],
107+
complexity: ['error', 10],
108+
'max-lines': ['error', 300],
109+
110+
// Security rules (additional to plugin)
111+
'no-eval': 'error',
112+
'no-implied-eval': 'error',
113+
'no-new-func': 'error',
114+
'no-script-url': 'error',
115+
116+
// Performance rules
117+
'no-loop-func': 'error',
118+
119+
// Best practices
120+
'no-else-return': 'error',
121+
'no-lonely-if': 'error',
122+
'no-unneeded-ternary': 'error',
123+
'no-useless-computed-key': 'error',
124+
'no-useless-rename': 'error',
125+
'prefer-object-spread': 'error',
126+
'default-case': 'error',
127+
'default-case-last': 'error',
128+
'no-fallthrough': 'error',
129+
'no-case-declarations': 'error',
130+
'no-constructor-return': 'error',
131+
'no-duplicate-case': 'error',
132+
'no-self-compare': 'error',
133+
'no-template-curly-in-string': 'error',
134+
'no-unreachable-loop': 'error',
135+
'require-atomic-updates': 'error',
136+
'no-param-reassign': 'error',
137+
'no-return-assign': 'error',
138+
'no-return-await': 'error',
139+
'require-await': 'error',
140+
'no-async-promise-executor': 'error',
141+
'no-await-in-loop': 'warn',
142+
'no-promise-executor-return': 'error',
143+
},
18144
overrides: [
19145
{
20-
files: ['test/**/*.js', 'test/**/*.ts'],
146+
files: ['**/*.test.ts', '**/*.spec.ts', '**/__tests__/**/*'],
147+
parserOptions: {
148+
project: './tsconfig.test.json',
149+
},
21150
env: {
22151
jest: true,
23152
},
24-
},
25-
{
26-
files: ['src/types/**/*.ts', 'src/validation/**/*.ts', 'src/core/**/*.ts'],
27153
rules: {
28-
'@typescript-eslint/no-unused-vars': [
29-
'warn',
30-
{
31-
argsIgnorePattern: '^_',
32-
varsIgnorePattern: '^_',
33-
ignoreRestSiblings: true,
34-
args: 'none',
35-
caughtErrorsIgnorePattern: '^_',
36-
},
37-
],
154+
'@typescript-eslint/no-explicit-any': 'off',
155+
'@typescript-eslint/no-non-null-assertion': 'off',
156+
'@typescript-eslint/no-unused-vars': 'off',
157+
'@typescript-eslint/no-unnecessary-condition': 'off',
158+
'@typescript-eslint/strict-boolean-expressions': 'off',
159+
'no-unused-vars': 'off',
160+
'max-lines-per-function': 'off',
161+
complexity: 'off',
38162
},
39163
},
40164
{
41-
files: ['src/commands/**/*.ts'],
165+
files: ['src/types/**/*.ts'],
42166
rules: {
43167
'@typescript-eslint/no-unused-vars': [
44168
'warn',
45169
{
46-
argsIgnorePattern: 'options',
170+
argsIgnorePattern: '^_',
47171
varsIgnorePattern: '^_',
48172
ignoreRestSiblings: true,
49-
args: 'after-used',
50-
caughtErrorsIgnorePattern: '^_',
51173
},
52174
],
53175
},
54176
},
55177
],
56-
rules: {
57-
'prettier/prettier': 'error',
58-
'@typescript-eslint/no-explicit-any': 'error',
59-
'no-unused-vars': 'warn',
60-
'@typescript-eslint/no-unused-vars': [
61-
'warn',
62-
{
63-
argsIgnorePattern: 'options',
64-
varsIgnorePattern: '^_',
65-
ignoreRestSiblings: true,
66-
args: 'after-used',
67-
caughtErrorsIgnorePattern: '^_',
68-
},
69-
],
70-
eqeqeq: ['error', 'always'],
71-
'consistent-return': 'error',
72-
'no-implicit-coercion': 'warn',
73-
'@typescript-eslint/explicit-module-boundary-types': 'warn',
74-
},
75178
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build Catalogs
2+
on:
3+
push:
4+
branches: [main]
5+
paths:
6+
- 'standards/**'
7+
- 'tech/**'
8+
- 'templates/**'
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '20'
17+
- run: npm ci
18+
- run: npm run build
19+
- run: node tools/ci-scripts/build-catalogs.js
20+
- uses: stefanzweifel/git-auto-commit-action@v5
21+
with:
22+
commit_message: 'Update catalogs'
23+
file_pattern: 'standards/catalogs/*.json'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Validate Docs
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
jobs:
8+
validate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: '20'
15+
- run: npm ci
16+
- run: npm run build
17+
- run: node tools/ci-scripts/build-catalogs.js
18+
- run: npm run cli ref audit

.github/workflows/linkcheck.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Link Check
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0' # Weekly
5+
jobs:
6+
linkcheck:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
11+
with:
12+
use-quiet-mode: 'yes'
13+
use-verbose-mode: 'yes'
14+
config-file: '.github/linkcheck.json'

0 commit comments

Comments
 (0)