@santi020k/eslint-config-basic 0.1.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/.agent/rules/context.md +78 -0
- package/.agent/rules/guidelines.md +124 -0
- package/.editorconfig +13 -0
- package/.env.example +8 -0
- package/.github/CODEOWNERS +2 -0
- package/.github/DISCUSSION_TEMPLATE/rfcs.yml +21 -0
- package/.github/DISCUSSION_TEMPLATE/technical-discussions.yml +21 -0
- package/.github/FUNDING.yml +2 -0
- package/.github/ISSUE_TEMPLATE/README.md +13 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +69 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +43 -0
- package/.github/ISSUE_TEMPLATE/question.yml +22 -0
- package/.github/SECURITY.md +12 -0
- package/.github/SPONSORSHIPS.md +27 -0
- package/.github/dependabot.yml +45 -0
- package/.github/labeler.yml +46 -0
- package/.github/pull_request_template.md +56 -0
- package/.github/workflows/assign-issues.yml +18 -0
- package/.github/workflows/audit.yml +22 -0
- package/.github/workflows/build.yml +29 -0
- package/.github/workflows/codeql.yml +40 -0
- package/.github/workflows/docs.yml +49 -0
- package/.github/workflows/labeler.yml +18 -0
- package/.github/workflows/publish.yml +24 -0
- package/.github/workflows/release.yml +35 -0
- package/.github/workflows/size-check.yml +23 -0
- package/.github/workflows/stale.yml +31 -0
- package/.nvmrc +1 -0
- package/.vscode/extensions.json +10 -0
- package/.vscode/settings.json +55 -0
- package/CHANGELOG.md +16 -0
- package/CONTRIBUTING.md +194 -0
- package/DEVELOPMENT.md +4 -0
- package/LICENSE +21 -0
- package/README.md +275 -0
- package/config/.husky/commit-msg +9 -0
- package/config/.husky/pre-commit +1 -0
- package/config/.husky/pre-push +1 -0
- package/config/.husky/prepare-commit-msg +1 -0
- package/cspell.config.yaml +2 -0
- package/eslint.config.js +21 -0
- package/llms.txt +72 -0
- package/package.json +61 -0
- package/packages/astro/README.md +13 -0
- package/packages/astro/package.json +45 -0
- package/packages/astro/src/ambient.d.ts +10 -0
- package/packages/astro/src/index.ts +18 -0
- package/packages/astro/src/rules.ts +29 -0
- package/packages/astro/tsconfig.json +9 -0
- package/packages/astro/tsup.config.ts +11 -0
- package/packages/basic/README.md +33 -0
- package/packages/basic/package.json +55 -0
- package/packages/basic/src/index.ts +110 -0
- package/packages/basic/tsconfig.json +9 -0
- package/packages/basic/tsup.config.ts +18 -0
- package/packages/core/README.md +14 -0
- package/packages/core/index.ts +14 -0
- package/packages/core/package.json +61 -0
- package/packages/core/src/ambient.d.ts +61 -0
- package/packages/core/src/index.ts +75 -0
- package/packages/core/src/rules.ts +157 -0
- package/packages/core/src/settings/gitignore.ts +10 -0
- package/packages/core/src/settings/index.ts +1 -0
- package/packages/core/src/types.ts +57 -0
- package/packages/core/src/utils/index.ts +28 -0
- package/packages/core/tsconfig.json +9 -0
- package/packages/core/tsup.config.ts +10 -0
- package/packages/expo/README.md +13 -0
- package/packages/expo/package.json +48 -0
- package/packages/expo/src/ambient.d.ts +3 -0
- package/packages/expo/src/index.ts +39 -0
- package/packages/expo/tsconfig.json +9 -0
- package/packages/expo/tsup.config.ts +11 -0
- package/packages/nest/package.json +45 -0
- package/packages/nest/src/ambient.d.ts +14 -0
- package/packages/nest/src/index.ts +20 -0
- package/packages/nest/src/rules.ts +15 -0
- package/packages/nest/tsconfig.json +9 -0
- package/packages/nest/tsup.config.ts +11 -0
- package/packages/next/README.md +13 -0
- package/packages/next/package.json +47 -0
- package/packages/next/src/index.ts +31 -0
- package/packages/next/src/rules.ts +16 -0
- package/packages/next/tsconfig.json +9 -0
- package/packages/next/tsup.config.ts +10 -0
- package/packages/optionals/README.md +18 -0
- package/packages/optionals/package.json +55 -0
- package/packages/optionals/src/ambient.d.ts +25 -0
- package/packages/optionals/src/cspell.ts +14 -0
- package/packages/optionals/src/i18next.ts +19 -0
- package/packages/optionals/src/index.ts +8 -0
- package/packages/optionals/src/markdown.ts +66 -0
- package/packages/optionals/src/mdx.ts +40 -0
- package/packages/optionals/src/stencil.ts +48 -0
- package/packages/optionals/src/tailwind.ts +11 -0
- package/packages/optionals/src/vitest.ts +61 -0
- package/packages/optionals/tsconfig.json +9 -0
- package/packages/optionals/tsup.config.ts +11 -0
- package/packages/playground/README.md +14 -0
- package/packages/playground/package.json +17 -0
- package/packages/playground/src/astro/eslint.config.js +4 -0
- package/packages/playground/src/js/eslint.config.js +4 -0
- package/packages/playground/src/js/index.test.js +63 -0
- package/packages/playground/src/mdx/eslint.config.js +4 -0
- package/packages/playground/src/mdx/index.mdx +115 -0
- package/packages/playground/src/react/eslint.config.js +4 -0
- package/packages/playground/src/react/index.test.jsx +130 -0
- package/packages/playground/src/ts/eslint.config.js +4 -0
- package/packages/playground/src/ts/index.test.ts +61 -0
- package/packages/playground/src/ts/tsconfig.json +3 -0
- package/packages/playground/tsconfig.json +9 -0
- package/packages/react/README.md +14 -0
- package/packages/react/index.ts +26 -0
- package/packages/react/package.json +49 -0
- package/packages/react/src/ambient.d.ts +23 -0
- package/packages/react/src/index.ts +52 -0
- package/packages/react/src/rules.ts +47 -0
- package/packages/react/tsconfig.json +9 -0
- package/packages/react/tsup.config.ts +10 -0
- package/packages/tests/README.md +17 -0
- package/packages/tests/package.json +21 -0
- package/packages/tests/src/__snapshots__/snapshots.test.ts.snap +654 -0
- package/packages/tests/src/composition.test.ts +171 -0
- package/packages/tests/src/configs.test.ts +118 -0
- package/packages/tests/src/rules.test.ts +60 -0
- package/packages/tests/src/snapshots.test.ts +126 -0
- package/packages/tests/tsconfig.json +10 -0
- package/packages/tests/vitest.config.ts +8 -0
- package/packages/typescript/README.md +14 -0
- package/packages/typescript/package.json +47 -0
- package/packages/typescript/src/index.ts +32 -0
- package/packages/typescript/src/rules.ts +36 -0
- package/packages/typescript/tsconfig.json +9 -0
- package/packages/typescript/tsup.config.ts +10 -0
- package/tsconfig.base.json +20 -0
- package/tsconfig.docs.json +18 -0
- package/turbo.json +19 -0
- package/typedoc.config.mjs +25 -0
- package/typedoc.markdown.mjs +26 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Context
|
|
6
|
+
|
|
7
|
+
## Priority Reading Order
|
|
8
|
+
|
|
9
|
+
1. **`llms.txt`** - Project overview and architecture
|
|
10
|
+
2. **`../../src/index.ts`** - Main entry point with enums and config function
|
|
11
|
+
3. **`./guidelines.md`** - Detailed coding guidelines
|
|
12
|
+
|
|
13
|
+
## Project Summary
|
|
14
|
+
|
|
15
|
+
This is `@santi020k/eslint-config`, a composable ESLint 9 Flat Config package supporting:
|
|
16
|
+
- JavaScript, TypeScript, React, Next.js, Astro, Expo
|
|
17
|
+
- Optional integrations: Tailwind, Vitest, cspell, i18next, MDX, Markdown, Stencil
|
|
18
|
+
|
|
19
|
+
## Monorepo Architecture
|
|
20
|
+
|
|
21
|
+
This project uses **Turborepo** with **npm Workspaces** for modular package management.
|
|
22
|
+
|
|
23
|
+
### Package Structure
|
|
24
|
+
| Package | Location | Purpose |
|
|
25
|
+
|---------|----------|---------|
|
|
26
|
+
| `@santi020k/eslint-config-core` | `packages/core` | Base JS config, utilities, types |
|
|
27
|
+
| `@santi020k/eslint-config-typescript` | `packages/typescript` | TypeScript rules |
|
|
28
|
+
| `@santi020k/eslint-config-react` | `packages/react` | React + Hooks |
|
|
29
|
+
| `@santi020k/eslint-config-next` | `packages/next` | Next.js core-web-vitals |
|
|
30
|
+
|
|
31
|
+
### Dependency Graph
|
|
32
|
+
```
|
|
33
|
+
core → typescript → react → next
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Key Architecture Decisions
|
|
37
|
+
|
|
38
|
+
### Flat Config Only
|
|
39
|
+
This package only supports ESLint 9+ flat config format. No legacy `.eslintrc` support.
|
|
40
|
+
|
|
41
|
+
### Composable Design
|
|
42
|
+
Users select configs via enums rather than extending named configs:
|
|
43
|
+
```js
|
|
44
|
+
eslintConfig({ config: [ConfigOption.React, ConfigOption.Ts] })
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Dependency Alignment
|
|
48
|
+
Uses npm `overrides` with `$` references to align peer dependency versions across the plugin ecosystem.
|
|
49
|
+
|
|
50
|
+
## Validation Workflow
|
|
51
|
+
|
|
52
|
+
Always validate changes with:
|
|
53
|
+
```bash
|
|
54
|
+
npm run build && npm run lint && npm run test
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
All commands must pass before considering work complete.
|
|
58
|
+
|
|
59
|
+
## Known Issues / Gotchas
|
|
60
|
+
|
|
61
|
+
1. **FlatCompat issues**: Some legacy plugins don't resolve correctly. Use direct plugin object imports.
|
|
62
|
+
2. **TS2742 errors**: Export explicit types when inferred types reference internal modules.
|
|
63
|
+
3. **Plugin version conflicts**: Check `overrides` in package.json when adding new ESLint plugins.
|
|
64
|
+
4. **Workspace lint**: Lint runs from root only, not from individual packages.
|
|
65
|
+
|
|
66
|
+
## File Modification Patterns
|
|
67
|
+
|
|
68
|
+
### When adding a new framework config (as a package):
|
|
69
|
+
1. Create `packages/{name}/` with `package.json`, `tsconfig.json`, `tsup.config.ts`
|
|
70
|
+
2. Create `packages/{name}/src/index.ts` exporting the config
|
|
71
|
+
3. Add to `ConfigOption` enum in `packages/core/src/types.ts`
|
|
72
|
+
4. Wire into `eslintConfig()` function in `src/index.ts`
|
|
73
|
+
|
|
74
|
+
### When adding a new optional:
|
|
75
|
+
1. Create `src/optionals/{name}.ts`
|
|
76
|
+
2. Export from `src/optionals/index.ts`
|
|
77
|
+
3. Add to `OptionalOption` enum in `packages/core/src/types.ts`
|
|
78
|
+
4. Wire into `eslintConfig()` function
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# AI Coding Assistant Guidelines
|
|
6
|
+
|
|
7
|
+
This document provides guidance for AI coding assistants working on @santi020k/eslint-config.
|
|
8
|
+
|
|
9
|
+
## Project Overview
|
|
10
|
+
|
|
11
|
+
This is an ESLint configuration package using **ESLint 9 Flat Config** format. It exports a composable `eslintConfig()` function.
|
|
12
|
+
|
|
13
|
+
The project is a **monorepo** using Turborepo and npm Workspaces.
|
|
14
|
+
|
|
15
|
+
## Key Files to Understand
|
|
16
|
+
|
|
17
|
+
### Root Level
|
|
18
|
+
- `src/index.ts` - Main entry point, re-exports from packages + composes configs
|
|
19
|
+
- `turbo.json` - Turborepo build configuration
|
|
20
|
+
- `eslint.config.js` - ESLint config for this repo
|
|
21
|
+
- `vitest.config.ts` - Test configuration
|
|
22
|
+
|
|
23
|
+
### Packages
|
|
24
|
+
- `packages/core/src/index.ts` - Core config, types, utilities
|
|
25
|
+
- `packages/typescript/src/index.ts` - TypeScript config
|
|
26
|
+
- `packages/react/src/index.ts` - React + Hooks config
|
|
27
|
+
- `packages/next/src/index.ts` - Next.js config
|
|
28
|
+
|
|
29
|
+
### Tests
|
|
30
|
+
- `tests/configs.test.ts` - Config export tests
|
|
31
|
+
- `tests/rules.test.ts` - Rule validation tests
|
|
32
|
+
- `tests/composition.test.ts` - eslintConfig() composition tests
|
|
33
|
+
|
|
34
|
+
## Code Conventions
|
|
35
|
+
|
|
36
|
+
### TypeScript
|
|
37
|
+
- Use explicit type annotations for exports
|
|
38
|
+
- Explicit return types on exported functions
|
|
39
|
+
- Use `type` imports when importing only types (`import type { X } from 'y'`)
|
|
40
|
+
- Follow the existing enum patterns (`ConfigOption`, `OptionalOption`, `SettingOption`)
|
|
41
|
+
- Prefer `const` assertions where appropriate
|
|
42
|
+
|
|
43
|
+
### Imports
|
|
44
|
+
- Use `.js` extension for relative imports (ESM compatibility)
|
|
45
|
+
- Sort imports: external first, then internal with blank line
|
|
46
|
+
|
|
47
|
+
### Naming Conventions
|
|
48
|
+
- Config arrays: `camelCaseConfig` (e.g., `reactConfig`, `tsConfig`)
|
|
49
|
+
- Enums: `PascalCase` (e.g., `ConfigOption`, `OptionalOption`)
|
|
50
|
+
- Files: `kebab-case.ts` or `index.ts` for main exports
|
|
51
|
+
|
|
52
|
+
### ESLint Configs
|
|
53
|
+
- All configs return `TSESLint.FlatConfig.ConfigArray`
|
|
54
|
+
- Each package exports a main config array
|
|
55
|
+
- Rules are organized into separate files when complex
|
|
56
|
+
- Preferred flat config pattern:
|
|
57
|
+
```typescript
|
|
58
|
+
export const myConfig: TSESLint.FlatConfig.ConfigArray = [
|
|
59
|
+
{
|
|
60
|
+
name: 'my-config/rules',
|
|
61
|
+
rules: {
|
|
62
|
+
'rule-name': 'error'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Package Structure
|
|
69
|
+
Each package under `packages/` follows this structure:
|
|
70
|
+
```
|
|
71
|
+
packages/{name}/
|
|
72
|
+
├── package.json
|
|
73
|
+
├── tsconfig.json
|
|
74
|
+
├── tsup.config.ts
|
|
75
|
+
└── src/
|
|
76
|
+
├── index.ts # Main export
|
|
77
|
+
├── rules.ts # Rule definitions (optional)
|
|
78
|
+
└── ambient.d.ts # Type declarations for plugins (if needed)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Adding New Features
|
|
82
|
+
|
|
83
|
+
### New Framework Config (as package)
|
|
84
|
+
```bash
|
|
85
|
+
# 1. Create package directory
|
|
86
|
+
mkdir -p packages/myframework/src
|
|
87
|
+
|
|
88
|
+
# 2. Create package.json with dependencies
|
|
89
|
+
# 3. Create tsconfig.json extending base
|
|
90
|
+
# 4. Create tsup.config.ts
|
|
91
|
+
# 5. Create src/index.ts with config
|
|
92
|
+
# 6. Add enum value to packages/core/src/types.ts
|
|
93
|
+
# 7. Wire into src/index.ts eslintConfig()
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### New Optional
|
|
97
|
+
```typescript
|
|
98
|
+
// src/optionals/myoptional.ts
|
|
99
|
+
import type { TSESLint } from '@typescript-eslint/utils'
|
|
100
|
+
|
|
101
|
+
export const myoptional: TSESLint.FlatConfig.ConfigArray = [
|
|
102
|
+
// optional rules
|
|
103
|
+
]
|
|
104
|
+
|
|
105
|
+
// Add to src/optionals/index.ts
|
|
106
|
+
// Add enum value to packages/core/src/types.ts
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Verification Commands
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm run build # Turborepo builds all packages
|
|
113
|
+
npm run lint # Lints entire monorepo from root
|
|
114
|
+
npm run test # Runs Vitest (30 tests)
|
|
115
|
+
npm run inspector # Visual config inspection
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Common Pitfalls
|
|
119
|
+
|
|
120
|
+
1. **Peer dependencies**: Use `$` references in overrides for version alignment
|
|
121
|
+
2. **Plugin loading**: Use direct plugin object references, not string-based resolution
|
|
122
|
+
3. **Type exports**: May need explicit type annotations to avoid TS2742 errors
|
|
123
|
+
4. **Ambient declarations**: Create `.d.ts` files for plugins without TypeScript types
|
|
124
|
+
5. **Workspace lint**: Don't add lint scripts to individual packages - lint runs from root only
|
package/.editorconfig
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Editor configuration, see http://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.md]
|
|
12
|
+
max_line_length = off
|
|
13
|
+
trim_trailing_whitespace = false
|
package/.env.example
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# GitHub Personal Access Token — used by the release workflow to create
|
|
2
|
+
# GitHub Releases and push changelog commits. Requires `repo` scope.
|
|
3
|
+
PA_TOKEN=
|
|
4
|
+
|
|
5
|
+
# npm Access Token — used by the publish workflow to publish the
|
|
6
|
+
# @santi020k/eslint-config-basic package to the npm registry.
|
|
7
|
+
# Generate at https://www.npmjs.com/settings/<user>/tokens
|
|
8
|
+
NPM_TOKEN=
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
body:
|
|
2
|
+
- attributes:
|
|
3
|
+
label: RFC
|
|
4
|
+
value: |
|
|
5
|
+
Suggested changes...
|
|
6
|
+
id: rfc
|
|
7
|
+
type: textarea
|
|
8
|
+
- attributes:
|
|
9
|
+
label: Additional Info
|
|
10
|
+
value: |
|
|
11
|
+
Any additional info...
|
|
12
|
+
id: additional
|
|
13
|
+
type: textarea
|
|
14
|
+
- attributes:
|
|
15
|
+
label: Before you submit your RFC, please confirm the following. If any of these required steps are not taken, we may not be able to review your RFC. Help us to help you!
|
|
16
|
+
options:
|
|
17
|
+
- label: I have searched for related discussions and issues.
|
|
18
|
+
required: true
|
|
19
|
+
id: required-checks
|
|
20
|
+
type: checkboxes
|
|
21
|
+
title: Your Title Here
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
body:
|
|
2
|
+
- attributes:
|
|
3
|
+
label: Body
|
|
4
|
+
value: |
|
|
5
|
+
Body of the technical discussion...
|
|
6
|
+
id: body
|
|
7
|
+
type: textarea
|
|
8
|
+
- attributes:
|
|
9
|
+
label: Additional Info
|
|
10
|
+
value: |
|
|
11
|
+
Any additional info...
|
|
12
|
+
id: additional
|
|
13
|
+
type: textarea
|
|
14
|
+
- attributes:
|
|
15
|
+
label: Before you submit your discussion, please confirm the following. If any of these required steps are not taken, we may not be able to review your RFC. Help us to help you!
|
|
16
|
+
options:
|
|
17
|
+
- label: I have searched for related discussions and issues.
|
|
18
|
+
required: true
|
|
19
|
+
id: required-checks
|
|
20
|
+
type: checkboxes
|
|
21
|
+
title: Your Title Here
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Issue Templates
|
|
2
|
+
|
|
3
|
+
## Documentation
|
|
4
|
+
|
|
5
|
+
[Syntax for issue forms (the top level properties)](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms)
|
|
6
|
+
|
|
7
|
+
[Syntax for GitHub's form schema (the form body)](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema)
|
|
8
|
+
|
|
9
|
+
[Configuring the template chooser (config.yml)](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser)
|
|
10
|
+
|
|
11
|
+
## Template Chooser Sorting
|
|
12
|
+
|
|
13
|
+
The templates are sorted in the template chooser based on the filename, not on the form name. This is why we have prefixed the filenames with numbers.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: 🐛 Bug Report
|
|
2
|
+
description: Create a report to help us improve
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to fill out this bug report!
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Description
|
|
15
|
+
description: A clear and concise description of what the bug is.
|
|
16
|
+
placeholder: When I run eslint, it crashes with error...
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: reproduction
|
|
22
|
+
attributes:
|
|
23
|
+
label: Reproduction
|
|
24
|
+
description: |
|
|
25
|
+
Please provide a link to a reproduction repository or a minimal code snippet.
|
|
26
|
+
This is critical for us to understand and fix the issue.
|
|
27
|
+
placeholder: |
|
|
28
|
+
1. create a new project with...
|
|
29
|
+
2. install @santi020k/eslint-config-basic
|
|
30
|
+
3. run eslint .
|
|
31
|
+
validations:
|
|
32
|
+
required: true
|
|
33
|
+
|
|
34
|
+
- type: checkboxes
|
|
35
|
+
id: packages
|
|
36
|
+
attributes:
|
|
37
|
+
label: Packages Affected
|
|
38
|
+
description: Select the packages that seem to be causing the issue.
|
|
39
|
+
options:
|
|
40
|
+
- label: "@santi020k/eslint-config-basic"
|
|
41
|
+
- label: "@santi020k/eslint-config-core"
|
|
42
|
+
- label: "@santi020k/eslint-config-typescript"
|
|
43
|
+
- label: "@santi020k/eslint-config-react"
|
|
44
|
+
- label: "@santi020k/eslint-config-next"
|
|
45
|
+
- label: "@santi020k/eslint-config-astro"
|
|
46
|
+
- label: "@santi020k/eslint-config-expo"
|
|
47
|
+
|
|
48
|
+
- type: textarea
|
|
49
|
+
id: expected-behavior
|
|
50
|
+
attributes:
|
|
51
|
+
label: Expected Behavior
|
|
52
|
+
description: A clear and concise description of what you expected to happen.
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
|
|
56
|
+
- type: input
|
|
57
|
+
id: environment
|
|
58
|
+
attributes:
|
|
59
|
+
label: Environment Info
|
|
60
|
+
description: |
|
|
61
|
+
Create a report using `npx envinfo --system --binaries --browsers --npmPackages "{eslint,@santi020k/*,typescript}"`
|
|
62
|
+
placeholder: |
|
|
63
|
+
System:
|
|
64
|
+
OS: macOS 14.0
|
|
65
|
+
Binaries:
|
|
66
|
+
Node: 20.10.0
|
|
67
|
+
npm: 10.2.3
|
|
68
|
+
validations:
|
|
69
|
+
required: false
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Global ESLint Config Docs
|
|
4
|
+
url: https://eslint.org/docs/latest/use/configure/configuration-files
|
|
5
|
+
about: Official ESLint configuration documentation
|
|
6
|
+
- name: GitHub Discussions
|
|
7
|
+
url: https://github.com/santi020k/eslint-config/discussions
|
|
8
|
+
about: Ask questions and discuss ideas
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: ✨ Feature Request
|
|
2
|
+
description: Suggest an idea for this project
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: description
|
|
8
|
+
attributes:
|
|
9
|
+
label: Is your feature request related to a problem? Please describe.
|
|
10
|
+
description: A clear and concise description of what the problem is.
|
|
11
|
+
placeholder: I'm always frustrated when...
|
|
12
|
+
validations:
|
|
13
|
+
required: true
|
|
14
|
+
|
|
15
|
+
- type: checkboxes
|
|
16
|
+
id: packages
|
|
17
|
+
attributes:
|
|
18
|
+
label: Packages Affected
|
|
19
|
+
description: Select the packages relevant to this feature.
|
|
20
|
+
options:
|
|
21
|
+
- label: "@santi020k/eslint-config-basic"
|
|
22
|
+
- label: "@santi020k/eslint-config-core"
|
|
23
|
+
- label: "@santi020k/eslint-config-typescript"
|
|
24
|
+
- label: "@santi020k/eslint-config-react"
|
|
25
|
+
- label: "@santi020k/eslint-config-next"
|
|
26
|
+
- label: "@santi020k/eslint-config-astro"
|
|
27
|
+
- label: "@santi020k/eslint-config-expo"
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: solution
|
|
31
|
+
attributes:
|
|
32
|
+
label: Describe the solution you'd like
|
|
33
|
+
description: A clear and concise description of what you want to happen.
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
|
|
37
|
+
- type: textarea
|
|
38
|
+
id: alternatives
|
|
39
|
+
attributes:
|
|
40
|
+
label: Describe alternatives you've considered
|
|
41
|
+
description: A clear and concise description of any alternative solutions or features you've considered.
|
|
42
|
+
validations:
|
|
43
|
+
required: false
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: ❓ Question / Support
|
|
2
|
+
description: Ask a question about using this configuration
|
|
3
|
+
title: "[Question]: "
|
|
4
|
+
labels: ["question"]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: question
|
|
8
|
+
attributes:
|
|
9
|
+
label: Question
|
|
10
|
+
description: What would you like to know?
|
|
11
|
+
placeholder: How do I configure...
|
|
12
|
+
validations:
|
|
13
|
+
required: true
|
|
14
|
+
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: context
|
|
17
|
+
attributes:
|
|
18
|
+
label: Relevant Code / Context
|
|
19
|
+
description: Please provide any relevant code snippets or configuration details.
|
|
20
|
+
render: typescript
|
|
21
|
+
validations:
|
|
22
|
+
required: false
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
I take all security vulnerabilities seriously.
|
|
4
|
+
If you have a vulnerability or other security issues to disclose:
|
|
5
|
+
|
|
6
|
+
- Thank you very much, please do!
|
|
7
|
+
- Please send them to us by emailing `info@santi020k.me`
|
|
8
|
+
|
|
9
|
+
We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
|
|
10
|
+
|
|
11
|
+
> We also adhere to the [Tidelift security process](https://support.tidelift.com/hc/en-us/articles/4406287910036-Security-process).
|
|
12
|
+
> See [https://tidelift.com/security](https://tidelift.com/security).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Sponsorship
|
|
2
|
+
|
|
3
|
+
`@santi020k/eslint-config-basic` is an entirely volunteer-run project.
|
|
4
|
+
I am not associated with any company or organization; development is funded solely from community donations.
|
|
5
|
+
|
|
6
|
+
## Why Sponsor `@santi020k/eslint-config-basic`?
|
|
7
|
+
|
|
8
|
+
This ESLint configuration is designed to help developers maintain clean and consistent codebases. Sponsoring this project helps ensure continued development and support for the broader JavaScript and TypeScript ecosystems. By supporting `@santi020k/eslint-config-basic`, you help:
|
|
9
|
+
|
|
10
|
+
- Support updates and improvements to the ESLint configuration
|
|
11
|
+
- Continue enhancing documentation and user experience
|
|
12
|
+
- Fix bugs and add new features to the ESLint rules and configurations
|
|
13
|
+
- Develop more advanced rules to ensure code correctness and maintainability
|
|
14
|
+
|
|
15
|
+
### Sponsorship Benefits
|
|
16
|
+
|
|
17
|
+
In addition to supporting the development of this library, sponsoring on Open Collective helps promote your company and development brand.
|
|
18
|
+
Top sponsors may have their link, logo, and/or name featured on the project's GitHub page.
|
|
19
|
+
|
|
20
|
+
> Got an idea for how to make sponsorship work for you?
|
|
21
|
+
> Let me know at `info@santi020k.me`!
|
|
22
|
+
|
|
23
|
+
## Sponsorship Limitations
|
|
24
|
+
|
|
25
|
+
### Project Direction
|
|
26
|
+
|
|
27
|
+
While sponsorship is greatly appreciated, it does not influence issue prioritization or pull request reviews. If you need to push forward specific work in `@santi020k/eslint-config-basic` more urgently than a general donation can provide, consider contributing engineering time as well.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
updates:
|
|
4
|
+
# npm dependencies
|
|
5
|
+
- package-ecosystem: npm
|
|
6
|
+
directory: /
|
|
7
|
+
schedule:
|
|
8
|
+
interval: weekly
|
|
9
|
+
day: monday
|
|
10
|
+
open-pull-requests-limit: 10
|
|
11
|
+
groups:
|
|
12
|
+
eslint-plugins:
|
|
13
|
+
patterns:
|
|
14
|
+
- 'eslint-*'
|
|
15
|
+
- '@eslint/*'
|
|
16
|
+
- '@typescript-eslint/*'
|
|
17
|
+
- 'typescript-eslint'
|
|
18
|
+
- '@stylistic/*'
|
|
19
|
+
- '@cspell/*'
|
|
20
|
+
build-tools:
|
|
21
|
+
patterns:
|
|
22
|
+
- 'tsup'
|
|
23
|
+
- 'typescript'
|
|
24
|
+
- 'turbo'
|
|
25
|
+
testing:
|
|
26
|
+
patterns:
|
|
27
|
+
- 'vitest'
|
|
28
|
+
linting-tools:
|
|
29
|
+
patterns:
|
|
30
|
+
- 'husky'
|
|
31
|
+
- 'lint-staged'
|
|
32
|
+
- 'commitizen'
|
|
33
|
+
- 'cz-*'
|
|
34
|
+
|
|
35
|
+
# GitHub Actions
|
|
36
|
+
- package-ecosystem: github-actions
|
|
37
|
+
directory: /
|
|
38
|
+
schedule:
|
|
39
|
+
interval: weekly
|
|
40
|
+
day: monday
|
|
41
|
+
open-pull-requests-limit: 5
|
|
42
|
+
groups:
|
|
43
|
+
actions:
|
|
44
|
+
patterns:
|
|
45
|
+
- '*'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
core:
|
|
2
|
+
- changed-files:
|
|
3
|
+
- any-glob-to-any-file: 'packages/core/**'
|
|
4
|
+
|
|
5
|
+
typescript:
|
|
6
|
+
- changed-files:
|
|
7
|
+
- any-glob-to-any-file: 'packages/typescript/**'
|
|
8
|
+
|
|
9
|
+
react:
|
|
10
|
+
- changed-files:
|
|
11
|
+
- any-glob-to-any-file: 'packages/react/**'
|
|
12
|
+
|
|
13
|
+
next:
|
|
14
|
+
- changed-files:
|
|
15
|
+
- any-glob-to-any-file: 'packages/next/**'
|
|
16
|
+
|
|
17
|
+
astro:
|
|
18
|
+
- changed-files:
|
|
19
|
+
- any-glob-to-any-file: 'packages/astro/**'
|
|
20
|
+
|
|
21
|
+
expo:
|
|
22
|
+
- changed-files:
|
|
23
|
+
- any-glob-to-any-file: 'packages/expo/**'
|
|
24
|
+
|
|
25
|
+
optionals:
|
|
26
|
+
- changed-files:
|
|
27
|
+
- any-glob-to-any-file: 'packages/optionals/**'
|
|
28
|
+
|
|
29
|
+
basic:
|
|
30
|
+
- changed-files:
|
|
31
|
+
- any-glob-to-any-file: 'packages/basic/**'
|
|
32
|
+
|
|
33
|
+
tests:
|
|
34
|
+
- changed-files:
|
|
35
|
+
- any-glob-to-any-file: 'packages/tests/**'
|
|
36
|
+
|
|
37
|
+
ci:
|
|
38
|
+
- changed-files:
|
|
39
|
+
- any-glob-to-any-file: '.github/**'
|
|
40
|
+
|
|
41
|
+
docs:
|
|
42
|
+
- changed-files:
|
|
43
|
+
- any-glob-to-any-file:
|
|
44
|
+
- '*.md'
|
|
45
|
+
- 'packages/*/README.md'
|
|
46
|
+
- 'llms.txt'
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
# � Pull Request
|
|
3
|
+
|
|
4
|
+
## Description
|
|
5
|
+
|
|
6
|
+
<!--
|
|
7
|
+
Please include a summary of the change and which issue is fixed.
|
|
8
|
+
Please also include relevant motivation and context.
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
## Related Issue
|
|
12
|
+
|
|
13
|
+
<!--
|
|
14
|
+
Link to the issue this PR resolves, e.g. "Resolves #123"
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
## Type of Change
|
|
18
|
+
|
|
19
|
+
<!-- Please delete options that are not relevant. -->
|
|
20
|
+
|
|
21
|
+
- [ ] ✨ New feature (non-breaking change which adds functionality)
|
|
22
|
+
- [ ] 🛠️ Bug fix (non-breaking change which fixes an issue)
|
|
23
|
+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)
|
|
24
|
+
- [ ] 🧹 Refactor (no functional changes, no api changes)
|
|
25
|
+
- [ ] 🧪 Tests (adding missing tests or correcting existing tests)
|
|
26
|
+
- [ ] 📚 Documentation (updating documentation)
|
|
27
|
+
- [ ] ⚙️ CI/CD (updates to workflows or build scripts)
|
|
28
|
+
|
|
29
|
+
## Packages Affected
|
|
30
|
+
|
|
31
|
+
<!-- Check all that apply -->
|
|
32
|
+
|
|
33
|
+
- [ ] `basic` (@santi020k/eslint-config-basic)
|
|
34
|
+
- [ ] `core` (@santi020k/eslint-config-core)
|
|
35
|
+
- [ ] `typescript` (@santi020k/eslint-config-typescript)
|
|
36
|
+
- [ ] `react` (@santi020k/eslint-config-react)
|
|
37
|
+
- [ ] `next` (@santi020k/eslint-config-next)
|
|
38
|
+
- [ ] `astro` (@santi020k/eslint-config-astro)
|
|
39
|
+
- [ ] `expo` (@santi020k/eslint-config-expo)
|
|
40
|
+
- [ ] `optionals` (@santi020k/eslint-config-optionals)
|
|
41
|
+
- [ ] `tests` (internal tests)
|
|
42
|
+
|
|
43
|
+
## Checklist
|
|
44
|
+
|
|
45
|
+
- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) guide
|
|
46
|
+
- [ ] My code follows the style guidelines of this project
|
|
47
|
+
- [ ] I have performed a self-review of my own code
|
|
48
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
49
|
+
- [ ] I have made corresponding changes to the documentation
|
|
50
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
51
|
+
- [ ] New and existing unit tests pass locally with my changes (`npm test`)
|
|
52
|
+
- [ ] I have run the build script and it passes (`npm run build`)
|
|
53
|
+
|
|
54
|
+
## Screenshots (if applicable)
|
|
55
|
+
|
|
56
|
+
<!-- Add screenshots here if your changes affect the UI or documentation output. -->
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Issue assignment
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types: [opened]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
auto-assign:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
issues: write
|
|
12
|
+
steps:
|
|
13
|
+
- name: 'Auto-assign issue'
|
|
14
|
+
uses: pozil/auto-assign-issue@v2
|
|
15
|
+
with:
|
|
16
|
+
assignees: santi020k
|
|
17
|
+
numOfAssignee: 1
|
|
18
|
+
allowSelfAssign: true
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Security Audit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: '0 9 * * 1' # Every Monday at 9am UTC
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
audit:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
|
+
- name: Setup Node
|
|
16
|
+
uses: actions/setup-node@v6
|
|
17
|
+
with:
|
|
18
|
+
node-version: '22'
|
|
19
|
+
cache: 'npm'
|
|
20
|
+
- run: npm ci
|
|
21
|
+
- name: Run npm audit
|
|
22
|
+
run: npm audit --audit-level=moderate
|