@santi020k/eslint-config-basic 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -272
- package/dist/index.d.ts +21 -0
- package/dist/index.js +127 -0
- package/package.json +47 -50
- package/.agent/rules/context.md +0 -78
- package/.agent/rules/guidelines.md +0 -124
- package/.editorconfig +0 -13
- package/.env.example +0 -8
- package/.github/CODEOWNERS +0 -2
- package/.github/DISCUSSION_TEMPLATE/rfcs.yml +0 -21
- package/.github/DISCUSSION_TEMPLATE/technical-discussions.yml +0 -21
- package/.github/FUNDING.yml +0 -2
- package/.github/ISSUE_TEMPLATE/README.md +0 -13
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -69
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -43
- package/.github/ISSUE_TEMPLATE/question.yml +0 -22
- package/.github/SECURITY.md +0 -12
- package/.github/SPONSORSHIPS.md +0 -27
- package/.github/dependabot.yml +0 -45
- package/.github/labeler.yml +0 -46
- package/.github/pull_request_template.md +0 -56
- package/.github/workflows/assign-issues.yml +0 -18
- package/.github/workflows/audit.yml +0 -22
- package/.github/workflows/build.yml +0 -29
- package/.github/workflows/codeql.yml +0 -40
- package/.github/workflows/docs.yml +0 -49
- package/.github/workflows/labeler.yml +0 -18
- package/.github/workflows/publish.yml +0 -24
- package/.github/workflows/release.yml +0 -35
- package/.github/workflows/size-check.yml +0 -23
- package/.github/workflows/stale.yml +0 -31
- package/.nvmrc +0 -1
- package/.vscode/extensions.json +0 -10
- package/.vscode/settings.json +0 -55
- package/CHANGELOG.md +0 -16
- package/CONTRIBUTING.md +0 -194
- package/DEVELOPMENT.md +0 -4
- package/LICENSE +0 -21
- package/config/.husky/commit-msg +0 -9
- package/config/.husky/pre-commit +0 -1
- package/config/.husky/pre-push +0 -1
- package/config/.husky/prepare-commit-msg +0 -1
- package/cspell.config.yaml +0 -2
- package/eslint.config.js +0 -21
- package/llms.txt +0 -72
- package/packages/astro/README.md +0 -13
- package/packages/astro/package.json +0 -45
- package/packages/astro/src/ambient.d.ts +0 -10
- package/packages/astro/src/index.ts +0 -18
- package/packages/astro/src/rules.ts +0 -29
- package/packages/astro/tsconfig.json +0 -9
- package/packages/astro/tsup.config.ts +0 -11
- package/packages/basic/README.md +0 -33
- package/packages/basic/package.json +0 -55
- package/packages/basic/src/index.ts +0 -110
- package/packages/basic/tsconfig.json +0 -9
- package/packages/basic/tsup.config.ts +0 -18
- package/packages/core/README.md +0 -14
- package/packages/core/index.ts +0 -14
- package/packages/core/package.json +0 -61
- package/packages/core/src/ambient.d.ts +0 -61
- package/packages/core/src/index.ts +0 -75
- package/packages/core/src/rules.ts +0 -157
- package/packages/core/src/settings/gitignore.ts +0 -10
- package/packages/core/src/settings/index.ts +0 -1
- package/packages/core/src/types.ts +0 -57
- package/packages/core/src/utils/index.ts +0 -28
- package/packages/core/tsconfig.json +0 -9
- package/packages/core/tsup.config.ts +0 -10
- package/packages/expo/README.md +0 -13
- package/packages/expo/package.json +0 -48
- package/packages/expo/src/ambient.d.ts +0 -3
- package/packages/expo/src/index.ts +0 -39
- package/packages/expo/tsconfig.json +0 -9
- package/packages/expo/tsup.config.ts +0 -11
- package/packages/nest/package.json +0 -45
- package/packages/nest/src/ambient.d.ts +0 -14
- package/packages/nest/src/index.ts +0 -20
- package/packages/nest/src/rules.ts +0 -15
- package/packages/nest/tsconfig.json +0 -9
- package/packages/nest/tsup.config.ts +0 -11
- package/packages/next/README.md +0 -13
- package/packages/next/package.json +0 -47
- package/packages/next/src/index.ts +0 -31
- package/packages/next/src/rules.ts +0 -16
- package/packages/next/tsconfig.json +0 -9
- package/packages/next/tsup.config.ts +0 -10
- package/packages/optionals/README.md +0 -18
- package/packages/optionals/package.json +0 -55
- package/packages/optionals/src/ambient.d.ts +0 -25
- package/packages/optionals/src/cspell.ts +0 -14
- package/packages/optionals/src/i18next.ts +0 -19
- package/packages/optionals/src/index.ts +0 -8
- package/packages/optionals/src/markdown.ts +0 -66
- package/packages/optionals/src/mdx.ts +0 -40
- package/packages/optionals/src/stencil.ts +0 -48
- package/packages/optionals/src/tailwind.ts +0 -11
- package/packages/optionals/src/vitest.ts +0 -61
- package/packages/optionals/tsconfig.json +0 -9
- package/packages/optionals/tsup.config.ts +0 -11
- package/packages/playground/README.md +0 -14
- package/packages/playground/package.json +0 -17
- package/packages/playground/src/astro/eslint.config.js +0 -4
- package/packages/playground/src/js/eslint.config.js +0 -4
- package/packages/playground/src/js/index.test.js +0 -63
- package/packages/playground/src/mdx/eslint.config.js +0 -4
- package/packages/playground/src/mdx/index.mdx +0 -115
- package/packages/playground/src/react/eslint.config.js +0 -4
- package/packages/playground/src/react/index.test.jsx +0 -130
- package/packages/playground/src/ts/eslint.config.js +0 -4
- package/packages/playground/src/ts/index.test.ts +0 -61
- package/packages/playground/src/ts/tsconfig.json +0 -3
- package/packages/playground/tsconfig.json +0 -9
- package/packages/react/README.md +0 -14
- package/packages/react/index.ts +0 -26
- package/packages/react/package.json +0 -49
- package/packages/react/src/ambient.d.ts +0 -23
- package/packages/react/src/index.ts +0 -52
- package/packages/react/src/rules.ts +0 -47
- package/packages/react/tsconfig.json +0 -9
- package/packages/react/tsup.config.ts +0 -10
- package/packages/tests/README.md +0 -17
- package/packages/tests/package.json +0 -21
- package/packages/tests/src/__snapshots__/snapshots.test.ts.snap +0 -654
- package/packages/tests/src/composition.test.ts +0 -171
- package/packages/tests/src/configs.test.ts +0 -118
- package/packages/tests/src/rules.test.ts +0 -60
- package/packages/tests/src/snapshots.test.ts +0 -126
- package/packages/tests/tsconfig.json +0 -10
- package/packages/tests/vitest.config.ts +0 -8
- package/packages/typescript/README.md +0 -14
- package/packages/typescript/package.json +0 -47
- package/packages/typescript/src/index.ts +0 -32
- package/packages/typescript/src/rules.ts +0 -36
- package/packages/typescript/tsconfig.json +0 -9
- package/packages/typescript/tsup.config.ts +0 -10
- package/tsconfig.base.json +0 -20
- package/tsconfig.docs.json +0 -18
- package/turbo.json +0 -19
- package/typedoc.config.mjs +0 -25
- package/typedoc.markdown.mjs +0 -26
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
name: Deploy Docs
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
pages: write
|
|
11
|
-
id-token: write
|
|
12
|
-
|
|
13
|
-
concurrency:
|
|
14
|
-
group: pages
|
|
15
|
-
cancel-in-progress: true
|
|
16
|
-
|
|
17
|
-
jobs:
|
|
18
|
-
build:
|
|
19
|
-
runs-on: ubuntu-latest
|
|
20
|
-
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v6
|
|
23
|
-
- name: Setup Node
|
|
24
|
-
uses: actions/setup-node@v6
|
|
25
|
-
with:
|
|
26
|
-
node-version: '22'
|
|
27
|
-
cache: 'npm'
|
|
28
|
-
- run: npm ci
|
|
29
|
-
- run: npm run build
|
|
30
|
-
- name: Generate docs
|
|
31
|
-
run: npm run docs
|
|
32
|
-
- name: Create .nojekyll
|
|
33
|
-
run: touch docs/.nojekyll
|
|
34
|
-
- name: Upload Pages artifact
|
|
35
|
-
uses: actions/upload-pages-artifact@v4
|
|
36
|
-
with:
|
|
37
|
-
path: docs
|
|
38
|
-
|
|
39
|
-
deploy:
|
|
40
|
-
needs: build
|
|
41
|
-
runs-on: ubuntu-latest
|
|
42
|
-
environment:
|
|
43
|
-
name: github-pages
|
|
44
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
45
|
-
|
|
46
|
-
steps:
|
|
47
|
-
- name: Deploy to GitHub Pages
|
|
48
|
-
id: deployment
|
|
49
|
-
uses: actions/deploy-pages@v4
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
name: PR Labeler
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request_target:
|
|
5
|
-
types: [opened, synchronize, reopened]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read
|
|
9
|
-
pull-requests: write
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
label:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/labeler@v6
|
|
17
|
-
with:
|
|
18
|
-
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: Publish to NPM
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [created]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
publish:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout
|
|
13
|
-
uses: actions/checkout@v6
|
|
14
|
-
- name: Setup Node
|
|
15
|
-
uses: actions/setup-node@v6
|
|
16
|
-
with:
|
|
17
|
-
node-version: '22'
|
|
18
|
-
registry-url: 'https://registry.npmjs.org'
|
|
19
|
-
- name: Install dependencies and build
|
|
20
|
-
run: npm ci && npm run build
|
|
21
|
-
- name: Publish package on NPM
|
|
22
|
-
run: npm publish -w packages/basic
|
|
23
|
-
env:
|
|
24
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
name: Releases
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
changelog:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
permissions:
|
|
12
|
-
contents: write
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- name: Check out repository
|
|
16
|
-
uses: actions/checkout@v6
|
|
17
|
-
|
|
18
|
-
- name: Generate Conventional Changelog
|
|
19
|
-
id: changelog
|
|
20
|
-
uses: TriPSs/conventional-changelog-action@v6
|
|
21
|
-
with:
|
|
22
|
-
github-token: ${{ secrets.PA_TOKEN }}
|
|
23
|
-
version-file: './package.json,./package-lock.json'
|
|
24
|
-
|
|
25
|
-
- name: Create GitHub Release
|
|
26
|
-
if: ${{ steps.changelog.outputs.skipped == 'false' }}
|
|
27
|
-
uses: softprops/action-gh-release@v2
|
|
28
|
-
with:
|
|
29
|
-
tag_name: ${{ steps.changelog.outputs.tag }}
|
|
30
|
-
name: ${{ steps.changelog.outputs.tag }}
|
|
31
|
-
body: ${{ steps.changelog.outputs.clean_changelog }}
|
|
32
|
-
draft: false
|
|
33
|
-
prerelease: false
|
|
34
|
-
env:
|
|
35
|
-
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: Package Size
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: [main]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
size:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
permissions:
|
|
11
|
-
contents: read
|
|
12
|
-
pull-requests: write
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v6
|
|
16
|
-
- uses: pkg-size/action@v1
|
|
17
|
-
with:
|
|
18
|
-
build-command: npm run build
|
|
19
|
-
display-size: uncompressed,gzip
|
|
20
|
-
comment-report: true
|
|
21
|
-
unchanged-files: collapse
|
|
22
|
-
env:
|
|
23
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: Stale Issues & PRs
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: '0 0 * * *' # Daily at midnight UTC
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
issues: write
|
|
9
|
-
pull-requests: write
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
stale:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/stale@v10
|
|
17
|
-
with:
|
|
18
|
-
stale-issue-message: >
|
|
19
|
-
This issue has been automatically marked as stale because it has not had
|
|
20
|
-
recent activity. It will be closed in 7 days if no further activity occurs.
|
|
21
|
-
stale-pr-message: >
|
|
22
|
-
This PR has been automatically marked as stale because it has not had
|
|
23
|
-
recent activity. It will be closed in 7 days if no further activity occurs.
|
|
24
|
-
days-before-issue-stale: 30
|
|
25
|
-
days-before-issue-close: 7
|
|
26
|
-
days-before-pr-stale: 14
|
|
27
|
-
days-before-pr-close: 7
|
|
28
|
-
stale-issue-label: stale
|
|
29
|
-
stale-pr-label: stale
|
|
30
|
-
exempt-issue-labels: pinned,security
|
|
31
|
-
exempt-pr-labels: pinned,security
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v22.9.0
|
package/.vscode/extensions.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"recommendations": [
|
|
3
|
-
"davidanson.vscode-markdownlint",
|
|
4
|
-
"dbaeumer.vscode-eslint",
|
|
5
|
-
"editorconfig.editorconfig",
|
|
6
|
-
"streetsidesoftware.code-spell-checker",
|
|
7
|
-
"mrmlnc.vscode-json5"
|
|
8
|
-
],
|
|
9
|
-
"unwantedRecommendations": ["hookyqr.beautify", "dbaeumer.jshint"]
|
|
10
|
-
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// This matches the value configured on the autoformatter
|
|
3
|
-
"editor.rulers": [80],
|
|
4
|
-
|
|
5
|
-
// An array of language ids which should be validated by ESLint
|
|
6
|
-
"eslint.validate": [
|
|
7
|
-
"javascript",
|
|
8
|
-
"javascriptreact",
|
|
9
|
-
"typescript",
|
|
10
|
-
"typescriptreact",
|
|
11
|
-
"markdown",
|
|
12
|
-
"md",
|
|
13
|
-
"mdx"
|
|
14
|
-
],
|
|
15
|
-
// required to make the extension pickup the flat config
|
|
16
|
-
"eslint.useFlatConfig": true,
|
|
17
|
-
|
|
18
|
-
// When enabled, will trim trailing whitespace when saving a file.
|
|
19
|
-
"files.trimTrailingWhitespace": true,
|
|
20
|
-
|
|
21
|
-
// typescript auto-format settings
|
|
22
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
23
|
-
"javascript.preferences.importModuleSpecifier": "project-relative",
|
|
24
|
-
"typescript.preferences.importModuleSpecifier": "project-relative",
|
|
25
|
-
"javascript.preferences.quoteStyle": "single",
|
|
26
|
-
"typescript.preferences.quoteStyle": "single",
|
|
27
|
-
|
|
28
|
-
// make the .shot files from jest-specific-snapshot act like normal snapshots
|
|
29
|
-
"files.associations": {
|
|
30
|
-
"*.shot": "jest-snapshot"
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
"editor.formatOnSave": true,
|
|
34
|
-
"editor.formatOnPaste": true,
|
|
35
|
-
"[typescriptreact]": {
|
|
36
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
37
|
-
},
|
|
38
|
-
"[scss]": {
|
|
39
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
40
|
-
},
|
|
41
|
-
"files.exclude": {
|
|
42
|
-
"**/.git": true,
|
|
43
|
-
"**/.svn": true,
|
|
44
|
-
"**/.hg": true,
|
|
45
|
-
"**/CVS": true,
|
|
46
|
-
"**/.DS_Store": true,
|
|
47
|
-
"**/Thumbs.db": true,
|
|
48
|
-
"**/node_modules": false
|
|
49
|
-
},
|
|
50
|
-
"[typescript]": {
|
|
51
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
52
|
-
},
|
|
53
|
-
"eslint.runtime": "/Users/san/.nvm/versions/node/v22.9.0/bin/node",
|
|
54
|
-
"json.trace.server": "verbose",
|
|
55
|
-
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# 0.1.0 (2026-02-10)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Features
|
|
5
|
-
|
|
6
|
-
* Add and scripts to . ([9438293](https://github.com/santi020k/eslint-config-basic/commit/94382934292682ac82a24a4bf433b621687a23cb))
|
|
7
|
-
* Add Vitest ESLint configuration and include test files in linting and TypeScript compilation. ([db249e0](https://github.com/santi020k/eslint-config-basic/commit/db249e06d0c3270a5b61d7a77706cdd5f1773e0f))
|
|
8
|
-
* Add Vitest for comprehensive testing of ESLint configurations and rules. ([452d988](https://github.com/santi020k/eslint-config-basic/commit/452d988eb265fdd3abe0af0f690d86b77b4031d6))
|
|
9
|
-
* Implement GitHub Actions for repository automation, including stale issue management, dependency updates, PR labeling, security audits, package size checks, and an updated build workflow ([d5e77b7](https://github.com/santi020k/eslint-config-basic/commit/d5e77b7f8b12c7854892606172495c03f1db6052))
|
|
10
|
-
* Initial commit ([e527968](https://github.com/santi020k/eslint-config-basic/commit/e527968e975a9a0b5451eaee4462c315fe3c525b))
|
|
11
|
-
* Introduce AI agent guidelines, instructions, and project context, alongside minor code formatting and updated ESLint ignore patterns. ([c2e0d74](https://github.com/santi020k/eslint-config-basic/commit/c2e0d749ae92666e529517c02356ab385755cb0d))
|
|
12
|
-
* **nest:** Add NestJS ESLint Configuration Package ([#7](https://github.com/santi020k/eslint-config-basic/issues/7)) ([73d11df](https://github.com/santi020k/eslint-config-basic/commit/73d11df268e1f9fa524f66459274d3e4310c7db5))
|
|
13
|
-
* restructure ESLint configuration into a monorepo with core, TypeScript, React, and Next.js packages, and implement a new build system using tsup and TurboRepo. ([f5516c6](https://github.com/santi020k/eslint-config-basic/commit/f5516c6ebb9a5a06bd86420b62c98bd125aff03c))
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
# Contributing to @santi020k/eslint-config-basic
|
|
2
|
-
|
|
3
|
-
Thank you for your interest in contributing! This guide will help you get started.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- Node.js (version specified in `.nvmrc`)
|
|
8
|
-
- npm
|
|
9
|
-
|
|
10
|
-
## Setup
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# Clone the repository
|
|
14
|
-
git clone https://github.com/santi020k/eslint-config-basic.git
|
|
15
|
-
cd eslint-config-basic
|
|
16
|
-
|
|
17
|
-
# Install dependencies
|
|
18
|
-
npm install
|
|
19
|
-
|
|
20
|
-
# Build all packages
|
|
21
|
-
npm run build
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Monorepo Structure
|
|
25
|
-
|
|
26
|
-
This project uses **Turborepo** with **npm Workspaces**. Each ESLint config lives in its own package under `packages/`:
|
|
27
|
-
|
|
28
|
-
| Package | Path | Description |
|
|
29
|
-
|---------|------|-------------|
|
|
30
|
-
| `@santi020k/eslint-config-basic` | `packages/basic` | Main entry point, composes all configs |
|
|
31
|
-
| `@santi020k/eslint-config-core` | `packages/core` | Core JS rules, types, utilities |
|
|
32
|
-
| `@santi020k/eslint-config-typescript` | `packages/typescript` | TypeScript rules |
|
|
33
|
-
| `@santi020k/eslint-config-react` | `packages/react` | React + Hooks rules |
|
|
34
|
-
| `@santi020k/eslint-config-next` | `packages/next` | Next.js rules |
|
|
35
|
-
| `@santi020k/eslint-config-astro` | `packages/astro` | Astro rules |
|
|
36
|
-
| `@santi020k/eslint-config-expo` | `packages/expo` | Expo/React Native rules |
|
|
37
|
-
| `@santi020k/eslint-config-optionals` | `packages/optionals` | Optional configs (Tailwind, Vitest, etc.) |
|
|
38
|
-
|
|
39
|
-
## Adding a New Framework Config
|
|
40
|
-
|
|
41
|
-
1. **Create the package directory:**
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
mkdir -p packages/myframework/src
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
2. **Create `packages/myframework/package.json`:**
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"name": "@santi020k/eslint-config-myframework",
|
|
52
|
-
"version": "0.0.0",
|
|
53
|
-
"type": "module",
|
|
54
|
-
"main": "./dist/index.js",
|
|
55
|
-
"module": "./dist/index.js",
|
|
56
|
-
"types": "./dist/index.d.ts",
|
|
57
|
-
"exports": {
|
|
58
|
-
".": {
|
|
59
|
-
"import": "./dist/index.js",
|
|
60
|
-
"types": "./dist/index.d.ts"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"files": ["dist"],
|
|
64
|
-
"scripts": {
|
|
65
|
-
"build": "tsup",
|
|
66
|
-
"dev": "tsup --watch",
|
|
67
|
-
"clean": "rm -rf dist"
|
|
68
|
-
},
|
|
69
|
-
"dependencies": {
|
|
70
|
-
"@santi020k/eslint-config-core": "*"
|
|
71
|
-
},
|
|
72
|
-
"devDependencies": {
|
|
73
|
-
"tsup": "^8.5.1",
|
|
74
|
-
"typescript": "^5.9.3",
|
|
75
|
-
"@typescript-eslint/utils": "^8.54.0"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
3. **Create `packages/myframework/tsconfig.json`:**
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"extends": "../../tsconfig.base.json",
|
|
85
|
-
"compilerOptions": {
|
|
86
|
-
"outDir": "./dist",
|
|
87
|
-
"rootDir": "./src"
|
|
88
|
-
},
|
|
89
|
-
"include": ["src/**/*.ts"],
|
|
90
|
-
"exclude": ["node_modules", "dist"]
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
4. **Create `packages/myframework/tsup.config.ts`** (copy from an existing package).
|
|
95
|
-
|
|
96
|
-
5. **Create `packages/myframework/src/index.ts`:**
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
100
|
-
|
|
101
|
-
export const myframeworkConfig: TSESLint.FlatConfig.ConfigArray = [
|
|
102
|
-
{
|
|
103
|
-
name: 'eslint-config/myframework',
|
|
104
|
-
rules: {
|
|
105
|
-
// Add your rules here
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
6. **Add to `ConfigOption` enum** in `packages/core/src/types.ts`.
|
|
112
|
-
|
|
113
|
-
7. **Wire into `eslintConfig()`** in `packages/basic/src/index.ts`.
|
|
114
|
-
|
|
115
|
-
8. **Add tests** in `packages/tests/src/`.
|
|
116
|
-
9. **Update `ConfigOption` enum** in `packages/core/src/types.ts`.
|
|
117
|
-
10. **Wire into `eslintConfig()`** in `packages/basic/src/index.ts`.
|
|
118
|
-
|
|
119
|
-
### Specific Framework Guides
|
|
120
|
-
|
|
121
|
-
#### React, Next.js, Astro, Expo, NestJS
|
|
122
|
-
These are already implemented. See their respective `packages/` for reference.
|
|
123
|
-
|
|
124
|
-
#### Vue (Future)
|
|
125
|
-
1. Create `packages/vue`.
|
|
126
|
-
2. Extend `eslint-plugin-vue` configs.
|
|
127
|
-
3. Ensure TS compatibility.
|
|
128
|
-
|
|
129
|
-
#### Angular (Future)
|
|
130
|
-
1. Create `packages/angular`.
|
|
131
|
-
2. Use `angular-eslint` capabilities.
|
|
132
|
-
3. Note: Angular often requires a specific `builder` context.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
## Adding a New Optional
|
|
137
|
-
|
|
138
|
-
1. Create `packages/optionals/src/configs/myoptional.ts` with your config.
|
|
139
|
-
2. Export from `packages/optionals/src/index.ts`.
|
|
140
|
-
3. Add to `OptionalOption` enum in `packages/core/src/types.ts`.
|
|
141
|
-
4. Wire into `eslintConfig()` in `packages/basic/src/index.ts`.
|
|
142
|
-
|
|
143
|
-
## Available Commands
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
npm run build # Build all packages (Turborepo)
|
|
147
|
-
npm run lint # Lint entire monorepo
|
|
148
|
-
npm run lint:fix # Fix lint issues
|
|
149
|
-
npm run test # Run tests (Vitest)
|
|
150
|
-
npm run dev # Watch mode
|
|
151
|
-
npm run dev # Watch mode
|
|
152
|
-
npm run inspector # Visual ESLint config inspector
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## Documentation
|
|
156
|
-
|
|
157
|
-
Full API documentation is available at [santi020k.github.io/eslint-config-basic](https://santi020k.github.io/eslint-config-basic/).
|
|
158
|
-
|
|
159
|
-
## Commit Conventions
|
|
160
|
-
|
|
161
|
-
This project uses [Conventional Commits](https://www.conventionalcommits.org/). Use one of the following prefixes:
|
|
162
|
-
|
|
163
|
-
- `feat:` — New feature
|
|
164
|
-
- `fix:` — Bug fix
|
|
165
|
-
- `docs:` — Documentation only
|
|
166
|
-
- `style:` — Formatting, no code change
|
|
167
|
-
- `refactor:` — Code restructuring
|
|
168
|
-
- `perf:` — Performance improvement
|
|
169
|
-
- `test:` — Adding or updating tests
|
|
170
|
-
- `build:` — Build system changes
|
|
171
|
-
- `ci:` — CI/CD changes
|
|
172
|
-
- `chore:` — Maintenance tasks
|
|
173
|
-
- `revert:` — Revert a previous commit
|
|
174
|
-
|
|
175
|
-
You can use the interactive commit helper:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
npx cz
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Pull Request Guidelines
|
|
182
|
-
|
|
183
|
-
1. Fork the repository and create your branch from `main`.
|
|
184
|
-
2. Make sure all checks pass:
|
|
185
|
-
```bash
|
|
186
|
-
npm run build && npm run lint && npm run test
|
|
187
|
-
```
|
|
188
|
-
3. Write clear, descriptive commit messages following conventional commits.
|
|
189
|
-
4. Update documentation if you're changing public APIs.
|
|
190
|
-
5. Add tests for new functionality.
|
|
191
|
-
|
|
192
|
-
## Questions?
|
|
193
|
-
|
|
194
|
-
Open an [issue](https://github.com/santi020k/eslint-config/issues) or start a [discussion](https://github.com/santi020k/eslint-config/discussions).
|
package/DEVELOPMENT.md
DELETED
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 santi020k
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/config/.husky/commit-msg
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
if ! head -1 "$1" | grep -qE "^(feat|fix|chore|docs|test|style|refactor|perf|build|ci|revert)(\(.+?\))?: .{1,}$"; then
|
|
3
|
-
echo "Aborting commit. Your commit message is invalid." >&2
|
|
4
|
-
exit 1
|
|
5
|
-
fi
|
|
6
|
-
if ! head -1 "$1" | grep -qE "^.{1,200}$"; then
|
|
7
|
-
echo "Aborting commit. Your commit message is too long." >&2
|
|
8
|
-
exit 1
|
|
9
|
-
fi
|
package/config/.husky/pre-commit
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npm run pre-commit
|
package/config/.husky/pre-push
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npm run pre-push
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exec < /dev/tty && npx cz --hook || true
|
package/cspell.config.yaml
DELETED
package/eslint.config.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
import { ConfigOption, eslintConfig, OptionalOption } from '@santi020k/eslint-config-basic'
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
...eslintConfig({
|
|
6
|
-
config: [ConfigOption.Ts],
|
|
7
|
-
optionals: [OptionalOption.Mdx, OptionalOption.Markdown, OptionalOption.Vitest]
|
|
8
|
-
}),
|
|
9
|
-
{
|
|
10
|
-
name: 'local-config',
|
|
11
|
-
ignores: [
|
|
12
|
-
'dist/*',
|
|
13
|
-
'packages/*/dist/*',
|
|
14
|
-
'**/tsup.config.ts',
|
|
15
|
-
'docs/*',
|
|
16
|
-
'docs-md/*',
|
|
17
|
-
'typedoc.config.mjs',
|
|
18
|
-
'typedoc.markdown.mjs'
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
]
|
package/llms.txt
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# @santi020k/eslint-config-basic
|
|
2
|
-
|
|
3
|
-
> A comprehensive ESLint configuration package for JavaScript, TypeScript, React, Next.js, Astro, and Expo projects.
|
|
4
|
-
|
|
5
|
-
## AI Assistant Context
|
|
6
|
-
**Role**: You are a senior software engineer maintaining this high-quality ESLint config package.
|
|
7
|
-
**Goal**: Ensure code quality, type safety, and seamless developer experience (DX).
|
|
8
|
-
**Style**: Strict but practical. Prefer correctness over brevity.
|
|
9
|
-
|
|
10
|
-
## Quick Start
|
|
11
|
-
|
|
12
|
-
```js
|
|
13
|
-
import { ConfigOption, eslintConfig, OptionalOption } from '@santi020k/eslint-config-basic'
|
|
14
|
-
|
|
15
|
-
export default [
|
|
16
|
-
...eslintConfig({
|
|
17
|
-
config: [ConfigOption.React, ConfigOption.Ts],
|
|
18
|
-
optionals: [OptionalOption.Tailwind, OptionalOption.Vitest]
|
|
19
|
-
})
|
|
20
|
-
]
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Architecture
|
|
24
|
-
|
|
25
|
-
This is a monorepo-style ESLint config package using ESLint 9 Flat Config format.
|
|
26
|
-
|
|
27
|
-
### Directory Structure
|
|
28
|
-
|
|
29
|
-
packages/
|
|
30
|
-
├── basic/ # Main entry point (@santi020k/eslint-config-basic)
|
|
31
|
-
│ ├── src/index.ts # Exports eslintConfig()
|
|
32
|
-
│ └── dist/ # Build artifacts
|
|
33
|
-
├── core/ # Core logic and shared types
|
|
34
|
-
├── typescript/ # TypeScript config
|
|
35
|
-
├── react/ # React config
|
|
36
|
-
├── next/ # Next.js config
|
|
37
|
-
├── astro/ # Astro config
|
|
38
|
-
├── expo/ # Expo config
|
|
39
|
-
├── optionals/ # Optional feature configs
|
|
40
|
-
├── playground/ # Internal testing playground
|
|
41
|
-
└── tests/ # Integration tests
|
|
42
|
-
|
|
43
|
-
### Key Enums
|
|
44
|
-
|
|
45
|
-
- **ConfigOption**: `Ts`, `React`, `Next`, `Expo`, `Astro`
|
|
46
|
-
- **OptionalOption**: `Cspell`, `Tailwind`, `Vitest`, `I18next`, `Mdx`, `Markdown`, `Stencil`
|
|
47
|
-
- **SettingOption**: `Gitignore`
|
|
48
|
-
|
|
49
|
-
## Commands
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
npm run build # Build with tsup
|
|
53
|
-
npm run lint # Run ESLint
|
|
54
|
-
npm run lint:fix # Fix linting issues
|
|
55
|
-
npm run dev # Watch mode development
|
|
56
|
-
npm run inspector # Open ESLint config inspector
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Adding New Configurations
|
|
60
|
-
|
|
61
|
-
1. Create a new package under `packages/` (e.g. `packages/vue`).
|
|
62
|
-
2. Implement the config in `src/index.ts` of that package.
|
|
63
|
-
3. Export it from the package's entry point.
|
|
64
|
-
4. Add to `ConfigOption` enum in `packages/core/src/types.ts`.
|
|
65
|
-
5. Wire up in `packages/basic/src/index.ts`.
|
|
66
|
-
|
|
67
|
-
## Tech Stack
|
|
68
|
-
|
|
69
|
-
- **Build**: tsup, TypeScript
|
|
70
|
-
- **ESLint**: v9+ Flat Config format
|
|
71
|
-
- **Package Manager**: npm/pnpm
|
|
72
|
-
- **Node**: ^18.18.0 || ^20.9.0 || >=21.1.0
|
package/packages/astro/README.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# @santi020k/eslint-config-astro
|
|
2
|
-
|
|
3
|
-
Astro specific ESLint rules and configurations.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
This package provides:
|
|
8
|
-
- `eslint-plugin-astro` recommended rules.
|
|
9
|
-
- Configuration for linting `.astro` files.
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
This package is used automatically when `ConfigOption.Astro` is selected in the main configuration.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@santi020k/eslint-config-astro",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"description": "Astro ESLint configuration",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./dist/index.js",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "tsup",
|
|
20
|
-
"dev": "tsup --watch",
|
|
21
|
-
"clean": "rm -rf dist"
|
|
22
|
-
},
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"eslint": "^9.0.0"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"@santi020k/eslint-config-core": "*",
|
|
28
|
-
"eslint-plugin-astro": "^1.3.1"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@typescript-eslint/utils": "^8.54.0",
|
|
32
|
-
"tsup": "^8.5.1",
|
|
33
|
-
"typescript": "^5.9.3"
|
|
34
|
-
},
|
|
35
|
-
"publishConfig": {
|
|
36
|
-
"access": "public"
|
|
37
|
-
},
|
|
38
|
-
"license": "MIT",
|
|
39
|
-
"author": "santi020k",
|
|
40
|
-
"repository": {
|
|
41
|
-
"type": "git",
|
|
42
|
-
"url": "git+https://github.com/santi020k/eslint-config.git",
|
|
43
|
-
"directory": "packages/astro"
|
|
44
|
-
}
|
|
45
|
-
}
|