@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,10 +0,0 @@
|
|
|
1
|
-
declare module 'eslint-plugin-astro' {
|
|
2
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
3
|
-
const plugin: {
|
|
4
|
-
configs: {
|
|
5
|
-
recommended: TSESLint.FlatConfig.ConfigArray
|
|
6
|
-
'flat/recommended': TSESLint.FlatConfig.ConfigArray
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export default plugin
|
|
10
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import pluginAstro from 'eslint-plugin-astro'
|
|
2
|
-
|
|
3
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
4
|
-
|
|
5
|
-
import { rules } from './rules.js'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Astro ESLint configuration
|
|
9
|
-
* Includes Astro plugin recommended rules and custom overrides
|
|
10
|
-
*/
|
|
11
|
-
export const astroConfig: TSESLint.FlatConfig.ConfigArray = [
|
|
12
|
-
...(pluginAstro.configs.recommended as TSESLint.FlatConfig.ConfigArray),
|
|
13
|
-
{
|
|
14
|
-
name: 'eslint-config-astro/custom',
|
|
15
|
-
files: ['**/*.astro'],
|
|
16
|
-
rules
|
|
17
|
-
}
|
|
18
|
-
]
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
2
|
-
|
|
3
|
-
import { groups } from '@santi020k/eslint-config-core'
|
|
4
|
-
|
|
5
|
-
export const rules: TSESLint.Linter.RulesRecord = {
|
|
6
|
-
'simple-import-sort/imports': [
|
|
7
|
-
'warn',
|
|
8
|
-
{
|
|
9
|
-
groups: [
|
|
10
|
-
// Packages `react` related packages come first.
|
|
11
|
-
['^react'],
|
|
12
|
-
['^(astro)(/.*|$)?'],
|
|
13
|
-
...groups
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
// Disable no-unresolved rule for .astro files
|
|
18
|
-
'react/jsx-filename-extension': [1, { extensions: ['.astro'] }], // Accept jsx in astro files
|
|
19
|
-
'react/destructuring-assignment': 'off', // Vscode doesn't support automatically destructuring
|
|
20
|
-
'react/require-default-props': 'off', // Allow non-defined react props as undefined
|
|
21
|
-
'react/jsx-props-no-spreading': 'off', // _app.tsx uses spread operator
|
|
22
|
-
'react/react-in-jsx-scope': 'off',
|
|
23
|
-
'react/no-unknown-property': 'off',
|
|
24
|
-
// Disable conflicted rules
|
|
25
|
-
'@stylistic/jsx-indent': 'off',
|
|
26
|
-
'@stylistic/jsx-one-expression-per-line': 'off',
|
|
27
|
-
'@stylistic/jsx-tag-spacing': 'off',
|
|
28
|
-
'react/jsx-key': 'off'
|
|
29
|
-
}
|
package/packages/basic/README.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# @santi020k/eslint-config-basic
|
|
2
|
-
|
|
3
|
-
A comprehensive, composable ESLint configuration for modern JavaScript and TypeScript projects.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- **Composable**: Pick and choose what you need (React, Next.js, Astro, Expo, etc.).
|
|
8
|
-
- **Flat Config**: Built natively for ESLint 9+ Flat Config system.
|
|
9
|
-
- **Opinionated yet Flexible**: Sane defaults with easy override capabilities.
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install -D @santi020k/eslint-config-basic eslint
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
Create `eslint.config.mjs` (or `.js`):
|
|
20
|
-
|
|
21
|
-
```js
|
|
22
|
-
import { ConfigOption, eslintConfig, OptionalOption } from '@santi020k/eslint-config-basic'
|
|
23
|
-
|
|
24
|
-
export default eslintConfig({
|
|
25
|
-
config: [
|
|
26
|
-
ConfigOption.Ts,
|
|
27
|
-
ConfigOption.React
|
|
28
|
-
],
|
|
29
|
-
optionals: [
|
|
30
|
-
OptionalOption.Tailwind
|
|
31
|
-
]
|
|
32
|
-
})
|
|
33
|
-
```
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@santi020k/eslint-config-basic",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"description": "A comprehensive ESLint configuration package for JavaScript, TypeScript, and React projects.",
|
|
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
|
-
"dependencies": {
|
|
24
|
-
"@santi020k/eslint-config-astro": "*",
|
|
25
|
-
"@santi020k/eslint-config-core": "*",
|
|
26
|
-
"@santi020k/eslint-config-expo": "*",
|
|
27
|
-
"@santi020k/eslint-config-nest": "*",
|
|
28
|
-
"@santi020k/eslint-config-next": "*",
|
|
29
|
-
"@santi020k/eslint-config-optionals": "*",
|
|
30
|
-
"@santi020k/eslint-config-react": "*",
|
|
31
|
-
"@santi020k/eslint-config-typescript": "*",
|
|
32
|
-
"@eslint/compat": "^2.0.2",
|
|
33
|
-
"@eslint/js": "^9.39.2",
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
35
|
-
"@typescript-eslint/type-utils": "^8.54.0",
|
|
36
|
-
"cross-dirname": "^0.1.0",
|
|
37
|
-
"eslint": "^9.39.2",
|
|
38
|
-
"typescript-eslint": "^8.54.0"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"tsup": "^8.5.1",
|
|
42
|
-
"typescript": "^5.9.3",
|
|
43
|
-
"@typescript-eslint/utils": "^8.54.0"
|
|
44
|
-
},
|
|
45
|
-
"publishConfig": {
|
|
46
|
-
"access": "public"
|
|
47
|
-
},
|
|
48
|
-
"license": "MIT",
|
|
49
|
-
"author": "santi020k",
|
|
50
|
-
"repository": {
|
|
51
|
-
"type": "git",
|
|
52
|
-
"url": "git+https://github.com/santi020k/eslint-config.git",
|
|
53
|
-
"directory": "packages/basic"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
// Re-export types and utilities from core
|
|
2
|
-
export {
|
|
3
|
-
ConfigOption,
|
|
4
|
-
OptionalOption,
|
|
5
|
-
SettingOption,
|
|
6
|
-
ReactConfigs,
|
|
7
|
-
applyConfigIfOptionPresent,
|
|
8
|
-
hasReactConfig,
|
|
9
|
-
coreConfig,
|
|
10
|
-
jsConfig,
|
|
11
|
-
gitignore
|
|
12
|
-
} from '@santi020k/eslint-config-core'
|
|
13
|
-
|
|
14
|
-
export type {
|
|
15
|
-
EslintConfigOptions,
|
|
16
|
-
FlatConfigArray
|
|
17
|
-
} from '@santi020k/eslint-config-core'
|
|
18
|
-
|
|
19
|
-
// Re-export framework configs
|
|
20
|
-
export { typescriptConfig, tsConfig } from '@santi020k/eslint-config-typescript'
|
|
21
|
-
|
|
22
|
-
export { reactConfig } from '@santi020k/eslint-config-react'
|
|
23
|
-
|
|
24
|
-
export { nextConfig } from '@santi020k/eslint-config-next'
|
|
25
|
-
|
|
26
|
-
export { astroConfig } from '@santi020k/eslint-config-astro'
|
|
27
|
-
|
|
28
|
-
export { expoConfig } from '@santi020k/eslint-config-expo'
|
|
29
|
-
|
|
30
|
-
export { nestConfig } from '@santi020k/eslint-config-nest'
|
|
31
|
-
|
|
32
|
-
// Re-export optionals
|
|
33
|
-
export {
|
|
34
|
-
cspell,
|
|
35
|
-
i18next,
|
|
36
|
-
markdown,
|
|
37
|
-
mdx,
|
|
38
|
-
stencil,
|
|
39
|
-
tailwind,
|
|
40
|
-
vitest
|
|
41
|
-
} from '@santi020k/eslint-config-optionals'
|
|
42
|
-
|
|
43
|
-
// Import for composition
|
|
44
|
-
import { astroConfig } from '@santi020k/eslint-config-astro'
|
|
45
|
-
import type { EslintConfigOptions, FlatConfigArray } from '@santi020k/eslint-config-core'
|
|
46
|
-
import {
|
|
47
|
-
applyConfigIfOptionPresent,
|
|
48
|
-
ConfigOption,
|
|
49
|
-
coreConfig,
|
|
50
|
-
gitignore,
|
|
51
|
-
hasReactConfig,
|
|
52
|
-
OptionalOption,
|
|
53
|
-
SettingOption
|
|
54
|
-
} from '@santi020k/eslint-config-core'
|
|
55
|
-
import { expoConfig } from '@santi020k/eslint-config-expo'
|
|
56
|
-
import { nestConfig } from '@santi020k/eslint-config-nest'
|
|
57
|
-
import { nextConfig } from '@santi020k/eslint-config-next'
|
|
58
|
-
import {
|
|
59
|
-
cspell,
|
|
60
|
-
i18next,
|
|
61
|
-
markdown,
|
|
62
|
-
mdx,
|
|
63
|
-
stencil,
|
|
64
|
-
tailwind,
|
|
65
|
-
vitest
|
|
66
|
-
} from '@santi020k/eslint-config-optionals'
|
|
67
|
-
import { reactConfig } from '@santi020k/eslint-config-react'
|
|
68
|
-
import { typescriptConfig } from '@santi020k/eslint-config-typescript'
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Generates the ESLint configuration array, applying configurations
|
|
72
|
-
* and optional settings based on the input configuration.
|
|
73
|
-
*
|
|
74
|
-
* @param {EslintConfigOptions} options - Configuration and optional settings
|
|
75
|
-
* @returns {FlatConfigArray} The final ESLint configuration array
|
|
76
|
-
*/
|
|
77
|
-
export const eslintConfig = ({
|
|
78
|
-
config = [],
|
|
79
|
-
optionals = [],
|
|
80
|
-
settings = []
|
|
81
|
-
}: EslintConfigOptions = {}): FlatConfigArray => {
|
|
82
|
-
const hasReact = hasReactConfig(config)
|
|
83
|
-
|
|
84
|
-
return [
|
|
85
|
-
// Settings
|
|
86
|
-
...(settings.includes(SettingOption.Gitignore) ? gitignore : []),
|
|
87
|
-
|
|
88
|
-
// Core JS config (always included)
|
|
89
|
-
...coreConfig,
|
|
90
|
-
|
|
91
|
-
// React config (included if any React-based framework is used)
|
|
92
|
-
...(hasReact ? reactConfig : []),
|
|
93
|
-
|
|
94
|
-
// Framework-specific configs
|
|
95
|
-
...applyConfigIfOptionPresent(config, ConfigOption.Ts, typescriptConfig),
|
|
96
|
-
...applyConfigIfOptionPresent(config, ConfigOption.Next, nextConfig),
|
|
97
|
-
...applyConfigIfOptionPresent(config, ConfigOption.Astro, astroConfig),
|
|
98
|
-
...applyConfigIfOptionPresent(config, ConfigOption.Expo, expoConfig),
|
|
99
|
-
...applyConfigIfOptionPresent(config, ConfigOption.Nest, nestConfig),
|
|
100
|
-
|
|
101
|
-
// Optionals
|
|
102
|
-
...(optionals.includes(OptionalOption.Cspell) ? cspell : []),
|
|
103
|
-
...(optionals.includes(OptionalOption.Tailwind) ? tailwind : []),
|
|
104
|
-
...(optionals.includes(OptionalOption.Vitest) ? vitest : []),
|
|
105
|
-
...(optionals.includes(OptionalOption.I18next) ? i18next : []),
|
|
106
|
-
...(optionals.includes(OptionalOption.Stencil) ? stencil : []),
|
|
107
|
-
...(optionals.includes(OptionalOption.Mdx) ? mdx : []),
|
|
108
|
-
...(optionals.includes(OptionalOption.Markdown) ? markdown : [])
|
|
109
|
-
]
|
|
110
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Options } from 'tsup'
|
|
2
|
-
|
|
3
|
-
const env = process.env.NODE_ENV
|
|
4
|
-
|
|
5
|
-
export const tsup: Options = {
|
|
6
|
-
splitting: true,
|
|
7
|
-
clean: true, // clean up the dist folder
|
|
8
|
-
dts: true, // generate dts files
|
|
9
|
-
format: ['esm'], // generate esm files
|
|
10
|
-
minify: false,
|
|
11
|
-
// bundle: env === 'production',
|
|
12
|
-
skipNodeModulesBundle: true,
|
|
13
|
-
entryPoints: ['src/index.ts'],
|
|
14
|
-
watch: env === 'development',
|
|
15
|
-
target: 'es2020',
|
|
16
|
-
outDir: 'dist',
|
|
17
|
-
entry: ['src/**/*.ts'] // include all files under src
|
|
18
|
-
}
|
package/packages/core/README.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# @santi020k/eslint-config-core
|
|
2
|
-
|
|
3
|
-
Core ESLint configuration and utilities for the `@santi020k/eslint-config` monorepo.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
This package contains:
|
|
8
|
-
- Base JavaScript rules.
|
|
9
|
-
- Types and Enums (`ConfigOption`, `OptionalOption`, etc.).
|
|
10
|
-
- Utility functions for composing configurations.
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
This package is an internal dependency of `@santi020k/eslint-config` and is not intended to be installed directly.
|
package/packages/core/index.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@santi020k/eslint-config-core",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"description": "Core ESLint configuration with base JavaScript rules and shared utilities",
|
|
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
|
-
"./utils": {
|
|
15
|
-
"import": "./dist/utils/index.js",
|
|
16
|
-
"types": "./dist/utils/index.d.ts"
|
|
17
|
-
},
|
|
18
|
-
"./types": {
|
|
19
|
-
"import": "./dist/types.js",
|
|
20
|
-
"types": "./dist/types.d.ts"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"dist"
|
|
25
|
-
],
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "tsup",
|
|
28
|
-
"dev": "tsup --watch",
|
|
29
|
-
"clean": "rm -rf dist"
|
|
30
|
-
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"eslint": "^9.0.0"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"@eslint/js": "^9.39.2",
|
|
36
|
-
"@stylistic/eslint-plugin": "^5.7.1",
|
|
37
|
-
"eslint-config-standard": "^17.1.0",
|
|
38
|
-
"eslint-plugin-import": "^2.32.0",
|
|
39
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
40
|
-
"eslint-plugin-n": "^17.23.2",
|
|
41
|
-
"eslint-plugin-promise": "^7.2.1",
|
|
42
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
43
|
-
"eslint-plugin-unused-imports": "^4.3.0",
|
|
44
|
-
"globals": "^17.3.0"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@typescript-eslint/utils": "^8.54.0",
|
|
48
|
-
"tsup": "^8.5.1",
|
|
49
|
-
"typescript": "^5.9.3"
|
|
50
|
-
},
|
|
51
|
-
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
53
|
-
},
|
|
54
|
-
"license": "MIT",
|
|
55
|
-
"author": "santi020k",
|
|
56
|
-
"repository": {
|
|
57
|
-
"type": "git",
|
|
58
|
-
"url": "git+https://github.com/santi020k/eslint-config.git",
|
|
59
|
-
"directory": "packages/core"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// Type declarations for ESLint plugins that don't ship their own types
|
|
2
|
-
|
|
3
|
-
declare module 'eslint-config-standard' {
|
|
4
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
5
|
-
|
|
6
|
-
const config: {
|
|
7
|
-
rules: TSESLint.Linter.RulesRecord
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default config
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare module 'eslint-plugin-import' {
|
|
14
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
15
|
-
|
|
16
|
-
const plugin: {
|
|
17
|
-
rules: Record<string, TSESLint.RuleModule<string, unknown[]>>
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default plugin
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare module 'eslint-plugin-jsx-a11y' {
|
|
24
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
25
|
-
|
|
26
|
-
const plugin: TSESLint.FlatConfig.Plugin
|
|
27
|
-
|
|
28
|
-
export default plugin
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare module 'eslint-plugin-n' {
|
|
32
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
33
|
-
|
|
34
|
-
const plugin: TSESLint.FlatConfig.Plugin
|
|
35
|
-
|
|
36
|
-
export default plugin
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare module 'eslint-plugin-promise' {
|
|
40
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
41
|
-
|
|
42
|
-
const plugin: TSESLint.FlatConfig.Plugin
|
|
43
|
-
|
|
44
|
-
export default plugin
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare module 'eslint-plugin-simple-import-sort' {
|
|
48
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
49
|
-
|
|
50
|
-
const plugin: TSESLint.FlatConfig.Plugin
|
|
51
|
-
|
|
52
|
-
export default plugin
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
declare module 'eslint-plugin-unused-imports' {
|
|
56
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
57
|
-
|
|
58
|
-
const plugin: TSESLint.FlatConfig.Plugin
|
|
59
|
-
|
|
60
|
-
export default plugin
|
|
61
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
import configStandard from 'eslint-config-standard'
|
|
3
|
-
import pluginImport from 'eslint-plugin-import'
|
|
4
|
-
import pluginJsxA11y from 'eslint-plugin-jsx-a11y'
|
|
5
|
-
import pluginN from 'eslint-plugin-n'
|
|
6
|
-
import pluginPromise from 'eslint-plugin-promise'
|
|
7
|
-
import pluginSimpleImport from 'eslint-plugin-simple-import-sort'
|
|
8
|
-
import pluginUnusedImport from 'eslint-plugin-unused-imports'
|
|
9
|
-
import globals from 'globals'
|
|
10
|
-
|
|
11
|
-
import { rules } from './rules.js'
|
|
12
|
-
|
|
13
|
-
import eslint from '@eslint/js'
|
|
14
|
-
import pluginStylistic from '@stylistic/eslint-plugin'
|
|
15
|
-
import type { TSESLint } from '@typescript-eslint/utils'
|
|
16
|
-
|
|
17
|
-
// Re-export types and utilities
|
|
18
|
-
export * from './types.js'
|
|
19
|
-
|
|
20
|
-
export * from './utils/index.js'
|
|
21
|
-
|
|
22
|
-
const languageOptions: TSESLint.FlatConfig.LanguageOptions = {
|
|
23
|
-
ecmaVersion: 'latest',
|
|
24
|
-
sourceType: 'module',
|
|
25
|
-
globals: {
|
|
26
|
-
...globals.browser,
|
|
27
|
-
...globals.node
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Core JavaScript ESLint configuration
|
|
33
|
-
* This is included by default in all configurations
|
|
34
|
-
*/
|
|
35
|
-
export const coreConfig: TSESLint.FlatConfig.ConfigArray = [
|
|
36
|
-
{
|
|
37
|
-
name: 'eslint-config/recommended',
|
|
38
|
-
...eslint.configs.recommended
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'eslint-config/plugins',
|
|
42
|
-
plugins: {
|
|
43
|
-
n: pluginN,
|
|
44
|
-
promise: pluginPromise,
|
|
45
|
-
import: { rules: pluginImport.rules },
|
|
46
|
-
'simple-import-sort': pluginSimpleImport,
|
|
47
|
-
'jsx-a11y': pluginJsxA11y,
|
|
48
|
-
'unused-imports': pluginUnusedImport
|
|
49
|
-
},
|
|
50
|
-
languageOptions,
|
|
51
|
-
rules: {
|
|
52
|
-
...configStandard.rules,
|
|
53
|
-
'import/first': 'off'
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'eslint-config/stylistic',
|
|
58
|
-
...pluginStylistic.configs.recommended
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'eslint-config/custom-js',
|
|
62
|
-
languageOptions,
|
|
63
|
-
files: ['**/*.{js,jsx,mjs,cjs}'],
|
|
64
|
-
rules
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
|
|
68
|
-
// Legacy export for backwards compatibility
|
|
69
|
-
export { coreConfig as jsConfig }
|
|
70
|
-
|
|
71
|
-
// Export rules and groups for use by other packages
|
|
72
|
-
export { rules, groups } from './rules.js'
|
|
73
|
-
|
|
74
|
-
// Export settings
|
|
75
|
-
export { gitignore } from './settings/index.js'
|